From 5efdade8eb04ac6235d88f46d41403ff665d5a56 Mon Sep 17 00:00:00 2001 From: Joshua Colp Date: Fri, 23 Jan 2009 18:04:08 +0000 Subject: [PATCH] Use the on hold flag to see if the call is on hold or not. It is possible that our address for them will still be valid even though they are on hold. (closes issue #14295) Reported by: klaus3000 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@170504 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_sip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/channels/chan_sip.c b/channels/chan_sip.c index cc8fafed81..c906b9a7f3 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -16287,7 +16287,7 @@ restartsearch: /* Might be a timeout now -- see if we're on hold */ struct sockaddr_in sin; ast_rtp_get_peer(sip->rtp, &sin); - if (sin.sin_addr.s_addr || + if (!ast_test_flag(&sip->flags[1], SIP_PAGE2_CALL_ONHOLD) || (ast_rtp_get_rtpholdtimeout(sip->rtp) && (t > sip->lastrtprx + ast_rtp_get_rtpholdtimeout(sip->rtp)))) { /* Needs a hangup */