[asterisk-commits] jrose: branch jrose/bridge_projects r383649 - /team/jrose/bridge_projects/main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Mar 22 16:43:00 CDT 2013


Author: jrose
Date: Fri Mar 22 16:42:56 2013
New Revision: 383649

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=383649
Log:
Pulling out changes to manager.c

Modified:
    team/jrose/bridge_projects/main/manager.c

Modified: team/jrose/bridge_projects/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/team/jrose/bridge_projects/main/manager.c?view=diff&rev=383649&r1=383648&r2=383649
==============================================================================
--- team/jrose/bridge_projects/main/manager.c (original)
+++ team/jrose/bridge_projects/main/manager.c Fri Mar 22 16:42:56 2013
@@ -92,7 +92,6 @@
 #include "asterisk/stringfields.h"
 #include "asterisk/presencestate.h"
 #include "asterisk/stasis.h"
-#include "asterisk/parking.h"
 
 /*** DOCUMENTATION
 	<manager name="Ping" language="en_US">
@@ -1130,8 +1129,6 @@
 };
 
 static struct stasis_subscription *channel_state_sub;
-
-static struct stasis_subscription *parking_lot_sub;
 
 static void acl_change_event_cb(const struct ast_event *event, void *userdata);
 
@@ -7541,65 +7538,6 @@
 		      channel_name, name, value, uniqueid);
 }
 
-static void parked_call(struct ast_parked_call_payload *parked_call)
-{
-	char *event_type;
-
-	switch (parked_call->event_type) {
-	case PARKED_CALL:
-		event_type = "ParkedCall";
-		break;
-	case PARKED_CALL_TIMEOUT:
-		event_type = "ParkedCallTimeOut";
-		break;
-	case PARKED_CALL_GIVEUP:
-		event_type = "ParkedCallGiveUp";
-		break;
-	case PARKED_CALL_UNPARKED:
-		event_type = "UnParkedCall";
-		break;
-	}
-
-	manager_event(EVENT_FLAG_DIALPLAN, event_type,
-			"ParkingSpace: %s\r\n"
-			"Channel: %s\r\n"
-			"CallerIDNum: %s\r\n"
-			"CallerIDName: %s\r\n"
-			"ConnectedLineNum: %s\r\n"
-			"ConnectedLineName: %s\r\n"
-			"UniqueID: %s\r\n"
-			"ParkingLot: %s\r\n"
-			"Parker: %s\r\n"
-			"Timeout: %s\r\n"
-			"Duration: %s\r\n",
-			parked_call->parkingspace,
-			parked_call->parkee->name,
-			parked_call->parkee->caller_number,
-			parked_call->parkee->caller_name,
-			parked_call->parkee->connected_number,
-			parked_call->parkee->connected_name,
-			parked_call->parkee->uniqueid,
-			parked_call->parkinglot,
-			parked_call->parker->name,
-			parked_call->timeout,
-			parked_call->duration
-		);
-}
-
-static void parking_lot(struct ast_parking_lot_payload *parking_lot)
-{
-	manager_event(EVENT_FLAG_DIALPLAN, "Parkinglot",
-			"Name: %s\r\n"
-			"StartSpace: %s\r\n"
-			"EndSpace: %s\r\n"
-			"Timeout: %s\r\n",
-			parking_lot->name,
-			parking_lot->starting_space,
-			parking_lot->ending_space,
-			parking_lot->timeout
-		);
-}
-
 static void channel_event_cb(void *data, struct stasis_subscription *sub, struct stasis_topic *topic, struct stasis_message *message)
 {
 	if (stasis_message_type(message) == stasis_cache_update()) {
@@ -7616,17 +7554,6 @@
 		const char *name = varset->snapshot ? varset->snapshot->name : "none";
 		const char *uniqueid = varset->snapshot ? varset->snapshot->uniqueid : "none";
 		channel_varset(name, uniqueid, varset->variable, varset->value);
-	} else if (stasis_message_type(message) == ast_parked_call()) {
-		struct ast_parked_call_payload *parked_call_message = stasis_message_data(message);
-		parked_call(parked_call_message);
-	}
-}
-
-static void parking_lot_cb(void *data, struct stasis_subscription *sub, struct stasis_topic *topic, struct stasis_message *message)
-{
-	if (stasis_message_type(message) == ast_parking_lot()) {
-		struct ast_parking_lot_payload *parking_lot_message = stasis_message_data(message);
-		parking_lot(parking_lot_message);
 	}
 }
 
@@ -7654,8 +7581,6 @@
 	struct ast_manager_user *user;
 
 	channel_state_sub = stasis_unsubscribe(channel_state_sub);
-
-	parking_lot_sub = stasis_unsubscribe(parking_lot_sub);
 
 	if (registered) {
 		ast_manager_unregister("Ping");
@@ -7754,10 +7679,6 @@
 			channel_event_cb, NULL);
 	}
 
-	if (!parking_lot_sub) {
-		parking_lot_sub = stasis_subscribe(ast_parking_lot_topic(), parking_lot_cb, NULL);
-	}
-
 	if (!registered) {
 		/* Register default actions */
 		ast_manager_register_xml_core("Ping", 0, action_ping);




More information about the asterisk-commits mailing list