[Home]

Summary:ASTERISK-11581: RTP timestamp skewed
Reporter:jcomellas (jcomellas)Labels:
Date Opened:2008-03-05 11:57:45.000-0600Date Closed:2008-03-05 18:18:33.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Core/RTP
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) asterisk-1.4.18-rtp-skewed-timestamp-pcap.zip
( 1) asterisk-1.4.18-rtp-skewed-timestamp-summary.txt
( 2) asterisk-post-1.4.18-rtp-timestamp-skew.log.gz
Description:In SIP calls against PSTN numbers (through Level 3) we have detected that Asterisk sometimes sends RTP packets with skewed timestamps, causing audio drops. This issue is very similar to the one on ticket ASTERISK-10992, and was not corrected by the intended fix (r105674 and r104676). In our case it is not happening when the call is on hold, but when a call is answered. It is usually the originating caller the one that has the 4 second gap after the terminating caller answers the phone.


****** ADDITIONAL INFORMATION ******

I'm attaching a packet capture that shows the problem. Asterisk is on IP 66.150.122.38 and the other party on IP 63.215.27.55. It you open it in Wireshark, use the filter "(ip.addr eq 63.215.27.55)" and go to packet 4095, from 66.150.122.38 to 63.215.27.55 (seq 64532), you'll see a packet with the following values:

4095 14.421503 66.150.122.38 63.215.27.55 RTP PT=ITU-T G.711 PCMU, SSRC=0x33B3275B, Seq=64532, Time=62080

The next packet coming from Asterisk is number 4177 with the following data:

4177 14.535087 66.150.122.38 63.215.27.55 RTP PT=ITU-T G.711 PCMU, SSRC=0x33B3275B, Seq=64533, Time=4083932920

Comparing the timestamps between this last packet and the preceding one you'll see that there is a big difference between them, whereas the difference should have only been 160. The fix for ticket ASTERISK-10992 tried to solve the problem by altering the SSRC for the packets. In this case we see that the SSRC for both packets is the same, so the code that was added for the fix is not being executed in this case.
Comments:By: jcomellas (jcomellas) 2008-03-05 12:01:41.000-0600

I was asked by file yesterday if I was seeing a message with the string "Packet2Packet" in the log. I set the debug and verbose levels to 9 and did not see it when the audio drop happened.

By: Joshua C. Colp (jcolp) 2008-03-05 12:22:17.000-0600

It would still be useful to see the complete console output.

By: jcomellas (jcomellas) 2008-03-05 12:33:32.000-0600

That's going to be trickier. I'll try to get it for you.

By: jcomellas (jcomellas) 2008-03-05 15:27:23.000-0600

I've uploaded a file with an excerpt of the log of one of our servers where a call failed, but I don't see much information from the rtp.c source file that might help. Maybe you can find something else. If you need me to recompile adding log output to the server I can do it.

Also, we use a custom Asterisk application, but internally it generally ends up calling normal Asterisk applications.

By: Digium Subversion (svnbot) 2008-03-05 16:28:21.000-0600

Repository: asterisk
Revision: 106235

U   branches/1.4/apps/app_dial.c
U   branches/1.4/apps/app_followme.c
U   branches/1.4/channels/chan_alsa.c
U   branches/1.4/channels/chan_h323.c
U   branches/1.4/channels/chan_mgcp.c
U   branches/1.4/channels/chan_oss.c
U   branches/1.4/channels/chan_phone.c
U   branches/1.4/channels/chan_sip.c
U   branches/1.4/channels/chan_skinny.c
U   branches/1.4/channels/chan_zap.c
U   branches/1.4/include/asterisk/frame.h
U   branches/1.4/main/channel.c
U   branches/1.4/main/dial.c
U   branches/1.4/main/file.c
U   branches/1.4/main/rtp.c

------------------------------------------------------------------------
r106235 | file | 2008-03-05 16:28:20 -0600 (Wed, 05 Mar 2008) | 4 lines

Add a control frame to indicate the source of media has changed. Depending on the underlying technology it may need to change some things.
(closes issue ASTERISK-11581)
Reported by: jcomellas

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

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

By: Digium Subversion (svnbot) 2008-03-05 16:39:37.000-0600

Repository: asterisk
Revision: 106239

_U  trunk/
U   trunk/apps/app_dial.c
U   trunk/apps/app_followme.c
U   trunk/channels/chan_alsa.c
U   trunk/channels/chan_console.c
U   trunk/channels/chan_h323.c
U   trunk/channels/chan_mgcp.c
U   trunk/channels/chan_oss.c
U   trunk/channels/chan_phone.c
U   trunk/channels/chan_sip.c
U   trunk/channels/chan_skinny.c
U   trunk/channels/chan_unistim.c
U   trunk/channels/chan_zap.c
U   trunk/include/asterisk/frame.h
U   trunk/main/channel.c
U   trunk/main/dial.c
U   trunk/main/file.c
U   trunk/main/rtp.c

------------------------------------------------------------------------
r106239 | file | 2008-03-05 16:39:36 -0600 (Wed, 05 Mar 2008) | 12 lines

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

........
r106235 | file | 2008-03-05 18:32:10 -0400 (Wed, 05 Mar 2008) | 4 lines

Add a control frame to indicate the source of media has changed. Depending on the underlying technology it may need to change some things.
(closes issue ASTERISK-11581)
Reported by: jcomellas

........

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

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

By: Digium Subversion (svnbot) 2008-03-05 18:18:33.000-0600

Repository: asterisk
Revision: 106318

_U  branches/1.6.0/
U   branches/1.6.0/apps/app_dial.c
U   branches/1.6.0/apps/app_followme.c
U   branches/1.6.0/channels/chan_alsa.c
U   branches/1.6.0/channels/chan_console.c
U   branches/1.6.0/channels/chan_h323.c
U   branches/1.6.0/channels/chan_mgcp.c
U   branches/1.6.0/channels/chan_oss.c
U   branches/1.6.0/channels/chan_phone.c
U   branches/1.6.0/channels/chan_sip.c
U   branches/1.6.0/channels/chan_skinny.c
U   branches/1.6.0/channels/chan_unistim.c
U   branches/1.6.0/channels/chan_zap.c
U   branches/1.6.0/include/asterisk/frame.h
U   branches/1.6.0/main/channel.c
U   branches/1.6.0/main/dial.c
U   branches/1.6.0/main/file.c
U   branches/1.6.0/main/rtp.c

------------------------------------------------------------------------
r106318 | russell | 2008-03-05 18:18:33 -0600 (Wed, 05 Mar 2008) | 20 lines

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

................
r106239 | file | 2008-03-05 16:43:22 -0600 (Wed, 05 Mar 2008) | 12 lines

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

........
r106235 | file | 2008-03-05 18:32:10 -0400 (Wed, 05 Mar 2008) | 4 lines

Add a control frame to indicate the source of media has changed. Depending on the underlying technology it may need to change some things.
(closes issue ASTERISK-11581)
Reported by: jcomellas

........

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

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

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