[SOLVED] dtmfmode=inband ignored in sip.conf?

I have an older (1.8.13) Asterisk installation and after some debugging I realized my dtmfmode=inband setting was ignored in sip.conf. With a handset and a simple dialplan using read and saydigits I finally realized Asterisk was doing no dtmf detection at all (read was not even detecting the pound key to end entry). Once I added SIPDTMFMode(inband) to my dialplan to force Asterisk to use inband, everything started working and I thought my problem was solved.

However, I am trying to use AlarmReceiver() and adding SIPDTMFMode() did not affect it (it reads no digits at all). Looking at the logs, AlarmReciever() appears to be setting the read/write modes to ulaw, and I wonder if this is clobbering my inband setting again? Is there a global dtmf mode setting (for instance) at the codec level that is overriding my sip.conf setting? I think I am very close, and any help would be appreciated.

Mu-law and A-law are good for inband DTMF as these are the codecs that are used in the PSTN and therefore have to work well with it.

codec drivers do not have DTMF specific code.

Thanks, just making sure there wasn’t another config file I was missing. Looks like Asterisk has problems with “fast” DTMF detection starting with the late 1.8 versions, according to a bug entry I found. It was marked as fixed, so I built and tested with the latest 1.8, but I got the same results. Will try with the older 1.8.4 (1.8.3 will not build with my openssl) and see if the older versions will handle it. After that I guess I’ll have to regroup and rethink my solution.

I solved it by building the latest Asterisk 14 and installing on my Debian system. I thought it would be difficult to build on my older Wheezy, but it was easy. Fast DTMF works from my alarm panel via an SPA112 (all this is over a LAN) using inband DTMF, and AlarmReceiver is properly terminating the call so my panel doesn’t blink “FC” afterward.

One more thing: it took me a while to figure out a way to debug DTMF behavior. If it helps anyone, add an extension like this (I’m using 101, change the number to suit) to extensions.conf. Then call it from a phone and enter some digits, then hit the pound (#) key, and it will say the values back to you. This is what I used to figure out that 1.8 was not trying to detect inband DTMF.

exten => 101,1,Ringing()
exten => 101,n,Answer()
; override the default set in sip.conf
;exten => 101,n,SIPDtmfMode(inband)
exten => 101,n,Wait(1)
exten => 101,n,Read(myvar)
exten => 101,n,SayDigits(${myvar})
exten => 101,n,Wait(1)
exten => 101,n,Hangup()