6

I am using android SIP(android.net.sip) for VOIP calling. Trying to send DTMF. In SipAudioCall Class of android two method has been given

void sendDtmf(int code, Message result)
Sends a DTMF code.

void sendDtmf(int code)
Sends a DTMF code.

I am thinking to use sendDtmf(int code) method to send DMTF. but I dont know how can I varify whether It is actually sent or not. After implementing this, I am not getting any tone at reciever/sender side. Calling to this giving me no effect (As its background processing is not visible ). Can anyone please let me know how can I varify the same? Also please explain me usage of second method sendDtmf(int code, Message result).

Learner
  • 145
  • 9

3 Answers3

2

There are three main methods for sending DTMF with sip:

  1. in-band RTP payloads
  2. generated DTMF tones
  3. sip info messages (outdated and most likely not used)

Most likely it's using the in-band RTP payload packets. Altho most sip stacks I know have some sort of option to select the type of DTMF to send.

Sorry I don't know anything about the inbuilt Android SIP stack, so I can't answer questions directly about there implementation.

What I would do to check that the DTMF is sent correctly is use something like WireShark to capture the RTP audio stream. You can then use the wiresharks voip call graph analysis option which will display the DTMF events in the RTP!

VOIP Call Graph Analysis output

Community
  • 1
  • 1
Shane Powell
  • 13,698
  • 2
  • 49
  • 61
1

The android.net.sip has support only for dtmf mode RFC 2883. You can easily see these messages with a software like wireshark and/or from your server side logs (or other peer logs). Just make sure that the other party has support for this kind of dtmf (RFC 2883 support).

0

I use Counterpath X-Lite V4.9.8 to help develop an Android OS SIP app using the native SIP library. The X-Lite Softphone/Preferences/Calls should be set to "Send via RFC 2833".

Once you have an active SIP call with bi-directional audio, and you use yourcall.sendDtmf(5), as an example, during that call, you can hear the DTMF tones via the X-Lite app, with the tones lasting about 1/2 second each.

crockwave
  • 31
  • 5
  • Also this answer might help https://stackoverflow.com/questions/43515604/tonegenerator-crashes-in-android-6-0/45179525#45179525 – crockwave Aug 30 '17 at 21:39