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 */