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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Dec 28 11:10:04 CST 2009


Author: mmichelson
Date: Mon Dec 28 11:10:03 2009
New Revision: 236665

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=236665
Log:
Add the unsuspend callback.


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=236665&r1=236664&r2=236665
==============================================================================
--- team/group/CCSS/channels/chan_sip.c (original)
+++ team/group/CCSS/channels/chan_sip.c Mon Dec 28 11:10:03 2009
@@ -3739,7 +3739,6 @@
 
 static int sip_cc_monitor_status_response(struct ast_cc_monitor *monitor, const int core_id, enum ast_device_state devstate)
 {
-	/* XXX STUB */
 	/* This will never be called because the SIP monitor will never make a status request to
 	 * begin with
 	 */
@@ -3748,11 +3747,18 @@
 
 static int sip_cc_monitor_unsuspend(struct ast_cc_monitor *monitor, const int core_id)
 {
-	/* XXX STUB */
-	/* Find the appropriate sip_monitor_instance based on the given core_id.
-	 * assert that the publish_pvt is non-NULL
-	 * Send a PUBLISH to the notify_uri with PIDF state "open"
-	 */
+	struct sip_monitor_instance *monitor_instance = find_sip_monitor_instance(core_id);
+	char pidf_body[SIPBUFSIZE];
+
+	if (!monitor_instance) {
+		return -1;
+	}
+
+	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);
+
 	return 0;
 }
 




More information about the asterisk-commits mailing list