[asterisk-commits] oej: branch oej/cloudberry-480-unavailable-1.8 r402882 - /team/oej/cloudberry...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Nov 18 09:33:34 CST 2013


Author: oej
Date: Mon Nov 18 09:33:30 2013
New Revision: 402882

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=402882
Log:
Trying to fix 480 handling (and some others while at it)

Modified:
    team/oej/cloudberry-480-unavailable-1.8/channels/chan_sip.c

Modified: team/oej/cloudberry-480-unavailable-1.8/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/cloudberry-480-unavailable-1.8/channels/chan_sip.c?view=diff&rev=402882&r1=402881&r2=402882
==============================================================================
--- team/oej/cloudberry-480-unavailable-1.8/channels/chan_sip.c (original)
+++ team/oej/cloudberry-480-unavailable-1.8/channels/chan_sip.c Mon Nov 18 09:33:30 2013
@@ -21204,14 +21204,23 @@
 	case 408: /* Request timeout */
 	case 405: /* Not allowed */
 	case 501: /* Not implemented */
+	case 480: /* Temporarily Unavailable */
+	case 482: /* Loop Detected */
+	case 410: /* Gone */
+	case 400: /* Bad Request */
+	case 500: /* Server error */
+	case 502: /* Bad gateway */
+	case 503: /* Service Unavailable */
 		xmitres = transmit_request(p, SIP_ACK, seqno, XMIT_UNRELIABLE, FALSE);
 		if (p->owner) {
 			ast_queue_hangup_with_cause(p->owner, hangup_sip2cause(resp));
 		}
 		break;
-	}
-	if (xmitres == XMIT_ERROR)
+
+	}
+	if (xmitres == XMIT_ERROR) {
 		ast_log(LOG_WARNING, "Could not transmit message in dialog %s\n", p->callid);
+	}
 }
 
 /* \brief Handle SIP response in NOTIFY transaction
@@ -22060,8 +22069,12 @@
 				case 502: /* Bad gateway */
 				case 503: /* Service Unavailable */
 				case 504: /* Server Timeout */
-					if (owner)
-						ast_queue_control(p->owner, AST_CONTROL_CONGESTION);
+					if (sipmethod == SIP_INVITE) {
+						handle_response_invite(p, resp, rest, req, seqno);
+					} else {
+						if (owner)
+							ast_queue_control(p->owner, AST_CONTROL_CONGESTION);
+					}
 					break;
 				case 484: /* Address Incomplete */
 					if (owner && sipmethod != SIP_BYE) {




More information about the asterisk-commits mailing list