Razvan
Razvan

Reputation: 503

Android pjsip DTMF codes not sending

Starting from the example found here: https://trac.pjsip.org/repos/wiki/Getting-Started/Android , I managed to build and run the pjsua2 sample application.

The problem is that I can't send DTMF codes, they appear in logcat but they aren't sent at all (I checked with wireshark). Once the call has the status confirmed, I try to send DTMF codes like this:

currentCall.dialDtmf("123#");

or

currentCall.dialDtmf("1");
currentCall.dialDtmf("2");
currentCall.dialDtmf("3");
currentCall.dialDtmf("#");

If I send these codes the server should start playing a sound, so I have some feedback that the codes are sent correctly. The problem is not on the server side because I have tested with other 3rd party apps.

I have also tried the following but with no luck:

OnDtmfDigitParam dtmfDigitParam = new OnDtmfDigitParam();
dtmfDigitParam.setDigit("1");
currentCall.onDtmfDigit(prm);

Any other ideas?

EDIT: I think it's got something to do with RTP ? The library doesn't seem to respond to the server's message (RTP g711A - this is sent after ACK @call established/confirmed) that it sends to the Android app.

Thanks!

Upvotes: 4

Views: 2578

Answers (2)

luismartingil
luismartingil

Reputation: 1109

Based on pjsip doc:

PJSIP will only send RFC 2833 DTMF to remote if remote has indicated its capability to accept RFC 2833 events in its SDP. This is done by putting this line in the SDP:

a=rtpmap:101 telephone-event/8000

So you need to make sure the callee has RFC 2833 capabilities and is attaching telephone-event in the SDP.

Upvotes: 0

Priyank Patel
Priyank Patel

Reputation: 12382

check what type of DTMF your server accepts.

Pjsua2 dialDtmf method will send DTMF digits to remote using RFC 2833 payload formats.

You can see DTMF packets in wireshark as an RTP Event.

see below link for reference...

http://www.pjsip.org/docs/book-latest/html/call.html

Upvotes: 1

Related Questions