[Home]

Summary:ASTERISK-28303: res_rtp_asterisk: Interaction between smoother and DTMF can cause out of order timestamps
Reporter:Torrey Searle (tsearle)Labels:
Date Opened:2019-02-25 09:29:30.000-0600Date Closed:2019-02-28 05:46:23.000-0600
Priority:MajorRegression?
Status:Closed/CompleteComponents:Resources/res_rtp_asterisk
Versions:13.20.0 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) full.txt
( 1) timestamp_issue.tgz
( 2) wrong_timestamp.pcap.pcapng
Description:When the smoother is non-empty, it infers the delivery time based on the number of samples removed from it.

However while a dtmf (RFC4744) is being generated, no samples are being removed from the smoother, so it's delivery timestamp falls behind current time.

When the next dtmf is being generated, this triggers a large jump forward in time in calc_txstamp as the dtmf functions use now() instead of delivery time.  This causes a jump forward in rtp timestamps of audio packets w/o timing info (the ones generated by the smoother).

However once the smoother becomes empty again, then timing will get passed once more from the calling leg to the called leg, and the above issue will manifest itself as a jump backwards in rtp timestamps
Comments:By: Asterisk Team (asteriskteam) 2019-02-25 09:29:31.451-0600

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

By: Torrey Searle (tsearle) 2019-02-25 09:31:16.576-0600

In the attached pcap, the rtp timestamp issue can be found at the following location


[RFC4733_DTMF_VALIDATOR:109]Bad RTP packet,Decreasing packet timestamp, previous packet had timestamp [1196633088]

[RFC4733_DTMF_VALIDATOR:110]Error detected for packet [1551107834.469102 RTP len=172 from=127.0.0.1:10120 v=2 p=0 x=0 cc=0 m=0 pt=8 (PCMA,1,8000) seq=18207 ts=1196249368 ssrc=0x5bbee653


By: Friendly Automation (friendly-automation) 2019-02-28 05:46:24.563-0600

Change 11043 merged by Friendly Automation:
res/res_rtp_asterisk: smoother can cause wrong timestamps if dtmf happen

[https://gerrit.asterisk.org/c/asterisk/+/11043|https://gerrit.asterisk.org/c/asterisk/+/11043]

By: Friendly Automation (friendly-automation) 2019-02-28 05:50:10.486-0600

Change 11042 merged by Joshua Colp:
res/res_rtp_asterisk: smoother can cause wrong timestamps if dtmf happen

[https://gerrit.asterisk.org/c/asterisk/+/11042|https://gerrit.asterisk.org/c/asterisk/+/11042]

By: Friendly Automation (friendly-automation) 2019-02-28 06:07:59.080-0600

Change 11038 merged by Joshua Colp:
res/res_rtp_asterisk: smoother can cause wrong timestamps if dtmf happen

[https://gerrit.asterisk.org/c/asterisk/+/11038|https://gerrit.asterisk.org/c/asterisk/+/11038]