[Asterisk-code-review] RTP: need to reset DTMF last seqno/timestamp on voice packet... (asterisk[master])
Joshua Colp
asteriskteam at digium.com
Mon Nov 26 13:47:33 CST 2018
Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/10705 )
Change subject: RTP: need to reset DTMF last seqno/timestamp on voice packet with marker bit
......................................................................
RTP: need to reset DTMF last seqno/timestamp on voice packet with marker bit
The marker bit set on the voice packet indicates the start
of a new stream and a new time stamp.
Need to reset the DTMF last sequence number and the timestamp
of the last END packet.
If the new time stamp is lower then the timestamp of the last DTMF END packet
the asterisk drops all DTMF frames as out of order.
This bug was caught using Cisco ip-phone SPA50X and codec g722.
On SIP session update the SPA50X resets stream indicating it with market bit
and a new timestamp is twice smaller then the previous.
ASTERISK-28162 #close
Change-Id: If9c5742158fa836ad549713a9814d46a5d2b1620
---
M res/res_rtp_asterisk.c
1 file changed, 10 insertions(+), 0 deletions(-)
Approvals:
Joshua Colp: Looks good to me, but someone else must approve; Approved for Submit
George Joseph: Looks good to me, approved
diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c
index 465f9bc..ff8e453 100644
--- a/res/res_rtp_asterisk.c
+++ b/res/res_rtp_asterisk.c
@@ -6438,6 +6438,16 @@
switch (ast_format_get_type(rtp->f.subclass.format)) {
case AST_MEDIA_TYPE_AUDIO:
rtp->f.frametype = AST_FRAME_VOICE;
+
+ /* The marker bit set on the voice packet indicates the start
+ * of a new stream and a new time stamp. Need to reset the DTMF
+ * last sequence number and the timestamp of the last END packet.
+ */
+ if (mark) {
+ rtp->last_seqno = 0;
+ rtp->last_end_timestamp = 0;
+ }
+
break;
case AST_MEDIA_TYPE_VIDEO:
rtp->f.frametype = AST_FRAME_VIDEO;
--
To view, visit https://gerrit.asterisk.org/10705
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: If9c5742158fa836ad549713a9814d46a5d2b1620
Gerrit-Change-Number: 10705
Gerrit-PatchSet: 1
Gerrit-Owner: Alexei Gradinari <alex2grad at gmail.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2 (1000185)
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20181126/6c281734/attachment-0001.html>
More information about the asterisk-code-review
mailing list