[asterisk-commits] chan sip: Fix lastrtprx always updated (asterisk[13])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Aug 16 08:23:49 CDT 2016
Anonymous Coward #1000019 has submitted this change and it was merged.
Change subject: chan_sip: Fix lastrtprx always updated
......................................................................
chan_sip: Fix lastrtprx always updated
Packets are read regulary, when there is no data in buffer fr->frametype
is AST_FRAME_NULL. There was no check of frametype and lastrtprx always
updated and, therefore, rtptimeout did not work at all.
ASTERISK-25270 #close
Change-Id: If3b5ca0dbb822582a86eb7d01dcae4e83448c41d
---
M channels/chan_sip.c
1 file changed, 3 insertions(+), 1 deletion(-)
Approvals:
Mark Michelson: Looks good to me, but someone else must approve
Anonymous Coward #1000019: Verified
Matt Jordan: Looks good to me, approved
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 77f4382..8f3296a 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -8598,7 +8598,9 @@
sip_pvt_lock(p);
fr = sip_rtp_read(ast, p, &faxdetected);
- p->lastrtprx = time(NULL);
+ if (fr && fr->frametype != AST_FRAME_NULL) {
+ p->lastrtprx = time(NULL);
+ }
/* If we detect a CNG tone and fax detection is enabled then send us off to the fax extension */
if (faxdetected && ast_test_flag(&p->flags[1], SIP_PAGE2_FAX_DETECT_CNG)) {
--
To view, visit https://gerrit.asterisk.org/3032
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If3b5ca0dbb822582a86eb7d01dcae4e83448c41d
Gerrit-PatchSet: 4
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Evgeniy Tsybra <cjack at yandex.ru>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Evgeniy Tsybra <cjack at yandex.ru>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>
More information about the asterisk-commits
mailing list