[Asterisk-Users] DTMF not working

Rob Tarte rtarte at pacificcodeworks.com
Wed Aug 24 08:46:43 MST 2005


Hi Mr. Evil,

I'm not sure if the problem that I am describing relates to the problem 
that you are having.  It seems that when you press a key on a SIP phone 
that is set for inband DTMF, asterisk absorbs the tones until you 
release the key.  This way if you are using DTMF to do things like 
transfer calls, the user won't get tone blasts in their ear until 
asterisk has had a chance to interpret the tones.   After asterisk has 
figured out what to do with the tone, it generates and transmits it's 
own tones in the routine do_senddigit() (assuming that the DTMF tone 
should be passed on).  The duration of the DTMF tones that asterisk 
generates is fixed and independent of how long you pressed the key on 
your phone.

In the line "!941+1336/100,!0/100", the 941 is one tone of the DTMF 
(dual tone multi-frequency), and 1336 is the other tone.  The 100 is the 
duration of those tones.   The tones are in Hz.  I'm not sure what units 
the duration is in, but I bumped mine from 100 to 400 and that seems to 
do the trick.  The part of the string that reads "!0/100" just shuts the 
tone generator off.

Rob

Innocent Evil wrote:

>I am having same problem .. DTMF is not working from a SIP phone while
>sending to Asterisk cmd VoiceMailMain.
>
>Would you please explain this line
>"!941+1336/100,!0/100", /* 0 */
>
>what  value is what and how it affect on DTMF tone generation.
>
>Thanks,
>
>  
>
>>I had a similar problem that seems to be caused by the DTMF tone lengths
>>being to short.  Try this:
>>
>>Asterisk generates DTMF tones in  do_senddigit() in the file channel.c.
>>The tones are defined in a const char array called dtmf_tones[].  Each
>>DTMF tone is a string that looks something like:
>>
>>"!941+1336/100,!0/100", /* 0 */
>>
>>The part that reads !941+1336/100 is the part that you want.  Change the
>>"100" to something bigger and recompile.  You will have to do that for
>>every tone.   I'm using 400 right now, and it seems to be working.
>>
>>I hope that helps.
>>
>>Rob
>>
>>Peter Osborne wrote:
>>
>>    
>>
>>>Hi all,
>>>
>>>I just upgraded from Asterisk 1.0RC1 to Asterisk 1.0.7 and our dtmf no
>>>      
>>>
>>longer
>>    
>>
>>>works with external phone systems. I have a Wildcard TDM400P with 4
>>>      
>>>
>>FXO's?
>>    
>>
>>>(it connects to analog lines). No changes were made to the config files.
>>>
>>>Here's my config:
>>>
>>>/etc/zaptel.conf
>>>fxsks=1-4
>>>loadzone = us
>>>defaultzone=us
>>>
>>>/etc/asterisk/zapata.conf
>>>[channels]
>>>usecallerid=yes
>>>hidecallerid=no
>>>callwaiting=yes
>>>usecallingpres=yes
>>>threewaycalling=yes
>>>transfer=yes
>>>cancallforward=yes
>>>callreturn=yes
>>>echocancel=yes
>>>echotraining=yes
>>>rxgain=2.0
>>>txgain=2.0
>>>callgroup=1
>>>pickupgroup=1
>>>musiconhold=default
>>>context=incoming
>>>group=1
>>>signalling=fxs_ks
>>>echocancel=64
>>>echocancelwhenbridged=yes
>>>relaxdtmf=yes
>>>channel => 1-3
>>>
>>>[pete_desk]
>>>;Pete's Desk phone (Polycom IP 300)
>>>type=friend
>>>username=pete_desk
>>>secret=pass
>>>context=longdistance
>>>callerid=Pete <601>
>>>host=dynamic
>>>mailbox=601
>>>dtmfmode=inband
>>>disallow=all
>>>allow=ulaw
>>>allow=alaw
>>>
>>>Thanks,
>>>Pete
>>>      
>>>

-- 
Robert Tarte
Pacific CodeWorks
P.O. Box 29050
San Francisco, CA 94129

(p) 831-426-7582
(f) 831-426-7584




More information about the asterisk-users mailing list