diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 7b3c2d8be6..59b5eb5451 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -21025,7 +21025,7 @@ static void check_rtp_timeout(struct sip_pvt *dialog, time_t t) /* Might be a timeout now -- see if we're on hold */ struct sockaddr_in sin; ast_rtp_get_peer(dialog->rtp, &sin); - if (sin.sin_addr.s_addr || (ast_rtp_get_rtpholdtimeout(dialog->rtp) && + if (!ast_test_flag(&dialog->flags[1], SIP_PAGE2_CALL_ONHOLD) || (ast_rtp_get_rtpholdtimeout(dialog->rtp) && (t > dialog->lastrtprx + ast_rtp_get_rtpholdtimeout(dialog->rtp)))) { /* Needs a hangup */ if (ast_rtp_get_rtptimeout(dialog->rtp)) {