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

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Nov 10 14:55:31 MST 2006


Author: oej
Date: Fri Nov 10 15:55:31 2006
New Revision: 47477

URL: http://svn.digium.com/view/asterisk?view=rev&rev=47477
Log:
Add some history and fix some debug output for autodestruct.

Modified:
    trunk/   (props changed)
    trunk/channels/chan_sip.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=47477&r1=47476&r2=47477
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Fri Nov 10 15:55:31 2006
@@ -2012,9 +2012,6 @@
 	/* Reset schedule ID */
 	p->autokillid = -1;
 
-	if (option_debug)
-		ast_log(LOG_DEBUG, "Auto destroying SIP dialog '%s'\n", p->callid);
-	append_history(p, "AutoDestroy", "%s", p->callid);
 	if (p->owner) {
 		ast_log(LOG_WARNING, "Autodestruct on dialog '%s' with owner in place (Method: %s)\n", p->callid, sip_methods[p->method].text);
 		ast_queue_hangup(p->owner);
@@ -2022,8 +2019,14 @@
 		if (option_debug > 2)
 			ast_log(LOG_DEBUG, "Finally hanging up channel after transfer: %s\n", p->callid);
 		transmit_request_with_auth(p, SIP_BYE, 0, XMIT_RELIABLE, 1);
-	} else 
-		sip_destroy(p);
+		append_history(p, "ReferBYE", "Sending BYE on transferer call leg %s", p->callid);
+		sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
+	} else {
+		append_history(p, "AutoDestroy", "%s", p->callid);
+		if (option_debug)
+			ast_log(LOG_DEBUG, "Auto destroying SIP dialog '%s'\n", p->callid);
+		sip_destroy(p);		/* Go ahead and destroy dialog. All attempts to recover is done */
+	}
 	return 0;
 }
 



More information about the asterisk-commits mailing list