1
votes

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.

1
What is dtmf mode settings on server and on app?arheops

1 Answers

0
votes

This worked by setting appropriate time lag between sending the dtmf codes.