How to change DTMF Setting on the fly in sip.conf or extensions.conf in asterisk.
Its common to have multiple DIDs from VoIP service Providers and those DID needs different DTMF settings. You can change the DTMF in asterisk no matter how the SIP trunk is configured.
In your routing block (Usually in extention.conf) your can add a line
[code] exten => DID.,n,SIPDtmfMode(inband)
Example you have two DIDs
19856785635 and 8665298546 and one support RFC28cc and other one supports inband
[code] exten => 19856785635 ,n,SIPDtmfMode(RFC2833)
exten => 8665298546 ,n,SIPDtmfMode(inband)
[/code] In asterisk pbx you might have to use extensions_custom.conf
Post your question in comment if you need more help.