[asterisk-commits] oej: trunk r43214 - /trunk/channels/chan_sip.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Sep 18 12:56:45 MST 2006


Author: oej
Date: Mon Sep 18 14:56:44 2006
New Revision: 43214

URL: http://svn.digium.com/view/asterisk?rev=43214&view=rev
Log:
Issue #7351 - sending CANCEL when the call at some point has been in UP state is wrong.

Modified:
    trunk/channels/chan_sip.c

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?rev=43214&r1=43213&r2=43214&view=diff
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Mon Sep 18 14:56:44 2006
@@ -3201,7 +3201,7 @@
 		return 0;
 	}
 	/* If the call is not UP, we need to send CANCEL instead of BYE */
-	if (ast->_state != AST_STATE_UP) {
+	if (ast->_state == AST_STATE_RING || ast->_state == AST_STATE_RINGING) {
 		needcancel = TRUE;
 		if (option_debug > 3)
 			ast_log(LOG_DEBUG, "Hanging up channel in state %s (not UP)\n", ast_state2str(ast->_state));
@@ -14172,6 +14172,7 @@
 			} 
 			check_pendings(p);
 		}
+		/* Got an ACK that we did not match. Ignore silently */
 		if (!p->lastinvite && ast_strlen_zero(p->randdata))
 			ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);	
 		break;



More information about the asterisk-commits mailing list