[asterisk-commits] rizzo: branch rizzo/astobj2 r47426 - /team/rizzo/astobj2/channels/chan_sip.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Nov 10 08:22:54 MST 2006


Author: rizzo
Date: Fri Nov 10 09:22:54 2006
New Revision: 47426

URL: http://svn.digium.com/view/asterisk?view=rev&rev=47426
Log:
merge version 47415,Small simplification and documentation correction.


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=47426&r1=47425&r2=47426
==============================================================================
--- team/rizzo/astobj2/channels/chan_sip.c (original)
+++ team/rizzo/astobj2/channels/chan_sip.c Fri Nov 10 09:22:54 2006
@@ -6877,23 +6877,27 @@
 		add_header(req, "Remote-Party-ID", p->rpid);
 }
 
-/*! \brief Build REFER/INVITE/OPTIONS message and transmit it */
+/*! \brief Build REFER/INVITE/OPTIONS message and transmit it
+    \param init 0 = Prepare request within dialog,
+		1= prepare request, new branch,
+		2= prepare new request and new dialog.
+	do_proxy_auth calls this with init!=2
+ */
 static int transmit_invite(struct sip_pvt *p, int sipmethod, int sdp, int init)
 {
 	struct sip_request req;
 	
 	req.method = sipmethod;
-	if (init) {		/* Seems like init always is 2 */
+	if (init) { /* Bump branch even on initial requests */
 		/* Bump branch even on initial requests */
 		p->branch ^= ast_random();
 		build_via(p);
-		if (init > 1)
-			initreqprep(&req, p, sipmethod);
-		else
-			reqprep(&req, p, sipmethod, 0, 1);
-	} else
+	}
+	if (init > 1)
+		initreqprep(&req, p, sipmethod);
+	else
 		reqprep(&req, p, sipmethod, 0, 1);
-		
+
 	if (p->options && p->options->auth)
 		add_header(&req, p->options->authheader, p->options->auth);
 	append_date(&req);



More information about the asterisk-commits mailing list