]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Move RTP timeout check to before bridged channel check so it is actually executed.
authorJoshua Colp <jcolp@digium.com>
Tue, 24 Jan 2012 16:30:36 +0000 (16:30 +0000)
committerJoshua Colp <jcolp@digium.com>
Tue, 24 Jan 2012 16:30:36 +0000 (16:30 +0000)
(issue ASTERISK-19179)
Reported by: TSAREGORODTSEV Yury

(closes issue ASTERISK-14534)
Reported by: kriborgen
Patches:
chan_sip.patch uploaded by kriborgen (license 6138)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@352287 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 8abcd610194c9211dd5cca9ac6a9e95fbc4c381d..911596c3efe11d100e37dd5f57a64f9d63d96863 100644 (file)
@@ -16842,6 +16842,9 @@ static int dialog_needdestroy(void *dialogobj, void *arg, int flags)
                return 0;
        }
 
+       /* Check RTP timeouts and kill calls if we have a timeout set and do not get RTP */
+       check_rtp_timeout(dialog, *t);
+
        /* We absolutely cannot destroy the rtp struct while a bridge is active or we WILL crash */
        if (dialog->rtp && ast_rtp_instance_get_bridged(dialog->rtp)) {
                ast_debug(2, "Bridge still active.  Delaying destroy of SIP dialog '%s' Method: %s\n", dialog->callid, sip_methods[dialog->method].text);
@@ -16855,9 +16858,6 @@ static int dialog_needdestroy(void *dialogobj, void *arg, int flags)
                return 0;
        }
 
-       /* Check RTP timeouts and kill calls if we have a timeout set and do not get RTP */
-       check_rtp_timeout(dialog, *t);
-
        /* If we have sessions that needs to be destroyed, do it now */
        /* Check if we have outstanding requests not responsed to or an active call
           - if that's the case, wait with destruction */