[asterisk-commits] file: branch 1.6.0 r162206 - in /branches/1.6.0:	./ main/rtp.c
    SVN commits to the Asterisk project 
    asterisk-commits at lists.digium.com
       
    Tue Dec  9 13:50:40 CST 2008
    
    
  
Author: file
Date: Tue Dec  9 13:50:39 2008
New Revision: 162206
URL: http://svn.digium.com/view/asterisk?view=rev&rev=162206
Log:
Merged revisions 162205 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk
................
  r162205 | file | 2008-12-09 15:48:35 -0400 (Tue, 09 Dec 2008) | 14 lines
  
  Merged revisions 162204 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r162204 | file | 2008-12-09 15:47:07 -0400 (Tue, 09 Dec 2008) | 7 lines
    
    Make sure that the timestamp for DTMF is not the same as the previous voice frame and do not send audio when transmitting DTMF as this confuses some equipment.
    (closes issue #13209)
    Reported by: ip-rob
    Patches:
          13209.diff uploaded by file (license 11)
    Tested by: ip-rob, bujones
  ........
................
Modified:
    branches/1.6.0/   (props changed)
    branches/1.6.0/main/rtp.c
Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.
Modified: branches/1.6.0/main/rtp.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/main/rtp.c?view=diff&rev=162206&r1=162205&r2=162206
==============================================================================
--- branches/1.6.0/main/rtp.c (original)
+++ branches/1.6.0/main/rtp.c Tue Dec  9 13:50:39 2008
@@ -2574,6 +2574,7 @@
 
 	rtp->dtmfmute = ast_tvadd(ast_tvnow(), ast_tv(0, 500000));
 	rtp->send_duration = 160;
+	rtp->lastdigitts = rtp->lastts + rtp->send_duration;
 	
 	/* Get a pointer to the header */
 	rtpheader = (unsigned int *)data;
@@ -2693,10 +2694,9 @@
 				    ast_inet_ntoa(rtp->them.sin_addr),
 				    ntohs(rtp->them.sin_port), rtp->send_payload, rtp->seqno, rtp->lastdigitts, res - hdrlen);
 	}
+	rtp->lastts += rtp->send_duration;
 	rtp->sending_digit = 0;
 	rtp->send_digit = 0;
-	/* Increment lastdigitts */
-	rtp->lastdigitts += 960;
 	rtp->seqno++;
 
 	return res;
@@ -3003,6 +3003,10 @@
 	unsigned int ms;
 	int pred;
 	int mark = 0;
+
+	if (rtp->sending_digit) {
+		return 0;
+	}
 
 	ms = calc_txstamp(rtp, &f->delivery);
 	/* Default prediction */
    
    
More information about the asterisk-commits
mailing list