[Home]

Summary:ASTERISK-09755: Asterisk rfc2833 DTMF fails with SIP service providers
Reporter:Pedro Tomas (tracinet)Labels:
Date Opened:2007-06-25 16:03:07Date Closed:2008-03-26 13:40:13
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/Interoperability
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 10058.diff
( 1) console.txt
( 2) rtp.log
( 3) sip.conf
Description:I have been hunting down this problem now for over a month, thinking it was a problem with my Polycom phone not passing RFC2833 properly.  So I decided to take the Polycom out of the equation and set up a Dial statement that would have asterisk send DTMF digits instead of the phone like this:

exten => 5555555555,1,Dial(SIP/sip_provider/5555555555,20,D(123456789))

(the 555 number represents my local landline).  So when I call the number from my IP phone (Polycom, Linksys, Cisco - does not matter), asterisk places a call out to one of my SIP service providers (have tested this with Level 3 and Global Crossing) and when I answer the landline, I hear the first digit and then silence until asterisk finished sending the remaining digits and then 2-way audio is enabled on the call and talking can begin.  The problem is that 8 of the 9 digits were not heard - only the 1st one was.

Here is my sip.conf entries:

[general]
disallow = all
allow=ulaw
port = 5060                    
context = incoming              
maxexpirey=180
defaultexpirey=160
canreinvite=no
srvlookup=yes
videosupport=no
nat=no
tos=reliability
dtmfmode=rfc2833

[sip_provider]
type=friend
username=123456789
secret=password
host=10.0.0.1
disallow=all  
allow=ulaw
maxexpirey=15
relaxdtmf=yes
dtmfmode=rfc2833
nat=no
insecure=very  
canreinvite=no
promiscredir=yes

I have tested this on MANY versions of asterisk from 1.2.10 all the way up to 1.4.5 (with or without zaptel hardware installed).

I have realized that some phones that are set to RFC2833 also send out tones inband as well, which makes this bug hard to reproduce if you are depending on the phone to generate the tones.  Once you use a phone like the Polycom SP430 that only sends RFC2833 tones when configured to do so, the bug is very noticeable and makes the system unusable.  Take the phone out of the mix like I have above and you quickly realize the issue is not the phone at all.

Have had engineers at the various service providers look at this problem and they insist the issue is a bug in asterisk and one has gone so far to state that a Digium tech said it was a problem with asterisk timing and to just use inband.  This is unacceptable as inband is not reliable.  Thank you in advance for your assistance with this.
Comments:By: Joshua C. Colp (jcolp) 2007-06-25 16:08:40

rtp debug, console output, and sip.conf is required to look at this.

By: Pedro Tomas (tracinet) 2007-06-25 16:31:37

Files attached as requested...

By: Pedro Tomas (tracinet) 2007-06-28 10:14:08

Just a quick update.  As requested by file, I hooked up a Polycom 430 directly to the Asterisk 1.4.5 box and DTMF did work afterall thanks to Packet2Packet.  However, anytime asterisk itself needs to generate the tones, rfc2833 fails.  I have submitted packet captures to file for review and am awaiting a reply.

By: daniel g (revolution) 2007-09-25 07:36:21

co-signed on this... we've noticed the same issues with Level3's Sonus switches... if anyone involved in this needs more information in regards to the Level3 switches -- please let me know.

P2P passes DTMF fine -- but anytime Asterisk needs to generate, failure. Kinda makes it hard to justify using Asterisk in any sort of business application as this prevents you from using any features which require * to stay in the media path (i.e. Transfers, Parks, etc.)

Any news on this?

By: Olle Johansson (oej) 2007-11-15 06:03:48.000-0600

Any update, File?

/Housekeeping

By: Phoebe Anderson (phoebe) 2007-11-15 07:45:20.000-0600

Can this also be what's keeping 0010530 from being solved?  Since 1.4, all of my users have been abusing valium in order to slow down their fingers so that DTMFs go through to the other end.

