[asterisk-bugs] [Asterisk 0014029]: Asterisk is using wrong clock frequency in text T140

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Dec 8 09:32:54 CST 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=14029 
====================================================================== 
Reported By:                epicac
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   14029
Category:                   Core/RTP
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
Asterisk Version:           SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2008-12-08 07:04 CST
Last Modified:              2008-12-08 09:32 CST
====================================================================== 
Summary:                    Asterisk is using wrong clock frequency in text T140
Description: 
Timestamp in text T140 (RFC 4103) is wrong. Asterisk transmits it with a
clock that runs 90000 ticks per second. In the SDP Asterisk declares that
it uses 1000 ticks per second.

The problem originates from function ast_rtp_raw_write in rtp.c. The clock
frequency for text is set to 90000 instead of 1000.
Probably this lines need to be changed and predictioncode for text needs
to be removed:
"rtp->lastts = rtp->lastts + ms * 90;"

Here is a month old patch
Index: vv/main/rtp.c
===================================================================
--- vv/main/rtp.c	(revision 152642)
+++ vv/main/rtp.c	(working copy)
@@ -3531,19 +3531,8 @@
 			}
 		}
 	} else {
-		pred = rtp->lastotexttimestamp + f->samples;
 		/* Re-calculate last TS */
-		rtp->lastts = rtp->lastts + ms * 90;
-		/* If it's close to our prediction, go for it */
-		if (ast_tvzero(f->delivery)) {
-			if (abs(rtp->lastts - pred) < 7200) {
-				rtp->lastts = pred;
-				rtp->lastotexttimestamp += f->samples;
-			} else {
-				ast_debug(3, "Difference is %d, ms is %d (%d), pred/ts/samples
%d/%d/%d\n", abs(rtp->lastts - pred), ms, ms * 90, rtp->lastts, pred,
f->samples);
-				rtp->lastotexttimestamp = rtp->lastts;
-			}
-		}
+		rtp->lastts = rtp->lastts + ms * 1;
 	}
 
 	/* If we have been explicitly told to set the marker bit do so */





====================================================================== 

---------------------------------------------------------------------- 
 (0095949) blitzrage (administrator) - 2008-12-08 09:32
 http://bugs.digium.com/view.php?id=14029#c95949 
---------------------------------------------------------------------- 
I've removed the inline patch from this bug as all patches need to be
uploaded in order to go through the licensing process. Could you re-upload
your patch to the tracker and submit a license disclaimer? Thanks! 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-12-08 09:32 blitzrage      Disclaimer on File?       => N/A             
2008-12-08 09:32 blitzrage      Note Added: 0095949                          
======================================================================




More information about the asterisk-bugs mailing list