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

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


Author: mmichelson
Date: Tue Dec 29 15:36:25 2009
New Revision: 236799

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=236799
Log:
Modify transmit_publish to use an explicit URI.
Change the creation of the CC epa entry to pass the peername instead
of the notify uri. Things should be square there now.


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=236799&r1=236798&r2=236799
==============================================================================
--- team/group/CCSS/channels/chan_sip.c (original)
+++ team/group/CCSS/channels/chan_sip.c Tue Dec 29 15:36:25 2009
@@ -2981,7 +2981,7 @@
 static void transmit_fake_auth_response(struct sip_pvt *p, int sipmethod, struct sip_request *req, enum xmittype reliable);
 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_publish(struct sip_epa_entry *epa_entry, enum sip_publish_type publish_type, const char * body, const char * const explicit_uri);
 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);
@@ -3753,7 +3753,7 @@
 
 	if (!monitor_instance->suspension_entry) {
 		/* We haven't yet allocated the suspension entry, so let's give it a shot */
-		if (!(monitor_instance->suspension_entry = create_epa_entry("call-completion", monitor_instance->notify_uri))) {
+		if (!(monitor_instance->suspension_entry = create_epa_entry("call-completion", monitor_instance->peername))) {
 			ast_log(LOG_WARNING, "Unable to allocate sip EPA entry for call-completion\n");
 			ao2_ref(monitor_instance, -1);
 			return -1;
@@ -3764,7 +3764,7 @@
 	}
 
 	construct_pidf_body(CC_CLOSED, pidf_body, sizeof(pidf_body));
-	transmit_publish(monitor_instance->suspension_entry, publish_type, pidf_body);
+	transmit_publish(monitor_instance->suspension_entry, publish_type, pidf_body, monitor_instance->notify_uri);
 
 	ao2_ref(monitor_instance, -1);
 	return 0;
@@ -3790,7 +3790,7 @@
 	ast_assert(monitor_instance->suspension_entry != NULL);
 
 	construct_pidf_body(CC_OPEN, pidf_body, sizeof(pidf_body));
-	transmit_publish(monitor_instance->suspension_entry, SIP_PUBLISH_MODIFY, pidf_body);
+	transmit_publish(monitor_instance->suspension_entry, SIP_PUBLISH_MODIFY, pidf_body, monitor_instance->notify_uri);
 
 	ao2_ref(monitor_instance, -1);
 	return 0;
@@ -12471,7 +12471,7 @@
 	add_header(req, "Diversion", header_text);
 }
 
-static int transmit_publish(struct sip_epa_entry *epa_entry, enum sip_publish_type publish_type, const char * const body)
+static int transmit_publish(struct sip_epa_entry *epa_entry, enum sip_publish_type publish_type, const char * const body, const char * const explicit_uri)
 {
 	struct sip_pvt *pvt;
 	struct sip_request req;
@@ -12488,7 +12488,7 @@
 	pvt->branch = ast_random();
 	build_via(pvt);
 
-	initreqprep(&req, pvt, SIP_PUBLISH, NULL);
+	initreqprep(&req, pvt, SIP_PUBLISH, explicit_uri);
 
 	ast_set_flag(&pvt->flags[0], SIP_OUTGOING);
 




More information about the asterisk-commits mailing list