By: Olle Johansson (oej) 2007-12-16 03:24:53.000-0600

Is this still a problem with the latest 1.4?

Any updates, file?

/Housekeeping

By: Phoebe Anderson (phoebe) 2007-12-17 08:05:19.000-0600

Still an issue with 1.4.15 as well as svn.

By: Olle Johansson (oej) 2007-12-17 08:06:27.000-0600

Thank you for quick feedback!

By: Olle Johansson (oej) 2008-01-11 03:31:08.000-0600

I got information from another reporter that the problem is the RTP timestamps. They don't get updated properly with the duration of the DTMF and thus the DTMF is ignored.

By: Olle Johansson (oej) 2008-02-05 10:05:57.000-0600

Can confirm this problem with level 3 and asterisk 1.2

By: Joshua C. Colp (jcolp) 2008-02-14 10:55:44.000-0600

oej: Level3 is one of the reasons we rewrote DTMF in 1.4, so I'm not surprised it is extremely bad in 1.2. Do you think this also applies to 1.4 though?

tracinet: I am still quite interested in solving this issue. Would it be possible to get access to the machine where this happens? You can email me at jcolp@digium.com - Thanks.

By: Pedro Tomas (tracinet) 2008-02-14 14:33:29.000-0600

No problem - I had to pull my development servers into production, but I can setup a new development cluster.  Will e-mail you so we can get this fixed once and for all.

By: daniel g (revolution) 2008-02-14 21:56:25.000-0600

i'd like to throw my support into the ring for this one...

The company I work with has a rather large contract with Level3 and we've got a pretty friendly relationship with their people.

