Impossible to authenticate to the server using dtmf from out

Hi everyone,

I am using Asterisk 1.8.9 on a CentOS 6 OS (with a2billing 1.9.4). I 'm trying to configure a calling card access using a DID number. I can access to the IVR by dialing the DID number . There is no issue when i am using peer account (sip) configured in the asterisk system, but the issue is that when i am asked to enter my PIN code, DTMF tones aren’t recognized by the system when i am using a phone from outside ( mobile phone , gsm …). It would seem that something is missing in one of my config files . I need some help please .

is your did getting to your asterisk via g729?
it’s not recommended to send inband DTMF with g729
check your sip dtmf settings

Thank you nmirceac for your answer, i’m not using g729 actually. I 'm using the allaw codec. It would seem that the g729 codec is not installed by default in asterisk because it isn’t present in the /usr/lib/asterisk/modules directory.
Last thing : - can you tell me where can i check my dtmf setting elsewhere than in my /etc/asterisk/sip.conf
- is there something to download or to configure in asterisk to have a functional dtmf system ?

Here is my sip.conf configuration:

context = default ; Default context for incoming calls
videosupport = yes ; Enable video
disallow = all ; First disallow all codecs

;allow=g729 ;

;allow = ulaw ; Allow codecs in order of preference
allow = alaw
;allow = gsm

allow = h263 ; H.263 is our video codec
allow = h263p ; H.263p is the enhanced video codec
dtmfmode = rfc2833 ; Set default dtmfmode for sending DTMF.

Thank you

There is nothing extra needed for DTMF. The only requirement is that dtmfmode in sip.conf is compatible with the settings on the peer (and that dtmfmode=inband is only used with simple codecs - mainly G.711 A and mu-law).

You will need to provide debug level information to diagnose this further.

Thank you david55 but even by replacing the dtmfmode value by inband that still doesn’t work. How could i install the g729 codec for free and configure it please ?

G.729 isn’t free. It’s patented intellectual property. G.729 can be used with Asterisk: … 8G729CODEC

G.729 won’t help you here, anyway; it forces you to use out of band “DTMF”.

Also, when you said you tried inband, I got the impression that you were stabbing in the dark. You need to find out how the peer is configured, and match that, rather than trying everything until something works.

Of course david55 , u 're really right. My provider accept rfc2833 and inband dtmfmode. the thing is that i tried

disallow =all



but nothing really good.

I would use alaw (1 L) and 2833.

I’d also get a wireshark trace and confirm that the DTMF is actually being sent.


Seeing that Google ranks this thread high in the list of search results for this keyword: “dtmf authentication pin code”, I thought I share this Codeproject article that I just found this morning:

Quoting from the article: “This article presents how to develop a C# application using XML/HTTP/PHP and DTMF signalling that allows you to authenticate your customers through a phone call with the help of their User ID and PIN code.” The writer has used the prewritten VoIP components of Ozeki VoIP SDK.

After checking its website, I found this page about how to use this SDK with Asterisk:

I hope it can help you and even your readers as well! :wink: