diff options
author | cjack <cjack@yandex.ru> | 2016-06-16 01:10:11 +0300 |
---|---|---|
committer | Matt Jordan <mjordan@digium.com> | 2016-08-15 16:55:54 -0500 |
commit | 19e323a6aa4d538b73e33ea77683ae25b2ae3957 (patch) | |
tree | a263b337185a6975934ebce09b2ad41e9c1197a7 /channels/chan_sip.c | |
parent | 2ce487585ea78837dc37529ce0f108ca16cb51fd (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.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 6913a039b..af7d3a550 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -8604,7 +8604,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)) { |