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.