I have set up my asterisk sip server in such a way where I would transfer a call by first dialling "*2",then the server would prompt me asking for the number to which I want to transfer the call and then I could dial the number. I want to make a JAVA function using the native android library. In the code below base_call is the instance of SipAudioCall that hold the instance of the ongoing call.
public void transferCall() {
base_call.sendDtmf(10);
base_call.sendDtmf(2);
try {
TimeUnit.SECONDS.sleep(3);
} catch (InterruptedException e) {
e.printStackTrace();
}
base_call.sendDtmf(7);
base_call.sendDtmf(0);
base_call.sendDtmf(0);
base_call.sendDtmf(3);
}
Here I am trying to transfer the call to 7003.The "*2" works and the server is prompting me to dial a number but the dialling of numbers does not work.
这是通过在发送 dtmf 代码之间设置适当的时间延迟来实现的。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.