[svn-commits] rizzo: branch rizzo/astobj2 r48407 - /team/rizzo/astobj2/channels/chan_sip.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Tue Dec 12 02:10:31 MST 2006


Author: rizzo
Date: Tue Dec 12 03:10:30 2006
New Revision: 48407

URL: http://svn.digium.com/view/asterisk?view=rev&rev=48407
Log:
merge from trunk rev. 48327
Handle multiple 487's correctly


Modified:
    team/rizzo/astobj2/channels/chan_sip.c

Modified: team/rizzo/astobj2/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/rizzo/astobj2/channels/chan_sip.c?view=diff&rev=48407&r1=48406&r2=48407
==============================================================================
--- team/rizzo/astobj2/channels/chan_sip.c (original)
+++ team/rizzo/astobj2/channels/chan_sip.c Tue Dec 12 03:10:30 2006
@@ -12363,6 +12363,17 @@
 		sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
 		break;
 
+	case 487: /* Cancelled transaction */
+		 /* We have sent CANCEL on an outbound INVITE
+			 This transaction is already scheduled to be killed by sip_hangup().
+		 */
+		 transmit_request(p, SIP_ACK, seqno, 0, 0);
+		 if (p->owner && !ast_test_flag(req, SIP_PKT_IGNORE))
+			 ast_queue_hangup(p->owner);
+		 else if (!ast_test_flag(req, SIP_PKT_IGNORE))
+			 update_call_counter(p, DEC_CALL_LIMIT);
+		 break;
+
 	case 491: /* Pending */
 		/* we really should have to wait a while, then retransmit */
 		/* We should support the retry-after at some point */
@@ -12374,6 +12385,7 @@
 		break;
 
 	case 501: /* Not implemented */
+		transmit_request(p, SIP_ACK, seqno, 0, 0);
 		if (p->owner)
 			ast_queue_control(p->owner, AST_CONTROL_CONGESTION);
 		break;
@@ -12860,6 +12872,12 @@
 				/* Guessing that this is not an important request */
 			}
 			break;
+
+		case 487:
+			if (sipmethod == SIP_INVITE)
+				handle_response_invite(p, resp, rest, req, seqno);
+			break;
+
 		case 491: /* Pending */
 			if (sipmethod == SIP_INVITE)
 				handle_response_invite(p, resp, rest, req, seqno);
@@ -12904,12 +12922,6 @@
 				case 603: /* Decline */
 					if (p->owner)
 						ast_queue_control(p->owner, AST_CONTROL_BUSY);
-					break;
-				case 487:	/* Response on INVITE that has been CANCELled */
-					/* channel now destroyed - dec the inUse counter */
-					if (owner)
-						ast_queue_hangup(p->owner);
-					update_call_counter(p, DEC_CALL_LIMIT);
 					break;
 				case 482: /*
 					\note SIP is incapable of performing a hairpin call, which



More information about the svn-commits mailing list