Make sure we stop session timers as soon as we start hanging up an active call.
authorOlle Johansson <oej@edvina.net>
Thu, 3 Jul 2008 16:48:23 +0000 (16:48 +0000)
committerOlle Johansson <oej@edvina.net>
Thu, 3 Jul 2008 16:48:23 +0000 (16:48 +0000)
May fix issue 12919.

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

channels/chan_sip.c

index 6f5e263..1e5b927 100644 (file)
@@ -5111,6 +5111,10 @@ static int sip_hangup(struct ast_channel *ast)
                                p->invitestate = INV_TERMINATED;
                        }
                } else {        /* Call is in UP state, send BYE */
+                       if (p->stimer->st_active == TRUE) {
+                               stop_session_timer(p);
+                       }
+
                        if (!p->pendinginvite) {
                                struct ast_channel *bridge = ast_bridged_channel(oldowner);
                                char *audioqos = "";