]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Issue #5937 - Make sure SIP CANCEL's are re-transmitted
authorOlle Johansson <oej@edvina.net>
Fri, 10 Mar 2006 12:13:51 +0000 (12:13 +0000)
committerOlle Johansson <oej@edvina.net>
Fri, 10 Mar 2006 12:13:51 +0000 (12:13 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@12495 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 4563b68b6c5f0caccefbd2e3b3aa62593df78516..dba901c5ea8f80b63e7ece7ec973b71fea52c294 100644 (file)
@@ -2447,13 +2447,15 @@ static int sip_hangup(struct ast_channel *ast)
        if (!ast_test_flag(p, SIP_ALREADYGONE) && !ast_strlen_zero(p->initreq.data)) {
                if (needcancel) {       /* Outgoing call, not up */
                        if (ast_test_flag(p, SIP_OUTGOING)) {
+                               /* stop retransmitting an INVITE that has not received a response */
+                               __sip_pretend_ack(p);
+
+                               /* Send a new request: CANCEL */
                                transmit_request_with_auth(p, SIP_CANCEL, p->ocseq, 1, 0);
                                /* Actually don't destroy us yet, wait for the 487 on our original 
                                   INVITE, but do set an autodestruct just in case we never get it. */
                                ast_clear_flag(&locflags, SIP_NEEDDESTROY);
-                               sip_scheddestroy(p, 15000);
-                               /* stop retransmitting an INVITE that has not received a response */
-                               __sip_pretend_ack(p);
+                               sip_scheddestroy(p, 32000);
                                if ( p->initid != -1 ) {
                                        /* channel still up - reverse dec of inUse counter
                                           only if the channel is not auto-congested */