[asterisk-commits] oej: branch oej/teapot-1.8 r392265 - /team/oej/teapot-1.8/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jun 19 11:17:58 CDT 2013


Author: oej
Date: Wed Jun 19 11:17:56 2013
New Revision: 392265

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=392265
Log:
All CONGESTIONs are not 503s. Sorry SIP2ISDN.

Modified:
    team/oej/teapot-1.8/channels/chan_sip.c

Modified: team/oej/teapot-1.8/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/teapot-1.8/channels/chan_sip.c?view=diff&rev=392265&r1=392264&r2=392265
==============================================================================
--- team/oej/teapot-1.8/channels/chan_sip.c (original)
+++ team/oej/teapot-1.8/channels/chan_sip.c Wed Jun 19 11:17:56 2013
@@ -7187,7 +7187,15 @@
 		break;
 	case AST_CONTROL_CONGESTION:
 		if (ast->_state != AST_STATE_UP) {
-			transmit_response_reliable(p, "503 Service Unavailable", &p->initreq);
+			const char *res;
+			if (p->owner) {
+                		p->hangupcause = p->owner->hangupcause;
+			}
+			if (p->hangupcause && (res = hangup_cause2sip(p->hangupcause))) {
+				transmit_response_reliable(p, res, &p->initreq);
+			} else {
+				transmit_response_reliable(p, "503 Service Unavailable", &p->initreq);
+			}
 			p->invitestate = INV_COMPLETED;
 			sip_alreadygone(p);
 			ast_softhangup_nolock(ast, AST_SOFTHANGUP_DEV);




More information about the asterisk-commits mailing list