[asterisk-commits] trunk r26757 - /trunk/channels/chan_sip.c
    asterisk-commits at lists.digium.com 
    asterisk-commits at lists.digium.com
       
    Thu May 11 01:25:20 MST 2006
    
    
  
Author: oej
Date: Thu May 11 03:25:20 2006
New Revision: 26757
URL: http://svn.digium.com/view/asterisk?rev=26757&view=rev
Log:
Ignore CANCEL on call that is already answered
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=26757&r1=26756&r2=26757&view=diff
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Thu May 11 03:25:20 2006
@@ -11436,6 +11436,14 @@
 		
 	check_via(p, req);
 	ast_set_flag(&p->flags[0], SIP_ALREADYGONE);	
+	
+	if (p->owner && p->owner->_state == AST_STATE_UP) {
+		/* This call is up, cancel is ignored, we need a bye */
+		transmit_response(p, "200 OK", req);
+		if (option_debug)
+			ast_log(LOG_DEBUG, "Got CANCEL on an answered call. Ignoring... \n");
+		return 0;
+	}
 	if (p->rtp) {
 		/* Immediately stop RTP */
 		ast_rtp_stop(p->rtp);
    
    
More information about the asterisk-commits
mailing list