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

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Apr 7 07:42:29 MST 2006


Author: oej
Date: Fri Apr  7 09:42:25 2006
New Revision: 18262

URL: http://svn.digium.com/view/asterisk?rev=18262&view=rev
Log:
- Add cause code for format error
- Change to SWITCH_CONGESTION instead of CONGESTION
(imported from 1.2)

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

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

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?rev=18262&r1=18261&r2=18262&view=diff
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Fri Apr  7 09:42:25 2006
@@ -12116,18 +12116,19 @@
 	oldformat = format;
 	if ((format &= ((AST_FORMAT_MAX_AUDIO << 1) - 1))) {
 		ast_log(LOG_NOTICE, "Asked to get a channel of unsupported format %s while capability is %s\n", ast_getformatname(oldformat), ast_getformatname(global_capability));
+		*cause = AST_CAUSE_BEARERCAPABILITY_NOTAVAIL;	/* Can't find codec to connect to host */
 		return NULL;
 	}
 	if (!(p = sip_alloc(NULL, NULL, 0, SIP_INVITE))) {
 		ast_log(LOG_ERROR, "Unable to build sip pvt data for '%s' (Out of memory)\n", (char *)data);
-		*cause = AST_CAUSE_CONGESTION;
+		*cause = AST_CAUSE_SWITCH_CONGESTION;
 		return NULL;
 	}
 
 	if (!(p->options = ast_calloc(1, sizeof(*p->options)))) {
 		sip_destroy(p);
 		ast_log(LOG_ERROR, "Unable to build option SIP data structure - Out of memory\n");
-		*cause = AST_CAUSE_CONGESTION;
+		*cause = AST_CAUSE_SWITCH_CONGESTION;
 		return NULL;
 	}
 



More information about the asterisk-commits mailing list