SIPDtmfMode for PJSIP

I have multiple sip provider and they appears to have different DTMF mode set.
In chan_sip there was a way to set SIPDtmfMode in the dialplan but,
in chan_pjsip there isnt a way.

Are there any other ways to set DTMF mode?

Currently, I have AMI Originating a Call which and then wait for the client to press a button, which intermittently doesn’t respond to the touch tone. I believe its a DTMF issues if not please enlighten me.

Appears I have to set it statically via pjsip.conf

dtmf_mode=rfc4733 via documentation at
https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Configuration_res_pjsip#Asterisk13Configuration_res_pjsip-endpoint_dtmf_mode

it appears rfc4733 supercedes rfc2833 but my provider needs rfc2833
is it safe to use rfc2833, because it appears to work?

rfc2833 is loose terminology for rfc 4733. Asterisk dtmfmode=rfc2833 really means RFC 4733. RFC 2833 is not distinguishable, in the protocol exchange, from RFC 4733 with a limited range of acceptable events.

1 Like

Is digi planning to add something similar to SIPDtmfMode so it can be easily dynamically changed via dialplan?

As Asterisk is an open source project any individual (not just Digium) is free to contribute such functionality, which has actually happened[1]. It will be present in the next release.

[1] https://gerrit.asterisk.org/#/c/5909/

1 Like

Dynamically changing dtmfmode is not something to be encouraged, as the new mode will not be properly negotiated with the peer. In fact, we used this to deliberately confuse the system into breaking DTMF handling when it was accidentally connecting to fax devices and we were getting fax calling tone, that was being presented to the agents as silence.

Under normal circumstances, you should fix the dtmfmode for peer in sip.conf or pjsip.conf.

1 Like

Thanks, I always prefer to do best practice so if I need to change it via pjsip.conf so be it.
I notice I can create different interface/endpoint with different dtmf mode.
image

Thank you all for your help
Much Appreciation