# DTMF isn't working

**URL:** <https://community.asterisk.org/t/dtmf-isnt-working/34128>\
**Category:** Asterisk Support\
**Created:** [February 11, 2011, 9:56pm UTC](https://community.asterisk.org/t/dtmf-isnt-working/34128 "2011-02-11T21:56:59Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [February 11, 2011, 9:56pm UTC](https://community.asterisk.org/t/dtmf-isnt-working/34128/1 "2011-02-11T21:56:59Z")

</div>

Hi,

I am running asterisk 1.8.2 on CentOS 5.  
When I make a call from Voxeo to the cell phone, both DTMF and speech recognition are working.  
But when I make a call from the cell phone to Voxeo, I can hear prompts, but DTMF isn’t working.  
What am I missing here?

Here’s my environment. No additional telephony hardware is involved.  
a cell phone \<–\>SIP Provider\<–\>Asterisk(NATed)\<–\>Voxeo (as a soft-phone)

Here’s my sip.conf:

[code]pedantic=no  
register =\> [1231231234@sip.provider.com](mailto:1231231234@sip.provider.com):pass:1231231234@sip.provider.com  
localnet=192.168.10.0/255.255.255.0  
externaddr=123.123.123.111:5060  
nat = comedia

[[sip.provider.com](http://sip.provider.com)]  
type=peer  
context=inbound  
[host=sip.provider.com](http://host=sip.provider.com)  
[fromdomain=sip.provider.com](http://fromdomain=sip.provider.com)  
fromuser=1231231234  
secret=pass  
username=1231231234  
insecure=invite  
authname=1231231234  
dtmfmode=rfc2833  
dtmf=inband  
canreinvite=yes  
directmedia=yes

[voxeo]  
type=friend  
host=dynamic  
secret=pass2  
context=outbound  
dtmfmode=info  
dtmf=info  
deny=0.0.0.0/0  
permit=192.168.10.0/255.255.255.0[/code]

Here’s my extensions.conf:

[code][inbound]  
exten =\> \_NXXNXXXXXX, 1, dial(SIP/voxeo,30)

[outbound]  
exten =\> \_1NXXNXXXXXX, 1, dial(SIP/${EXTEN}@sip.provider.com, 30)  
[/code]

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [February 11, 2011, 11:49pm UTC](https://community.asterisk.org/t/dtmf-isnt-working/34128/2 "2011-02-11T23:49:19Z")

</div>

I made a few changes to sip.conf, made a few calls, and reviewed RTP traffic generated in the following cases.  
It looks like DTMF events with payload type being telephone-event (101) are working whereas those with payload type being DynamicRTP-Type-101 (101) are not. The payload type seems to have something to do with dtmfmode and dtmf property in sip.conf. How can I fix this problem? Thanks.

- case 1 (I made a call from Voxeo to my cell phone with the same sip.conf shown in my first post. DTMF doesn’t work here.)
- case 2 (I made a call from a cell phone to Voxeo.)  
With the following changes to sip.conf, DTMF works.

```auto
[sip.provider.com]
type=peer
context=inbound
host=sip.provider.com
fromdomain=sip.provider.com
fromuser=1231231234
secret=pass
username=1231231234
insecure=invite
authname=1231231234
dtmfmode=rfc2833
dtmf=inband
canreinvite=yes
directmedia=yes

[voxeo]
type=friend
host=dynamic
secret=pass2
context=outbound
dtmfmode=rfc2833
dtmf=inband
deny=0.0.0.0/0          
permit=192.168.10.0/255.255.255.0
```

---

<div class="post-metadata">

**Author:** ![david55](https://avatars.discourse-cdn.com/v4/letter/d/e19adc/32.png) [@david55](https://community.asterisk.org/u/david55)\
**Post date:** [February 14, 2011, 12:04pm UTC](https://community.asterisk.org/t/dtmf-isnt-working/34128/3 "2011-02-14T12:04:48Z")

</div>

Which codec? In band DTMF will only work reliably for mulaw and alaw.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [February 14, 2011, 4:05pm UTC](https://community.asterisk.org/t/dtmf-isnt-working/34128/4 "2011-02-14T16:05:20Z")

</div>

In my previous tests, I didn’t specify allow or disallow properties. So by default, allow =all was used.

I tried different combinations of dtmfmode and dtmf values, and setting dtmfmode=auto and dtmf=auto for both voxeo and [sip.provider.com](http://sip.provider.com) gives me the best results, in which dtmf won’t work only if I initiate an outbound call from voxeo to my cell phone. DTMF is supposed to work regardless of which endpoint initiates a call, right? But why am I running into this problem?

---

<div class="post-metadata">

**Author:** ![Helix26404](https://avatars.discourse-cdn.com/v4/letter/h/3d9bf3/32.png) [@Helix26404](https://community.asterisk.org/u/Helix26404)\
**Post date:** [February 15, 2011, 5:26am UTC](https://community.asterisk.org/t/dtmf-isnt-working/34128/5 "2011-02-15T05:26:11Z")

</div>

What codec(s) do you want to be able to use in your system? Once we know that, we can better recommend optimal settings/troubleshoot those settings if they aren’t functioning correctly.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [February 15, 2011, 5:00pm UTC](https://community.asterisk.org/t/dtmf-isnt-working/34128/6 "2011-02-15T17:00:19Z")

</div>

for now I would like to use g711 PCMU.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [March 13, 2011, 12:52am UTC](https://community.asterisk.org/t/dtmf-isnt-working/34128/7 "2011-03-13T00:52:33Z")

</div>

Hello,  
I have problem with dtmf on SIP [freecall.com](http://freecall.com)

Asterisk 1.4.21.2~dfsg-3+lenny2

in SIP.config i set:

`dtmfmode=rfc2833
dtmf=auto
rfc2833compensate=yes`

in extensions.conf i use SendDTMF(12345,250)

and Asterisk system call to my phone, and I not hear DTMF code.

in debug sip i have:

```auto

```

What can I do to make this work?
