[Asterisk-Dev] rfc2833 DTMFs sent with bad timestamps (patch)

Frank van Dijk f.v.dijk at home.nl
Sat Feb 26 10:45:55 MST 2005


Hi

I ran into an issue with the way asterisk sends rfc2833 DTMF events. As 
my days of experience with asterisk can be counted on one hand I would 
like to hear your expert opinion on the attached patch that solves the 
problem for me, or maybe your opinion on other ways to solve the problem.

I ran into the issue using 1.0.3 on BSD, but looking at the latest rtp.c 
the issue is still there. I have an asterisk forwarding RTP streams 
between a cisco ISDN/VOIP gateway and an intel HMP. When a caller (in 
the PSTN) enters some DTMFs in quick succession, asterisk sends the 
digits without voice packets in between. That is ok, except that it 
re-uses the timestamp of the first digit for the following digits. The 
HMP box receives digits that claim to have occurred simultaneously and 
it ignores all but the first one. I've seen mention of this issue in 
some bug reports, but it seems the problem persists (CMIIW).

The cause of the issue is the fact that ast_rtp_senddigit() in rtp.c 
uses rtp->lastts as the timestamp. lastts is the timestamp of the latest 
voice packet. If no voice packets are sent, lastts does not change. The 
patch below uses (lastts + number of ms elapsed since then) as timestamp 
for sending DTMF events. The diff is against rtp.c from cvs-head.

thanks for your time.

-- 

mvrgr Frank van Dijk

-------------- next part --------------
A non-text attachment was scrubbed...
Name: rtp.c.diff
Type: text/x-patch
Size: 2028 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-dev/attachments/20050226/dfc4c77c/rtp.c.bin


More information about the asterisk-dev mailing list