[asterisk-commits] trunk - r7783 /trunk/channels/chan_sip.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Jan 4 07:07:37 CST 2006


Author: oej
Date: Wed Jan  4 07:07:34 2006
New Revision: 7783

URL: http://svn.digium.com/view/asterisk?rev=7783&view=rev
Log:
Issue #5824: Adding more SIP to ISDN Cause code conversions. Thanks mguesdon!

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=7783&r1=7782&r2=7783&view=diff
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Wed Jan  4 07:07:34 2006
@@ -2280,21 +2280,54 @@
 /* Possible values taken from causes.h */
 
 	switch(cause) {
-		case 603:	/* Declined */
+		case 401:	/* Unauthorized */
+			return AST_CAUSE_CALL_REJECTED;
 		case 403:	/* Not found */
 			return AST_CAUSE_CALL_REJECTED;
 		case 404:	/* Not found */
 			return AST_CAUSE_UNALLOCATED;
+		case 405:	/* Method not allowed */
+			return AST_CAUSE_INTERWORKING;
+		case 407:	/* Proxy authentication required */
+			return AST_CAUSE_CALL_REJECTED;
 		case 408:	/* No reaction */
 			return AST_CAUSE_NO_USER_RESPONSE;
+		case 409:	/* Conflict */
+			return AST_CAUSE_NORMAL_TEMPORARY_FAILURE;
+		case 410:	/* Gone */
+			return AST_CAUSE_UNALLOCATED;
+		case 411:	/* Length required */
+			return AST_CAUSE_INTERWORKING;
+		case 413:	/* Request entity too large */
+			return AST_CAUSE_INTERWORKING;
+		case 414:	/* Request URI too large */
+			return AST_CAUSE_INTERWORKING;
+		case 415:	/* Unsupported media type */
+			return AST_CAUSE_INTERWORKING;
+		case 420:	/* Bad extension */
+			return AST_CAUSE_NO_ROUTE_DESTINATION;
 		case 480:	/* No answer */
 			return AST_CAUSE_FAILURE;
+		case 481:	/* No answer */
+			return AST_CAUSE_INTERWORKING;
+		case 482:	/* Loop detected */
+			return AST_CAUSE_INTERWORKING;
 		case 483:	/* Too many hops */
 			return AST_CAUSE_NO_ANSWER;
+		case 484:	/* Address incomplete */
+			return AST_CAUSE_INVALID_NUMBER_FORMAT;
+		case 485:	/* Ambigous */
+			return AST_CAUSE_UNALLOCATED;
 		case 486:	/* Busy everywhere */
 			return AST_CAUSE_BUSY;
+		case 487:	/* Request terminated */
+			return AST_CAUSE_INTERWORKING;
 		case 488:	/* No codecs approved */
 			return AST_CAUSE_BEARERCAPABILITY_NOTAVAIL;
+		case 491:	/* Request pending */
+			return AST_CAUSE_INTERWORKING;
+		case 493:	/* Undecipherable */
+			return AST_CAUSE_INTERWORKING;
 		case 500:	/* Server internal failure */
 			return AST_CAUSE_FAILURE;
 		case 501:	/* Call rejected */
@@ -2303,6 +2336,18 @@
 			return AST_CAUSE_DESTINATION_OUT_OF_ORDER;
 		case 503:	/* Service unavailable */
 			return AST_CAUSE_CONGESTION;
+		case 504:	/* Gateway timeout */
+			return AST_CAUSE_RECOVERY_ON_TIMER_EXPIRE;
+		case 505:	/* SIP version not supported */
+			return AST_CAUSE_INTERWORKING;
+		case 600:	/* Busy everywhere */
+			return AST_CAUSE_USER_BUSY;
+		case 603:	/* Decline */
+			return AST_CAUSE_CALL_REJECTED;
+		case 604:	/* Does not exist anywhere */
+			return AST_CAUSE_UNALLOCATED;
+		case 606:	/* Not acceptable */
+			return AST_CAUSE_BEARERCAPABILITY_NOTAVAIL;
 		default:
 			return AST_CAUSE_NORMAL;
 	}



More information about the asterisk-commits mailing list