[asterisk-commits] branch oej/test-this-branch r12574 - in /team/oej/test-this-branch: ./ channels/

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Sun Mar 12 10:29:23 MST 2006


Author: oej
Date: Sun Mar 12 11:29:20 2006
New Revision: 12574

URL: http://svn.digium.com/view/asterisk?rev=12574&view=rev
Log:
update to trunk

Modified:
    team/oej/test-this-branch/   (props changed)
    team/oej/test-this-branch/channels/chan_sip.c

Propchange: team/oej/test-this-branch/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Sun Mar 12 11:29:20 2006
@@ -1,1 +1,1 @@
-/trunk:1-12545
+/trunk:1-12571

Modified: team/oej/test-this-branch/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/channels/chan_sip.c?rev=12574&r1=12573&r2=12574&view=diff
==============================================================================
--- team/oej/test-this-branch/channels/chan_sip.c (original)
+++ team/oej/test-this-branch/channels/chan_sip.c Sun Mar 12 11:29:20 2006
@@ -2994,6 +2994,7 @@
 	if (state != AST_STATE_DOWN) {
 		if (ast_pbx_start(tmp)) {
 			ast_log(LOG_WARNING, "Unable to start PBX on %s\n", tmp->name);
+			tmp->hangupcause = AST_CAUSE_SWITCH_CONGESTION;
 			ast_hangup(tmp);
 			tmp = NULL;
 		}
@@ -10357,8 +10358,10 @@
 	chan2m = ast_channel_alloc(0);
 	if ((!chan2m) || (!chan1m)) {
 		if (chan1m)
+			chan1m->hangupcause = AST_CAUSE_SWITCH_CONGESTION;
 			ast_hangup(chan1m);
 		if (chan2m)
+			chan2m->hangupcause = AST_CAUSE_SWITCH_CONGESTION;
 			ast_hangup(chan2m);
 		return -1;
 	}
@@ -10387,6 +10390,7 @@
 	if (ast_do_masquerade(chan2m)) {
 		ast_log(LOG_WARNING, "Masquerade failed :(\n");
 		ast_mutex_unlock(&chan2m->lock);
+		chan2m->hangupcause = AST_CAUSE_SWITCH_CONGESTION;
 		ast_hangup(chan2m);
 		return -1;
 	}
@@ -10719,7 +10723,6 @@
 				}
 
 				if (res) {
-					ast_log(LOG_WARNING, "Failed to start PBX :(\n");
 					/* Unlock locks so ast_hangup can do its magic */
 					ast_mutex_unlock(&c->lock);
 					ast_mutex_unlock(&p->lock);
@@ -10738,12 +10741,14 @@
 					ast_set_flag(p, SIP_ALREADYGONE);	
 					/* Unlock locks so ast_hangup can do its magic */
 					ast_mutex_unlock(&p->lock);
+					c->hangupcause = AST_CAUSE_CALL_REJECTED;
 					ast_hangup(c);
 					ast_mutex_lock(&p->lock);
 					c = NULL;
 				} else {
 					ast_mutex_unlock(&p->lock);
 					ast_setstate(c, AST_STATE_DOWN);
+					c->hangupcause = AST_CAUSE_NORMAL_CLEARING;
 					ast_hangup(c);
 					ast_mutex_lock(&p->lock);
 					c = NULL;



More information about the asterisk-commits mailing list