[Asterisk-code-review] RTP: reset DTMF last seqno/timestamp on RTP renegotiation (asterisk[13])

Friendly Automation asteriskteam at digium.com
Mon Jan 14 08:01:01 CST 2019


Friendly Automation has submitted this change and it was merged. ( https://gerrit.asterisk.org/10829 )

Change subject: RTP: reset DTMF last seqno/timestamp on RTP renegotiation
......................................................................

RTP: reset DTMF last seqno/timestamp on RTP renegotiation

The remote side may start a new stream when renegotiating RTP.
Need to reset the DTMF last sequence number and the timestamp
of the last END packet on RTP renegotiation.

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 SPA5XX and codec g722.
On SIP session update the SPA50X resets stream and a new timestamp is twice
smaller then the previous.

ASTERISK-28162 #close

Change-Id: Ic72b4497e74d801b27a635559c1cf29c16c95254
---
M res/res_rtp_asterisk.c
1 file changed, 4 insertions(+), 0 deletions(-)

Approvals:
  Joshua C. Colp: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved
  Friendly Automation: Approved for Submit



diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c
index c0e9e63..77eba21 100644
--- a/res/res_rtp_asterisk.c
+++ b/res/res_rtp_asterisk.c
@@ -6042,6 +6042,10 @@
 		rtp->rtcp->local_addr_str = ast_strdup(ast_sockaddr_stringify(&local));
 	}
 
+	/* Need to reset the DTMF last sequence number and the timestamp of the last END packet */
+	rtp->last_seqno = 0;
+	rtp->last_end_timestamp = 0;
+
 	if (strictrtp && rtp->strict_rtp_state != STRICT_RTP_OPEN
 		&& !ast_sockaddr_isnull(addr) && ast_sockaddr_cmp(addr, &rtp->strict_rtp_address)) {
 		/* We only need to learn a new strict source address if we've been told the source is

-- 
To view, visit https://gerrit.asterisk.org/10829
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic72b4497e74d801b27a635559c1cf29c16c95254
Gerrit-Change-Number: 10829
Gerrit-PatchSet: 1
Gerrit-Owner: Alexei Gradinari <alex2grad at gmail.com>
Gerrit-Reviewer: Alexei Gradinari <alex2grad at gmail.com>
Gerrit-Reviewer: Friendly Automation (1000185)
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua C. Colp <jcolp at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190114/87730ccc/attachment.html>


More information about the asterisk-code-review mailing list