[asterisk-commits] mmichelson: branch group/CCSS r236796 - /team/group/CCSS/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Dec 29 15:16:08 CST 2009


Author: mmichelson
Date: Tue Dec 29 15:16:06 2009
New Revision: 236796

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=236796
Log:
Alter transmit_invite to take an explicit URI to set.

All instances just pass NULL for now, but that will be corrected soon.


Modified:
    team/group/CCSS/channels/chan_sip.c

Modified: team/group/CCSS/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/group/CCSS/channels/chan_sip.c?view=diff&rev=236796&r1=236795&r2=236796
==============================================================================
--- team/group/CCSS/channels/chan_sip.c (original)
+++ team/group/CCSS/channels/chan_sip.c Tue Dec 29 15:16:06 2009
@@ -2982,7 +2982,7 @@
 static int transmit_request(struct sip_pvt *p, int sipmethod, int inc, enum xmittype reliable, int newbranch);
 static int transmit_request_with_auth(struct sip_pvt *p, int sipmethod, int seqno, enum xmittype reliable, int newbranch);
 static int transmit_publish(struct sip_epa_entry *epa_entry, enum sip_publish_type publish_type, const char * body);
-static int transmit_invite(struct sip_pvt *p, int sipmethod, int sdp, int init);
+static int transmit_invite(struct sip_pvt *p, int sipmethod, int sdp, int init, const char * const explicit_uri);
 static int transmit_reinvite_with_sdp(struct sip_pvt *p, int t38version, int oldsdp);
 static int transmit_info_with_digit(struct sip_pvt *p, const char digit, unsigned int duration);
 static int transmit_info_with_vidupdate(struct sip_pvt *p);
@@ -3710,7 +3710,7 @@
 	
 	/* XXX Should call create_addr or some such here to set appropriate values on the pvt */
 
-	transmit_invite(monitor_instance->subscription_pvt, SIP_SUBSCRIBE, FALSE, TRUE);
+	transmit_invite(monitor_instance->subscription_pvt, SIP_SUBSCRIBE, FALSE, TRUE, NULL);
 
 	when = service == AST_CC_CCBS ? ast_get_ccbs_available_timer(monitor->interface->config_params) :
 		ast_get_ccnr_available_timer(monitor->interface->config_params);
@@ -6848,7 +6848,7 @@
 		int xmitres;
 
 		sip_pvt_lock(p);
-		xmitres = transmit_invite(p, SIP_INVITE, 1, 2);
+		xmitres = transmit_invite(p, SIP_INVITE, 1, 2, NULL);
 		sip_pvt_unlock(p);
 		if (xmitres == XMIT_ERROR)
 			return -1;
@@ -12526,7 +12526,7 @@
  \param sipmethod unknown
 
 */
-static int transmit_invite(struct sip_pvt *p, int sipmethod, int sdp, int init)
+static int transmit_invite(struct sip_pvt *p, int sipmethod, int sdp, int init, const char * const explicit_uri)
 {
 	struct sip_request req;
 	struct ast_variable *var;
@@ -12538,7 +12538,7 @@
 		build_via(p);
 	}
 	if (init > 1)
-		initreqprep(&req, p, sipmethod, NULL);
+		initreqprep(&req, p, sipmethod, explicit_uri);
 	else
 		/* If init=1, we should not generate a new branch. If it's 0, we need a new branch. */
 		reqprep(&req, p, sipmethod, 0, init ? 0 : 1);
@@ -12690,7 +12690,7 @@
 
 	/* If we already have a subscription up simply send a resubscription */
 	if (mwi->call) {
-		transmit_invite(mwi->call, SIP_SUBSCRIBE, 0, 0);
+		transmit_invite(mwi->call, SIP_SUBSCRIBE, 0, 0, NULL);
 		return 0;
 	}
 	
@@ -12745,7 +12745,7 @@
 	mwi->call->mwi = ASTOBJ_REF(mwi);
 	
 	/* Actually send the packet */
-	transmit_invite(mwi->call, SIP_SUBSCRIBE, 0, 2);
+	transmit_invite(mwi->call, SIP_SUBSCRIBE, 0, 2, NULL);
 
 	return 0;
 }
@@ -13169,7 +13169,7 @@
 
 	dialog_ref(p, "bump the count of p, which transmit_sip_request will decrement.");
 	sip_scheddestroy(p, SIP_TRANS_TIMEOUT);
-	transmit_invite(p, SIP_NOTIFY, 0, 2);
+	transmit_invite(p, SIP_NOTIFY, 0, 2, NULL);
 
 	astman_send_ack(s, m, "Notify Sent");
 	ast_variables_destroy(vars);
@@ -18931,7 +18931,7 @@
 		ast_cli(a->fd, "Sending NOTIFY of type '%s' to '%s'\n", a->argv[2], a->argv[i]);
 		dialog_ref(p, "bump the count of p, which transmit_sip_request will decrement.");
 		sip_scheddestroy(p, SIP_TRANS_TIMEOUT);
-		transmit_invite(p, SIP_NOTIFY, 0, 2);
+		transmit_invite(p, SIP_NOTIFY, 0, 2, NULL);
 	}
 
 	return CLI_SUCCESS;
@@ -19011,7 +19011,7 @@
 	/* Now we have a reply digest */
 	p->options->auth = digest;
 	p->options->authheader = respheader;
-	return transmit_invite(p, sipmethod, sipmethod == SIP_INVITE, init);
+	return transmit_invite(p, sipmethod, sipmethod == SIP_INVITE, init, NULL);
 }
 
 /*! \brief  reply to authentication for outbound registrations
@@ -25691,7 +25691,7 @@
 		return;
 	}
 	p->stimer->st_interval = minse;
-	transmit_invite(p, SIP_INVITE, 1, 2);
+	transmit_invite(p, SIP_INVITE, 1, 2, NULL);
 }
 
 
@@ -25885,9 +25885,9 @@
 	ast_set_flag(&p->flags[0], SIP_OUTGOING);
 #ifdef VOCAL_DATA_HACK
 	ast_copy_string(p->username, "__VOCAL_DATA_SHOULD_READ_THE_SIP_SPEC__", sizeof(p->username));
-	xmitres = transmit_invite(p, SIP_INVITE, 0, 2); /* sinks the p refcount */
+	xmitres = transmit_invite(p, SIP_INVITE, 0, 2, NULL); /* sinks the p refcount */
 #else
-	xmitres = transmit_invite(p, SIP_OPTIONS, 0, 2); /* sinks the p refcount */
+	xmitres = transmit_invite(p, SIP_OPTIONS, 0, 2, NULL); /* sinks the p refcount */
 #endif
 	peer->ps = ast_tvnow();
 	if (xmitres == XMIT_ERROR) {




More information about the asterisk-commits mailing list