[asterisk-commits] oej: branch 1.2 r65122 - /branches/1.2/channels/chan_sip.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri May 18 11:10:47 MST 2007


Author: oej
Date: Fri May 18 13:10:46 2007
New Revision: 65122

URL: http://svn.digium.com/view/asterisk?view=rev&rev=65122
Log:
Not getting an ACK to a 200 OK in the initial invite is critical to the call.

Modified:
    branches/1.2/channels/chan_sip.c

Modified: branches/1.2/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/channels/chan_sip.c?view=diff&rev=65122&r1=65121&r2=65122
==============================================================================
--- branches/1.2/channels/chan_sip.c (original)
+++ branches/1.2/channels/chan_sip.c Fri May 18 13:10:46 2007
@@ -10593,6 +10593,7 @@
 	char *supported;
 	char *required;
 	unsigned int required_profile = 0;
+	int reinvite = 0;
 
 	/* Find out what they support */
 	if (!p->sipoptions) {
@@ -10733,6 +10734,7 @@
 	} else {
 		if (option_debug > 1 && sipdebug)
 			ast_log(LOG_DEBUG, "Got a SIP re-invite for call %s\n", p->callid);
+		reinvite = 1;
 		c = p->owner;
 	}
 	if (!ignore && p)
@@ -10809,7 +10811,8 @@
 			transmit_response(p, "180 Ringing", req);
 			break;
 		case AST_STATE_UP:
-			transmit_response_with_sdp(p, "200 OK", req, 1);
+			/* If this is not a re-invite or something to ignore - it's critical */
+			transmit_response_with_sdp(p, "200 OK", req, (ignore || reinvite) ? 1 : 2);
 			break;
 		default:
 			ast_log(LOG_WARNING, "Don't know how to handle INVITE in state %d\n", c->_state);



More information about the asterisk-commits mailing list