summaryrefslogtreecommitdiff
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
authorcjack <cjack@yandex.ru>2016-06-16 01:10:11 +0300
committerMatt Jordan <mjordan@digium.com>2016-08-15 16:56:00 -0500
commit957df73301381771558f3025549b4862ae1bd988 (patch)
tree439dc3266e6e40e47caa8aefb4a6e440de2fb181 /channels/chan_sip.c
parent922b74169f9ac1cf83178fe24db656c5e516ef0a (diff)
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
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r--channels/chan_sip.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 5f422d72a..2c44208b4 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -8595,7 +8595,9 @@ static struct ast_frame *sip_read(struct ast_channel *ast)
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)) {