Don't consider RTP timeout if the channel isn't up
authorMark Spencer <markster@digium.com>
Thu, 9 Sep 2004 01:33:17 +0000 (01:33 +0000)
committerMark Spencer <markster@digium.com>
Thu, 9 Sep 2004 01:33:17 +0000 (01:33 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3747 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index c14fd44..502ca60 100755 (executable)
@@ -7650,7 +7650,7 @@ restartsearch:
                sip = iflist;
                while(sip) {
                        ast_mutex_lock(&sip->lock);
-                       if (sip->rtp && sip->lastrtprx && (sip->rtptimeout || sip->rtpholdtimeout) && !sip->redirip.sin_addr.s_addr) {
+                       if (sip->rtp && sip->owner && (sip->owner->_state == AST_STATE_UP) && sip->lastrtprx && (sip->rtptimeout || sip->rtpholdtimeout) && !sip->redirip.sin_addr.s_addr) {
                                if (t > sip->lastrtprx + sip->rtptimeout) {
                                        /* Might be a timeout now -- see if we're on hold */
                                        struct sockaddr_in sin;