[asterisk-bugs] [Asterisk 0019179]: DTMF transmission does not meet the recommendations of the rfc2833(4733).

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Apr 26 08:09:17 CDT 2011


The following issue has been set as RELATED TO issue 0012983. 
====================================================================== 
https://issues.asterisk.org/view.php?id=19179 
====================================================================== 
Reported By:                muhlik
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   19179
Category:                   Core/RTP
Reproducibility:            always
Severity:                   trivial
Priority:                   normal
Status:                     new
Asterisk Version:           1.8.3.3 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2011-04-25 08:51 CDT
Last Modified:              2011-04-26 08:09 CDT
====================================================================== 
Summary:                    DTMF transmission does not meet the recommendations
of the rfc2833(4733).
Description: 
According to rfc4733:

Network Working Group                                     H. Schulzrinne
Request for Comments: 4733                                   Columbia U.
Obsoletes: 2833                                                T. Taylor
Category: Standards Track                                         Nortel
                                                           December 2006
2.5.1.6.  RTP Sequence Number

   The RTP sequence number MUST be incremented by one in each successive
   RTP packet sent.  Incrementing applies to retransmitted as well as
   initial instances of event reports, to permit the receiver to detect
   lost packets for RTP Control Protocol (RTCP) receiver reports.


We can see in res_rtp_asterisk.c
644: static int ast_rtp_dtmf_end_with_duration(struct ast_rtp_instance
*instance, char digit, unsigned int duration)
...
692:	for (i = 0; i < 3; i++) {
693:		res = rtp_sendto(instance, (void *) rtpheader, hdrlen + 4, 0,
&remote_address);
694:		if (res < 0) {
695:			ast_log(LOG_ERROR, "RTP Transmission error to %s: %s\n",
696:				ast_sockaddr_stringify(&remote_address),
				strerror(errno));
698:		}
699:		if (rtp_debug_test_addr(&remote_address)) {
700:			ast_verbose("Sent RTP DTMF packet to %s (type %-2.2d, seq %-6.6u,
ts %-6.6u, len %-6.6u)\n",
701:				    ast_sockaddr_stringify(&remote_address),
702:				    rtp->send_payload, rtp->seqno, rtp->lastdigitts, res -
hdrlen);
703:		}
704:	}

in this function rtp->seqno++ is absent

In 1.6.2.17.3 version * in file rtp.c:
3295: int ast_rtp_senddigit_end_with_duration(struct ast_rtp *rtp, char
digit, unsigned int duration)
...
3336:	for (i = 0; i < 3; i++) {
3337:		rtpheader[0] = htonl((2 << 30) | (rtp->send_payload << 16) |
(rtp->seqno));
3338:		res = sendto(rtp->s, (void *) rtpheader, hdrlen + 4, 0, (struct
sockaddr *) &rtp->them, sizeof(rtp->them));
3339:		rtp->seqno++;
3340:		if (res < 0)
3341:			ast_log(LOG_ERROR, "RTP Transmission error to %s:%d: %s\n",
3342:				ast_inet_ntoa(rtp->them.sin_addr),
3343:				ntohs(rtp->them.sin_port), strerror(errno));
3344:		if (rtp_debug_test_addr(&rtp->them))
3345:			ast_verbose("Sent RTP DTMF packet to %s:%u (type %-2.2d, seq
%-6.6u, ts %-6.6u, len %-6.6u)\n",
3346:				    ast_inet_ntoa(rtp->them.sin_addr),
3347:				    ntohs(rtp->them.sin_port), rtp->send_payload, rtp->seqno,
rtp->lastdigitts, res - hdrlen);
3348:	}

Some SIP-gateway work incorrectly in this situation. If you are using
Dial() with option D(some_number), SIP-gateway taking only the first tone.
======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
related to          0012983 [patch] Retransmitted RFC 2833 RTP even...
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-04-26 08:09 lmadsen        Relationship added       related to 0012983  
======================================================================




More information about the asterisk-bugs mailing list