Let me know what I can do to help... if you'd like I'd be happy to setup a box connected to Level3 for the purpose of fixing this... (that's how important it is to me).

By: Joshua C. Colp (jcolp) 2008-03-10 09:39:28

revolution: What is your issue exactly? Do you have a SIP device on one side, Level3 on the other, and DTMF failing between them? Is it Packet2Packet bridging?

By: daniel g (revolution) 2008-03-10 17:18:43

file: my issue is dtmf failure when * stays in the media stream (and has to re-build the dtmf packets).

Currently I am running SPA941 -> * -> L3

If I have any of the options that require * to stay in the media path (i.e. to transfer, park, hangup, etc.) -- then DTMF does not work as expecting (usually if I punch a key several times I can get into a system... but rarely much further).

However, if I dial without any of those options... and a P2P bridge occurs -- DTMF works as expected.

Let me know how I can help you from my end.

By: Joshua C. Colp (jcolp) 2008-03-11 14:33:13

Attached is a patch which will introduce audio in between the generated DTMF packets. It seems that depending on the RFC2833 handling of the remote side it requires something like the patch provides. Give it a go.

By: daniel g (revolution) 2008-03-17 08:27:33

file -- I've been out of town for the last week... but I will apply this patch tonight and let you know the status tomorrow.

By: daniel g (revolution) 2008-03-21 08:13:32

file : notes thus far.

DTMF appears to work correctly now... but only if you take your time entering the digits (I don't mean at a slugs pace... I just mean a little slower than I would normally input them).

Is there anything I can do to help you improve the rate of effective transmission? Any traces/captures/etc?

By: Joshua C. Colp (jcolp) 2008-03-21 09:46:48

revolution: This patch only fixes things when Asterisk has to regenerate the DTMF, that sounds like a separate issue.

By: daniel g (revolution) 2008-03-21 20:00:32

file -- possibly... but my question would be why the same IVR would accept the DTMF at a relatively rapid rate from the same phone when a p2p bridge occurs?

Irregardless -- the problem appears to be fixed imo as the DTMF *does* indeed work when asterisk regenerates DTMF. If you would like I can try a different IVR on Monday than the ones I did test with.

Let me know.

By: jeffery palmer (darren1713) 2008-03-22 12:49:29

FYI, patch 10058.diff has fixed my dtmf issues on Asterisk 1.4.18.1 talking to a Sonus switch

By: Digium Subversion (svnbot) 2008-03-25 09:33:18

Repository: asterisk
Revision: 110628

U   branches/1.4/Makefile
U   branches/1.4/include/asterisk/options.h
U   branches/1.4/main/app.c
U   branches/1.4/main/asterisk.c

------------------------------------------------------------------------
r110628 | file | 2008-03-25 09:33:14 -0500 (Tue, 25 Mar 2008) | 4 lines

Add an option (transmit_silence) which transmits silence during both Record() and DTMF generation. The reason this is an option is that in order to transmit silence we have to setup a translation path. This may not be needed/wanted in all cases.
(closes issue ASTERISK-9755)
Reported by: tracinet

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=110628

By: Digium Subversion (svnbot) 2008-03-25 09:35:24

Repository: asterisk
Revision: 110629

_U  trunk/
U   trunk/Makefile
U   trunk/include/asterisk/options.h
U   trunk/main/app.c
U   trunk/main/asterisk.c

------------------------------------------------------------------------
r110629 | file | 2008-03-25 09:35:22 -0500 (Tue, 25 Mar 2008) | 12 lines

Merged revisions 110628 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r110628 | file | 2008-03-25 11:37:35 -0300 (Tue, 25 Mar 2008) | 4 lines

Add an option (transmit_silence) which transmits silence during both Record() and DTMF generation. The reason this is an option is that in order to transmit silence we have to setup a translation path. This may not be needed/wanted in all cases.
(closes issue ASTERISK-9755)
Reported by: tracinet

........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=110629

By: Digium Subversion (svnbot) 2008-03-25 09:38:04

Repository: asterisk
Revision: 110630

_U  branches/1.6.0/
U   branches/1.6.0/Makefile
U   branches/1.6.0/include/asterisk/options.h
U   branches/1.6.0/main/app.c
U   branches/1.6.0/main/asterisk.c

------------------------------------------------------------------------
r110630 | file | 2008-03-25 09:38:04 -0500 (Tue, 25 Mar 2008) | 20 lines

Merged revisions 110629 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r110629 | file | 2008-03-25 11:39:45 -0300 (Tue, 25 Mar 2008) | 12 lines

Merged revisions 110628 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r110628 | file | 2008-03-25 11:37:35 -0300 (Tue, 25 Mar 2008) | 4 lines

Add an option (transmit_silence) which transmits silence during both Record() and DTMF generation. The reason this is an option is that in order to transmit silence we have to setup a translation path. This may not be needed/wanted in all cases.
(closes issue ASTERISK-9755)
Reported by: tracinet

........

................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=110630

By: Digium Subversion (svnbot) 2008-03-25 12:59:04

Repository: asterisk
Revision: 110693

_U  team/group/cdr_backend_ast_str/
U   team/group/cdr_backend_ast_str/CHANGES
U   team/group/cdr_backend_ast_str/Makefile
U   team/group/cdr_backend_ast_str/channels/chan_iax2.c
U   team/group/cdr_backend_ast_str/channels/chan_sip.c
U   team/group/cdr_backend_ast_str/configs/extensions.conf.sample
U   team/group/cdr_backend_ast_str/configs/sip.conf.sample
U   team/group/cdr_backend_ast_str/configs/voicemail.conf.sample
U   team/group/cdr_backend_ast_str/include/asterisk/options.h
U   team/group/cdr_backend_ast_str/main/app.c
U   team/group/cdr_backend_ast_str/main/asterisk.c
U   team/group/cdr_backend_ast_str/main/channel.c

------------------------------------------------------------------------
r110693 | tilghman | 2008-03-25 12:58:50 -0500 (Tue, 25 Mar 2008) | 140 lines

Merged revisions 110610,110615,110619,110621,110625,110629,110631,110636,110639,110689,110691 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r110610 | file | 2008-03-24 10:28:25 -0500 (Mon, 24 Mar 2008) | 6 lines

Only print out the set_address_from_contact host verbose message if debugging is enabled on the dialog.
(closes issue ASTERISK-11703)
Reported by: rjain
Patches:
     chan_sip.c.diff uploaded by rjain (license 226)

................
r110615 | russell | 2008-03-24 12:36:04 -0500 (Mon, 24 Mar 2008) | 10 lines

Merged revisions 110614 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r110614 | russell | 2008-03-24 12:34:56 -0500 (Mon, 24 Mar 2008) | 2 lines

Turn a NOTICE into a DEBUG message.

........

................
r110619 | mmichelson | 2008-03-24 14:19:37 -0500 (Mon, 24 Mar 2008) | 23 lines

Merged revisions 110618 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r110618 | mmichelson | 2008-03-24 14:17:41 -0500 (Mon, 24 Mar 2008) | 15 lines

This is a revert for revision 108288. The reason is that that revision
was not for an actual bug fix per se, and so it really should not have been in 1.4 in
the first place. Plus, people who compile with DO_CRASH are more likely
to encounter a crash due to this change. While I think the usage of DO_CRASH
in ast_sched_del is a bit absurd, this sort of change is beyond the scope of 1.4
and should be done instead in a developer branch based on trunk
so that all scheduler functions are fixed at once.

I also am reverting the change to trunk and 1.6 since they also suffer from
the DO_CRASH potential.

(closes issue ASTERISK-11695)
Reported by: qq12345


........

................
r110621 | mmichelson | 2008-03-24 15:14:07 -0500 (Mon, 24 Mar 2008) | 11 lines

Remove the "Event: registration" header from Asterisk-generated
SIP REGISTER requests. rjain points out that RFC 3265 specifies
that the Event: header is not a valid header for REGISTER requests
and that the "registration" value is not defined at IANA.

(closes issue ASTERISK-11702)
Reported by: rjain
Patches:
     chan_sip.c.diff uploaded by rjain (license 226)


................
r110625 | oej | 2008-03-25 05:54:07 -0500 (Tue, 25 Mar 2008) | 6 lines

Use the "Server" header when responding to SIP requests.
(closes issue ASTERISK-11701)
Reported by: rjain
Patches:
     chan_sip.c.diff uploaded by rjain (license 226)

................
r110629 | file | 2008-03-25 09:39:45 -0500 (Tue, 25 Mar 2008) | 12 lines

Merged revisions 110628 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r110628 | file | 2008-03-25 11:37:35 -0300 (Tue, 25 Mar 2008) | 4 lines

Add an option (transmit_silence) which transmits silence during both Record() and DTMF generation. The reason this is an option is that in order to transmit silence we have to setup a translation path. This may not be needed/wanted in all cases.
(closes issue ASTERISK-9755)
Reported by: tracinet

........

................
r110631 | file | 2008-03-25 10:18:41 -0500 (Tue, 25 Mar 2008) | 4 lines

Add a special dialplan variable to chan_sip which will cause an audio file to be played upon completion of an attended transfer.
(closes issue ASTERISK-8972)
Reported by: sunder

................
r110636 | mmichelson | 2008-03-25 10:41:33 -0500 (Tue, 25 Mar 2008) | 15 lines

Merged revisions 110635 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r110635 | mmichelson | 2008-03-25 10:40:33 -0500 (Tue, 25 Mar 2008) | 7 lines

When reverting a commit, I accidentally left in this bit which was an experiment
to see what would happen. It passed the compile test, and I didn't notice I had
left this change in too.

So this is a revert of a revert...sort of.


........

................
r110639 | mmichelson | 2008-03-25 10:44:01 -0500 (Tue, 25 Mar 2008) | 3 lines

Oops here too. I need to stop coding for a while...


................
r110689 | tilghman | 2008-03-25 12:40:28 -0500 (Tue, 25 Mar 2008) | 6 lines

Update the sample configuration, to use Macro less (since it's now deprecated).
(closes issue ASTERISK-11716)
Reported by: pprindeville
Patches:
      bugid-0012293.1.6.patch uploaded by pprindeville (license 347)

................
r110691 | tilghman | 2008-03-25 12:46:34 -0500 (Tue, 25 Mar 2008) | 6 lines

Update sample configurations to make virtual hosting more obvious.
(closes issue ASTERISK-11414)
Reported by: pprindeville
Patches:
      acme-virtualpbx.1.6.patch uploaded by pprindeville (license 347)

................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=110693

By: Digium Subversion (svnbot) 2008-03-25 13:07:22

Repository: asterisk
Revision: 110694

_U  team/murf/bug11210/
U   team/murf/bug11210/CHANGES
U   team/murf/bug11210/Makefile
U   team/murf/bug11210/channels/chan_iax2.c
U   team/murf/bug11210/channels/chan_sip.c
U   team/murf/bug11210/configs/extensions.conf.sample
U   team/murf/bug11210/configs/sip.conf.sample
U   team/murf/bug11210/configs/voicemail.conf.sample
U   team/murf/bug11210/include/asterisk/options.h
U   team/murf/bug11210/main/app.c
U   team/murf/bug11210/main/asterisk.c
U   team/murf/bug11210/main/channel.c

------------------------------------------------------------------------
r110694 | murf | 2008-03-25 13:07:18 -0500 (Tue, 25 Mar 2008) | 140 lines

Merged revisions 110610,110615,110619,110621,110625,110629,110631,110636,110639,110689,110691 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r110610 | file | 2008-03-24 09:28:25 -0600 (Mon, 24 Mar 2008) | 6 lines

Only print out the set_address_from_contact host verbose message if debugging is enabled on the dialog.
(closes issue ASTERISK-11703)
Reported by: rjain
Patches:
     chan_sip.c.diff uploaded by rjain (license 226)

................
r110615 | russell | 2008-03-24 11:36:04 -0600 (Mon, 24 Mar 2008) | 10 lines

Merged revisions 110614 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r110614 | russell | 2008-03-24 12:34:56 -0500 (Mon, 24 Mar 2008) | 2 lines

Turn a NOTICE into a DEBUG message.

........

................
r110619 | mmichelson | 2008-03-24 13:19:37 -0600 (Mon, 24 Mar 2008) | 23 lines

Merged revisions 110618 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r110618 | mmichelson | 2008-03-24 14:17:41 -0500 (Mon, 24 Mar 2008) | 15 lines

This is a revert for revision 108288. The reason is that that revision
was not for an actual bug fix per se, and so it really should not have been in 1.4 in
the first place. Plus, people who compile with DO_CRASH are more likely
to encounter a crash due to this change. While I think the usage of DO_CRASH
in ast_sched_del is a bit absurd, this sort of change is beyond the scope of 1.4
and should be done instead in a developer branch based on trunk
so that all scheduler functions are fixed at once.

I also am reverting the change to trunk and 1.6 since they also suffer from
the DO_CRASH potential.

(closes issue ASTERISK-11695)
Reported by: qq12345


........

................
r110621 | mmichelson | 2008-03-24 14:14:07 -0600 (Mon, 24 Mar 2008) | 11 lines

Remove the "Event: registration" header from Asterisk-generated
SIP REGISTER requests. rjain points out that RFC 3265 specifies
that the Event: header is not a valid header for REGISTER requests
and that the "registration" value is not defined at IANA.

(closes issue ASTERISK-11702)
Reported by: rjain
Patches:
     chan_sip.c.diff uploaded by rjain (license 226)


................
r110625 | oej | 2008-03-25 04:54:07 -0600 (Tue, 25 Mar 2008) | 6 lines

Use the "Server" header when responding to SIP requests.
(closes issue ASTERISK-11701)
Reported by: rjain
Patches:
     chan_sip.c.diff uploaded by rjain (license 226)

................
r110629 | file | 2008-03-25 08:39:45 -0600 (Tue, 25 Mar 2008) | 12 lines

Merged revisions 110628 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r110628 | file | 2008-03-25 11:37:35 -0300 (Tue, 25 Mar 2008) | 4 lines

Add an option (transmit_silence) which transmits silence during both Record() and DTMF generation. The reason this is an option is that in order to transmit silence we have to setup a translation path. This may not be needed/wanted in all cases.
(closes issue ASTERISK-9755)
Reported by: tracinet

........

................
r110631 | file | 2008-03-25 09:18:41 -0600 (Tue, 25 Mar 2008) | 4 lines

Add a special dialplan variable to chan_sip which will cause an audio file to be played upon completion of an attended transfer.
(closes issue ASTERISK-8972)
Reported by: sunder

................
r110636 | mmichelson | 2008-03-25 09:41:33 -0600 (Tue, 25 Mar 2008) | 15 lines

Merged revisions 110635 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r110635 | mmichelson | 2008-03-25 10:40:33 -0500 (Tue, 25 Mar 2008) | 7 lines

When reverting a commit, I accidentally left in this bit which was an experiment
to see what would happen. It passed the compile test, and I didn't notice I had
left this change in too.

So this is a revert of a revert...sort of.


........

................
r110639 | mmichelson | 2008-03-25 09:44:01 -0600 (Tue, 25 Mar 2008) | 3 lines

Oops here too. I need to stop coding for a while...


................
r110689 | tilghman | 2008-03-25 11:40:28 -0600 (Tue, 25 Mar 2008) | 6 lines

Update the sample configuration, to use Macro less (since it's now deprecated).
(closes issue ASTERISK-11716)
Reported by: pprindeville
Patches:
      bugid-0012293.1.6.patch uploaded by pprindeville (license 347)

................
r110691 | tilghman | 2008-03-25 11:46:34 -0600 (Tue, 25 Mar 2008) | 6 lines

Update sample configurations to make virtual hosting more obvious.
(closes issue ASTERISK-11414)
Reported by: pprindeville
Patches:
      acme-virtualpbx.1.6.patch uploaded by pprindeville (license 347)

................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=110694

By: Digium Subversion (svnbot) 2008-03-26 13:38:40

Repository: asterisk
Revision: 111017

_U  trunk/
U   trunk/channels/chan_iax2.c

------------------------------------------------------------------------
r111017 | file | 2008-03-26 13:38:38 -0500 (Wed, 26 Mar 2008) | 12 lines

Merged revisions 110628 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r110628 | file | 2008-03-25 11:37:35 -0300 (Tue, 25 Mar 2008) | 4 lines

Add an option (transmit_silence) which transmits silence during both Record() and DTMF generation. The reason this is an option is that in order to transmit silence we have to setup a translation path. This may not be needed/wanted in all cases.
(closes issue ASTERISK-9755)
Reported by: tracinet

........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=111017

By: Digium Subversion (svnbot) 2008-03-26 13:40:13

Repository: asterisk
Revision: 111018

_U  branches/1.6.0/
U   branches/1.6.0/channels/chan_iax2.c

------------------------------------------------------------------------
r111018 | file | 2008-03-26 13:40:11 -0500 (Wed, 26 Mar 2008) | 20 lines

Merged revisions 111017 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r111017 | file | 2008-03-26 15:42:52 -0300 (Wed, 26 Mar 2008) | 12 lines

Merged revisions 110628 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r110628 | file | 2008-03-25 11:37:35 -0300 (Tue, 25 Mar 2008) | 4 lines

Add an option (transmit_silence) which transmits silence during both Record() and DTMF generation. The reason this is an option is that in order to transmit silence we have to setup a translation path. This may not be needed/wanted in all cases.
(closes issue ASTERISK-9755)
Reported by: tracinet

........

................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=111018