[Asterisk-code-review] res rtp asterisk.c: Check for first DTMF having timestamp set to 0 (asterisk[13])

Joshua Colp asteriskteam at digium.com
Tue Apr 14 10:49:49 CDT 2020


Joshua Colp has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/14141 )

Change subject: res_rtp_asterisk.c: Check for first DTMF having timestamp set to 0
......................................................................

res_rtp_asterisk.c: Check for first DTMF having timestamp set to 0

When the first DTMF receive in RF2833 codec have TimeStamp at 0
is not processed.

ASTERISK-28812

Change-Id: I3196803a062dd2daee4938c9a778c3810cb7e504
---
M res/res_rtp_asterisk.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Joshua Colp: Looks good to me, but someone else must approve; Approved for Submit
  Benjamin Keith Ford: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved



diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c
index 1cd0366..9e5f04b 100644
--- a/res/res_rtp_asterisk.c
+++ b/res/res_rtp_asterisk.c
@@ -4579,7 +4579,7 @@
 
 		if (event_end & 0x80) {
 			/* End event */
-			if ((rtp->last_seqno != seqno) && (timestamp > rtp->last_end_timestamp)) {
+			if ((rtp->last_seqno != seqno) && ((timestamp > rtp->last_end_timestamp) || ((timestamp == 0) && (rtp->last_end_timestamp == 0)))) {
 				rtp->last_end_timestamp = timestamp;
 				rtp->dtmf_duration = new_duration;
 				rtp->resp = resp;

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

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Change-Id: I3196803a062dd2daee4938c9a778c3810cb7e504
Gerrit-Change-Number: 14141
Gerrit-PatchSet: 4
Gerrit-Owner: Bernard Merindol <bernard.merindol at telnowedge.com>
Gerrit-Reviewer: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-CC: Alexei Gradinari <alex2grad at gmail.com>
Gerrit-CC: Sean Bright <sean.bright at gmail.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200414/b284d36c/attachment.html>


More information about the asterisk-code-review mailing list