Friday, January 23, 2009

Asterisk DTMF Issue Fixed

One of the issues that is known with Asterisk is the reliability on how it handles DTMF. By the way what is DTMF. DTMF in layman's term is touch tone. This are the digits being dialed. We usually encounter this when we call a customer service where we're asked to dial a certain option. Say "Press 1 for sales .....".

One problem that I encountered on this was how poorly the Asterisk server accepts DTMF or send DTMF. Actually this is not an Asterisk issue but the way how the Asterisk is configured.

Is there a resolution to it? Well, there is.

Here's are some notes and how.

There are 4 modes where asterisk can handle DTMF. We have rfc2833, info, inband and auto. Among these modes, based on majority suggestions out there, it is recommended to use RFC2833.RFC2833 is said to work perfectly with asterisk. By the way RFC2833 is an out-of-band DTMF mode.

To set Asterisk to use RFC2833 then set on the configuration files (sip.conf, iax.conf and chan_dahdi (I am not sure here...)) and look for this option.

dtmfmode=(mode)

Set it to:

dtmfmode = rfc2833
rfc2833compensate = yes
relaxdmtf = no ; should be no because setting it to yes cause talkoff

then reload the module say 'sip reload'

Another suggestion is to use:

dtmfmode=auto

Here Asterisk will use RFC2833 first as its default way of relaying DMTF. If the remote side does not suppor it, then it will switch to Inband mode. But a note on this. If you plan to use this mode, make sure that you are only using ulaw codec as the Inband mode is very problematic on non ulaw codec.

Personally I recommend just using the RFC2833 as your mode for DTMF handling because it is proven to work perfectly and reliably on Asterisk. It is your choice to use auto also.

Hope this discussion will be helpful. Cheers and God Bless!!!!

No comments: