Android Native SIP DTMF
Asked Answered
I

3

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).

Indicant answered 21/10, 2013 at 9:28 Comment(0)
M
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

Murrah answered 1/3, 2014 at 7:18 Comment(0)
P
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).

Pavla answered 3/3, 2014 at 17:40 Comment(0)
S
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.

Semiquaver answered 18/7, 2017 at 0:57 Comment(1)
Also this answer might help #43516104Semiquaver

© 2022 - 2024 — McMap. All rights reserved.