summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorcjack <cjack@yandex.ru>2016-06-16 01:10:11 +0300
committerEvgeniy Tsybra <cjack@yandex.ru>2016-08-15 07:21:42 -0500
commit93332cb1d0eea18021ea6538237297e627d6e2fc (patch)
tree0f610679fe1f7863266599fc0bf7b70f0b04eb1e /channels
parent03953d80346b3561305606f8509ab3ea2fa962a1 (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')
-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 77f438262..8f3296adf 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -8598,7 +8598,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)) {