tomek-o/tSIP

Not sending correct DTMF format

Closed this issue · 7 comments

aeri commented

First of all, congratulations on your job, it's great.

When i try to use the numeric keyboard to send a DTMF tone, the server not catch it.

It seems that uses a different format than RFC2833 and SIP INFO.

When i capture the log with other software that sends correctly the DTMF tones this is the result:

22:04:46,298: Generate DTMF: 1
22:04:46,298: Facility Request: 19 00 01 00 80 80 F2 0B 01 01 01 00 01 00 0A 03 00 64 00 3C 00 01 31 00 00
22:04:46,298: Facility (DTMF Send) Request (1)
22:04:46,299: Facility Confirm: 11 00 01 00 80 81 F2 0B 01 00 00 00 00 00 01 00 00
22:04:46,299: Facility Confirm (DTMF)

I think that the DTMFs format is generated as inband tone.

Could the following format be implemented in the software? Thank you :)

There might be one more possibility other than inband - SIP INFO with "dtmf" (not "dtmf-relay") payload.
Could you capture with Wireshark what the other, working softphone is actually sending? To make is easy to decode audio use G.711a or G.711u (a-law/u-law) codec and start capturing with Wireshark before starting the call.
What PABX are you using? Is it configurable / do you have access to configuration?

aeri commented

The problem is that the PABX is from my ISP, they do not provide technical information about the SIP and of course I can't configure any parameters.

The software that i have been using before was PhonerLite and they say this:

G.711 codec is negotiated AND the Option "SendOptionalInbandDTMF" is enabled (default is on), the DTMFs will be generated as inband tone.
else: SIP INFO

When i use that software the codec by default is G.711a, maybe it's because of the lack of this codec?

I'm gonna try to do the capture with that software and upload it to pastebin.

aeri commented

https://pastebin.com/GcFCapCy
This is the full log with PhonerLite since the SIP is registered, call, press number 7 and hang. You need a more low-level record with Wireshark?

G.711 codec is negotiated AND the Option "SendOptionalInbandDTMF" is enabled (default is on), the DTMFs will be generated as inband tone.
else: SIP INFO

It's very likely that inband is used then. It specifies here that inband is used when G.711 is used as G.711 has generally low distortion (not being "voice" specific codec like e.g. GSM), so there is low risk of tone being damaged by compression and decompression.

I have one new feature open at the moment and I would like to finish it first, then I'll look into inband DTMF or some workaround (switching to wave file just to play DTMF would probably work, but it would be somehow hacky). This would probably take at least few days though.

aeri commented

Thank you for the fastest support. Your work is amazing.

Inband DTMF is now available in account settings. This is slightly modified hselasky/baresip@84afa67 commit. Seems to work with my "antique" PABX, let me know if this works for you.
Commit: f3bca8b.
Updated exe is at http://tomeko.net/tmp/tSIP.exe.

aeri commented

I just tried it and it worked perfectly. Thank you very much for the support and the quick management. 👍