[asterisk-commits] pabelanger: branch pabelanger/issue17173 r258769 - in /team/pabelanger/issue1...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Apr 23 15:42:33 CDT 2010


Author: pabelanger
Date: Fri Apr 23 15:42:28 2010
New Revision: 258769

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=258769
Log:
Convert MANAGER_ACTION to MANAGER_COMMAND.  Start converting 'manager command' functions into generic functions, allow use to use both MANAGER_COMMAND and MANAGER_EVENT.

Modified:
    team/pabelanger/issue17173/apps/app_mixmonitor.c
    team/pabelanger/issue17173/apps/app_queue.c
    team/pabelanger/issue17173/apps/app_senddtmf.c
    team/pabelanger/issue17173/apps/app_voicemail.c
    team/pabelanger/issue17173/channels/chan_agent.c
    team/pabelanger/issue17173/channels/chan_iax2.c
    team/pabelanger/issue17173/channels/chan_sip.c
    team/pabelanger/issue17173/channels/chan_skinny.c
    team/pabelanger/issue17173/include/asterisk/manager.h
    team/pabelanger/issue17173/main/data.c
    team/pabelanger/issue17173/main/db.c
    team/pabelanger/issue17173/main/features.c
    team/pabelanger/issue17173/main/manager.c
    team/pabelanger/issue17173/main/pbx.c
    team/pabelanger/issue17173/res/res_agi.c
    team/pabelanger/issue17173/res/res_monitor.c
    team/pabelanger/issue17173/res/res_mutestream.c

Modified: team/pabelanger/issue17173/apps/app_mixmonitor.c
URL: http://svnview.digium.com/svn/asterisk/team/pabelanger/issue17173/apps/app_mixmonitor.c?view=diff&rev=258769&r1=258768&r2=258769
==============================================================================
--- team/pabelanger/issue17173/apps/app_mixmonitor.c (original)
+++ team/pabelanger/issue17173/apps/app_mixmonitor.c Fri Apr 23 15:42:28 2010
@@ -717,7 +717,7 @@
 	ast_cli_register_multiple(cli_mixmonitor, ARRAY_LEN(cli_mixmonitor));
 	res = ast_register_application_xml(app, mixmonitor_exec);
 	res |= ast_register_application_xml(stop_app, stop_mixmonitor_exec);
-	res |= ast_manager_register_xml(MANAGER_ACTION, "MixMonitorMute", 0, manager_mute_mixmonitor);
+	res |= ast_manager_register_xml(MANAGER_COMMAND, "MixMonitorMute", 0, manager_mute_mixmonitor);
 
 	return res;
 }

Modified: team/pabelanger/issue17173/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/team/pabelanger/issue17173/apps/app_queue.c?view=diff&rev=258769&r1=258768&r2=258769
==============================================================================
--- team/pabelanger/issue17173/apps/app_queue.c (original)
+++ team/pabelanger/issue17173/apps/app_queue.c Fri Apr 23 15:42:28 2010
@@ -7977,17 +7977,17 @@
 	res |= ast_register_application_xml(app_pqm, pqm_exec);
 	res |= ast_register_application_xml(app_upqm, upqm_exec);
 	res |= ast_register_application_xml(app_ql, ql_exec);
-	res |= ast_manager_register_xml(MANAGER_ACTION, "Queues", 0, manager_queues_show);
-	res |= ast_manager_register_xml(MANAGER_ACTION, "QueueStatus", 0, manager_queues_status);
-	res |= ast_manager_register_xml(MANAGER_ACTION, "QueueSummary", 0, manager_queues_summary);
-	res |= ast_manager_register_xml(MANAGER_ACTION, "QueueAdd", EVENT_FLAG_AGENT, manager_add_queue_member);
-	res |= ast_manager_register_xml(MANAGER_ACTION, "QueueRemove", EVENT_FLAG_AGENT, manager_remove_queue_member);
-	res |= ast_manager_register_xml(MANAGER_ACTION, "QueuePause", EVENT_FLAG_AGENT, manager_pause_queue_member);
-	res |= ast_manager_register_xml(MANAGER_ACTION, "QueueLog", EVENT_FLAG_AGENT, manager_queue_log_custom);
-	res |= ast_manager_register_xml(MANAGER_ACTION, "QueuePenalty", EVENT_FLAG_AGENT, manager_queue_member_penalty);
-	res |= ast_manager_register_xml(MANAGER_ACTION, "QueueRule", 0, manager_queue_rule_show);
-	res |= ast_manager_register_xml(MANAGER_ACTION, "QueueReload", 0, manager_queue_reload);
-	res |= ast_manager_register_xml(MANAGER_ACTION, "QueueReset", 0, manager_queue_reset);
+	res |= ast_manager_register_xml(MANAGER_COMMAND, "Queues", 0, manager_queues_show);
+	res |= ast_manager_register_xml(MANAGER_COMMAND, "QueueStatus", 0, manager_queues_status);
+	res |= ast_manager_register_xml(MANAGER_COMMAND, "QueueSummary", 0, manager_queues_summary);
+	res |= ast_manager_register_xml(MANAGER_COMMAND, "QueueAdd", EVENT_FLAG_AGENT, manager_add_queue_member);
+	res |= ast_manager_register_xml(MANAGER_COMMAND, "QueueRemove", EVENT_FLAG_AGENT, manager_remove_queue_member);
+	res |= ast_manager_register_xml(MANAGER_COMMAND, "QueuePause", EVENT_FLAG_AGENT, manager_pause_queue_member);
+	res |= ast_manager_register_xml(MANAGER_COMMAND, "QueueLog", EVENT_FLAG_AGENT, manager_queue_log_custom);
+	res |= ast_manager_register_xml(MANAGER_COMMAND, "QueuePenalty", EVENT_FLAG_AGENT, manager_queue_member_penalty);
+	res |= ast_manager_register_xml(MANAGER_COMMAND, "QueueRule", 0, manager_queue_rule_show);
+	res |= ast_manager_register_xml(MANAGER_COMMAND, "QueueReload", 0, manager_queue_reload);
+	res |= ast_manager_register_xml(MANAGER_COMMAND, "QueueReset", 0, manager_queue_reset);
 	res |= ast_custom_function_register(&queuevar_function);
 	res |= ast_custom_function_register(&queuemembercount_function);
 	res |= ast_custom_function_register(&queuemembercount_dep);

Modified: team/pabelanger/issue17173/apps/app_senddtmf.c
URL: http://svnview.digium.com/svn/asterisk/team/pabelanger/issue17173/apps/app_senddtmf.c?view=diff&rev=258769&r1=258768&r2=258769
==============================================================================
--- team/pabelanger/issue17173/apps/app_senddtmf.c (original)
+++ team/pabelanger/issue17173/apps/app_senddtmf.c Fri Apr 23 15:42:28 2010
@@ -150,7 +150,7 @@
 {
 	int res;
 
-	res = ast_manager_register_xml(MANAGER_ACTION, "PlayDTMF", EVENT_FLAG_CALL, manager_play_dtmf);
+	res = ast_manager_register_xml(MANAGER_COMMAND, "PlayDTMF", EVENT_FLAG_CALL, manager_play_dtmf);
 	res |= ast_register_application_xml(app, senddtmf_exec);
 
 	return res;

Modified: team/pabelanger/issue17173/apps/app_voicemail.c
URL: http://svnview.digium.com/svn/asterisk/team/pabelanger/issue17173/apps/app_voicemail.c?view=diff&rev=258769&r1=258768&r2=258769
==============================================================================
--- team/pabelanger/issue17173/apps/app_voicemail.c (original)
+++ team/pabelanger/issue17173/apps/app_voicemail.c Fri Apr 23 15:42:28 2010
@@ -12490,7 +12490,7 @@
 	res |= ast_register_application_xml(app4, vmauthenticate);
 	res |= ast_register_application_xml(sayname_app, vmsayname_exec);
 	res |= ast_custom_function_register(&mailbox_exists_acf);
-	res |= ast_manager_register_xml(MANAGER_ACTION, "VoicemailUsersList", EVENT_FLAG_CALL | EVENT_FLAG_REPORTING, manager_list_voicemail_users);
+	res |= ast_manager_register_xml(MANAGER_COMMAND, "VoicemailUsersList", EVENT_FLAG_CALL | EVENT_FLAG_REPORTING, manager_list_voicemail_users);
 #ifdef TEST_FRAMEWORK
 	res |= AST_TEST_REGISTER(test_voicemail_vmsayname);
 	res |= AST_TEST_REGISTER(test_voicemail_msgcount);

Modified: team/pabelanger/issue17173/channels/chan_agent.c
URL: http://svnview.digium.com/svn/asterisk/team/pabelanger/issue17173/channels/chan_agent.c?view=diff&rev=258769&r1=258768&r2=258769
==============================================================================
--- team/pabelanger/issue17173/channels/chan_agent.c (original)
+++ team/pabelanger/issue17173/channels/chan_agent.c Fri Apr 23 15:42:28 2010
@@ -2328,8 +2328,8 @@
 	ast_register_application_xml(app3, agentmonitoroutgoing_exec);
 
 	/* Manager commands */
-	ast_manager_register_xml(MANAGER_ACTION, "Agents", EVENT_FLAG_AGENT, action_agents);
-	ast_manager_register_xml(MANAGER_ACTION, "AgentLogoff", EVENT_FLAG_AGENT, action_agent_logoff);
+	ast_manager_register_xml(MANAGER_COMMAND, "Agents", EVENT_FLAG_AGENT, action_agents);
+	ast_manager_register_xml(MANAGER_COMMAND, "AgentLogoff", EVENT_FLAG_AGENT, action_agent_logoff);
 
 	/* CLI Commands */
 	ast_cli_register_multiple(cli_agents, ARRAY_LEN(cli_agents));

Modified: team/pabelanger/issue17173/channels/chan_iax2.c
URL: http://svnview.digium.com/svn/asterisk/team/pabelanger/issue17173/channels/chan_iax2.c?view=diff&rev=258769&r1=258768&r2=258769
==============================================================================
--- team/pabelanger/issue17173/channels/chan_iax2.c (original)
+++ team/pabelanger/issue17173/channels/chan_iax2.c Fri Apr 23 15:42:28 2010
@@ -14037,10 +14037,10 @@
 
 	ast_register_application_xml(papp, iax2_prov_app);
 	
-	ast_manager_register_xml(MANAGER_ACTION, "IAXpeers", EVENT_FLAG_SYSTEM | EVENT_FLAG_REPORTING, manager_iax2_show_peers);
-	ast_manager_register_xml(MANAGER_ACTION, "IAXpeerlist", EVENT_FLAG_SYSTEM | EVENT_FLAG_REPORTING, manager_iax2_show_peer_list);
-	ast_manager_register_xml(MANAGER_ACTION, "IAXnetstats", EVENT_FLAG_SYSTEM | EVENT_FLAG_REPORTING, manager_iax2_show_netstats);
-	ast_manager_register_xml(MANAGER_ACTION, "IAXregistry", EVENT_FLAG_SYSTEM | EVENT_FLAG_REPORTING, manager_iax2_show_registry);
+	ast_manager_register_xml(MANAGER_COMMAND, "IAXpeers", EVENT_FLAG_SYSTEM | EVENT_FLAG_REPORTING, manager_iax2_show_peers);
+	ast_manager_register_xml(MANAGER_COMMAND, "IAXpeerlist", EVENT_FLAG_SYSTEM | EVENT_FLAG_REPORTING, manager_iax2_show_peer_list);
+	ast_manager_register_xml(MANAGER_COMMAND, "IAXnetstats", EVENT_FLAG_SYSTEM | EVENT_FLAG_REPORTING, manager_iax2_show_netstats);
+	ast_manager_register_xml(MANAGER_COMMAND, "IAXregistry", EVENT_FLAG_SYSTEM | EVENT_FLAG_REPORTING, manager_iax2_show_registry);
 
 	if ((timer = ast_timer_open())) {
 		ast_timer_set_rate(timer, trunkfreq);

Modified: team/pabelanger/issue17173/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/pabelanger/issue17173/channels/chan_sip.c?view=diff&rev=258769&r1=258768&r2=258769
==============================================================================
--- team/pabelanger/issue17173/channels/chan_sip.c (original)
+++ team/pabelanger/issue17173/channels/chan_sip.c Fri Apr 23 15:42:28 2010
@@ -27118,11 +27118,11 @@
 	ast_custom_function_register(&checksipdomain_function);
 
 	/* Register manager commands */
-	ast_manager_register_xml(MANAGER_ACTION, "SIPpeers", EVENT_FLAG_SYSTEM | EVENT_FLAG_REPORTING, manager_sip_show_peers);
-	ast_manager_register_xml(MANAGER_ACTION, "SIPshowpeer", EVENT_FLAG_SYSTEM | EVENT_FLAG_REPORTING, manager_sip_show_peer);
-	ast_manager_register_xml(MANAGER_ACTION, "SIPqualifypeer", EVENT_FLAG_SYSTEM | EVENT_FLAG_REPORTING, manager_sip_qualify_peer);
-	ast_manager_register_xml(MANAGER_ACTION, "SIPshowregistry", EVENT_FLAG_SYSTEM | EVENT_FLAG_REPORTING, manager_show_registry);
-	ast_manager_register_xml(MANAGER_ACTION, "SIPnotify", EVENT_FLAG_SYSTEM, manager_sipnotify);
+	ast_manager_register_xml(MANAGER_COMMAND, "SIPpeers", EVENT_FLAG_SYSTEM | EVENT_FLAG_REPORTING, manager_sip_show_peers);
+	ast_manager_register_xml(MANAGER_COMMAND, "SIPshowpeer", EVENT_FLAG_SYSTEM | EVENT_FLAG_REPORTING, manager_sip_show_peer);
+	ast_manager_register_xml(MANAGER_COMMAND, "SIPqualifypeer", EVENT_FLAG_SYSTEM | EVENT_FLAG_REPORTING, manager_sip_qualify_peer);
+	ast_manager_register_xml(MANAGER_COMMAND, "SIPshowregistry", EVENT_FLAG_SYSTEM | EVENT_FLAG_REPORTING, manager_show_registry);
+	ast_manager_register_xml(MANAGER_COMMAND, "SIPnotify", EVENT_FLAG_SYSTEM, manager_sipnotify);
 	sip_poke_all_peers();	
 	sip_send_all_registers();
 	sip_send_all_mwi_subscriptions();

Modified: team/pabelanger/issue17173/channels/chan_skinny.c
URL: http://svnview.digium.com/svn/asterisk/team/pabelanger/issue17173/channels/chan_skinny.c?view=diff&rev=258769&r1=258768&r2=258769
==============================================================================
--- team/pabelanger/issue17173/channels/chan_skinny.c (original)
+++ team/pabelanger/issue17173/channels/chan_skinny.c Fri Apr 23 15:42:28 2010
@@ -7327,10 +7327,10 @@
 	ast_rtp_glue_register(&skinny_rtp_glue);
 	ast_cli_register_multiple(cli_skinny, ARRAY_LEN(cli_skinny));
 
-	ast_manager_register_xml(MANAGER_ACTION, "SKINNYdevices", EVENT_FLAG_SYSTEM | EVENT_FLAG_REPORTING, manager_skinny_show_devices);
-	ast_manager_register_xml(MANAGER_ACTION, "SKINNYshowdevice", EVENT_FLAG_SYSTEM | EVENT_FLAG_REPORTING, manager_skinny_show_device);
-	ast_manager_register_xml(MANAGER_ACTION, "SKINNYlines", EVENT_FLAG_SYSTEM | EVENT_FLAG_REPORTING, manager_skinny_show_lines);
-	ast_manager_register_xml(MANAGER_ACTION, "SKINNYshowline", EVENT_FLAG_SYSTEM | EVENT_FLAG_REPORTING, manager_skinny_show_line);
+	ast_manager_register_xml(MANAGER_COMMAND, "SKINNYdevices", EVENT_FLAG_SYSTEM | EVENT_FLAG_REPORTING, manager_skinny_show_devices);
+	ast_manager_register_xml(MANAGER_COMMAND, "SKINNYshowdevice", EVENT_FLAG_SYSTEM | EVENT_FLAG_REPORTING, manager_skinny_show_device);
+	ast_manager_register_xml(MANAGER_COMMAND, "SKINNYlines", EVENT_FLAG_SYSTEM | EVENT_FLAG_REPORTING, manager_skinny_show_lines);
+	ast_manager_register_xml(MANAGER_COMMAND, "SKINNYshowline", EVENT_FLAG_SYSTEM | EVENT_FLAG_REPORTING, manager_skinny_show_line);
 
 	sched = sched_context_create();
 	if (!sched) {

Modified: team/pabelanger/issue17173/include/asterisk/manager.h
URL: http://svnview.digium.com/svn/asterisk/team/pabelanger/issue17173/include/asterisk/manager.h?view=diff&rev=258769&r1=258768&r2=258769
==============================================================================
--- team/pabelanger/issue17173/include/asterisk/manager.h (original)
+++ team/pabelanger/issue17173/include/asterisk/manager.h Fri Apr 23 15:42:28 2010
@@ -85,7 +85,7 @@
 #define EVENT_FLAG_CC			(1 << 15) /* Call Completion events */
 
 #define MANAGER_EVENT			(1 << 16) /* Manager Interface Event */
-#define MANAGER_ACTION			(1 << 17) /* Manager Interface Action */
+#define MANAGER_COMMAND			(1 << 17) /* Manager Interface Command */
 /*@} */
 
 /*! \brief Export manager structures */
@@ -137,6 +137,8 @@
 };
 
 struct manager_action {
+	/*! Type of manager action */
+	int type;
 	/*! Name of the action */
 	const char *action;
 	AST_DECLARE_STRING_FIELDS(

Modified: team/pabelanger/issue17173/main/data.c
URL: http://svnview.digium.com/svn/asterisk/team/pabelanger/issue17173/main/data.c?view=diff&rev=258769&r1=258768&r2=258769
==============================================================================
--- team/pabelanger/issue17173/main/data.c (original)
+++ team/pabelanger/issue17173/main/data.c Fri Apr 23 15:42:28 2010
@@ -2869,7 +2869,7 @@
 
 	res |= ast_cli_register_multiple(cli_data, ARRAY_LEN(cli_data));
 
-	res |= ast_manager_register_xml(MANAGER_ACTION, "DataGet", 0, manager_data_get);
+	res |= ast_manager_register_xml(MANAGER_COMMAND, "DataGet", 0, manager_data_get);
 
 #ifdef TEST_FRAMEWORK
 	AST_TEST_REGISTER(test_data_get);

Modified: team/pabelanger/issue17173/main/db.c
URL: http://svnview.digium.com/svn/asterisk/team/pabelanger/issue17173/main/db.c?view=diff&rev=258769&r1=258768&r2=258769
==============================================================================
--- team/pabelanger/issue17173/main/db.c (original)
+++ team/pabelanger/issue17173/main/db.c Fri Apr 23 15:42:28 2010
@@ -718,9 +718,9 @@
 {
 	dbinit();
 	ast_cli_register_multiple(cli_database, ARRAY_LEN(cli_database));
-	ast_manager_register_xml(MANAGER_ACTION, "DBGet", EVENT_FLAG_SYSTEM | EVENT_FLAG_REPORTING, manager_dbget);
-	ast_manager_register_xml(MANAGER_ACTION, "DBPut", EVENT_FLAG_SYSTEM, manager_dbput);
-	ast_manager_register_xml(MANAGER_ACTION, "DBDel", EVENT_FLAG_SYSTEM, manager_dbdel);
-	ast_manager_register_xml(MANAGER_ACTION, "DBDelTree", EVENT_FLAG_SYSTEM, manager_dbdeltree);
+	ast_manager_register_xml(MANAGER_COMMAND, "DBGet", EVENT_FLAG_SYSTEM | EVENT_FLAG_REPORTING, manager_dbget);
+	ast_manager_register_xml(MANAGER_COMMAND, "DBPut", EVENT_FLAG_SYSTEM, manager_dbput);
+	ast_manager_register_xml(MANAGER_COMMAND, "DBDel", EVENT_FLAG_SYSTEM, manager_dbdel);
+	ast_manager_register_xml(MANAGER_COMMAND, "DBDelTree", EVENT_FLAG_SYSTEM, manager_dbdeltree);
 	return 0;
 }

Modified: team/pabelanger/issue17173/main/features.c
URL: http://svnview.digium.com/svn/asterisk/team/pabelanger/issue17173/main/features.c?view=diff&rev=258769&r1=258768&r2=258769
==============================================================================
--- team/pabelanger/issue17173/main/features.c (original)
+++ team/pabelanger/issue17173/main/features.c Fri Apr 23 15:42:28 2010
@@ -5442,9 +5442,9 @@
 	if (!res)
 		res = ast_register_application2(parkcall, park_call_exec, NULL, NULL, NULL);
 	if (!res) {
-		ast_manager_register_xml(MANAGER_ACTION, "ParkedCalls", 0, manager_parking_status);
-		ast_manager_register_xml(MANAGER_ACTION, "Park", EVENT_FLAG_CALL, manager_park);
-		ast_manager_register_xml(MANAGER_ACTION, "Bridge", EVENT_FLAG_CALL, action_bridge);
+		ast_manager_register_xml(MANAGER_COMMAND, "ParkedCalls", 0, manager_parking_status);
+		ast_manager_register_xml(MANAGER_COMMAND, "Park", EVENT_FLAG_CALL, manager_park);
+		ast_manager_register_xml(MANAGER_COMMAND, "Bridge", EVENT_FLAG_CALL, action_bridge);
 	}
 
 	res |= ast_devstate_prov_add("Park", metermaidstate);

Modified: team/pabelanger/issue17173/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/team/pabelanger/issue17173/main/manager.c?view=diff&rev=258769&r1=258768&r2=258769
==============================================================================
--- team/pabelanger/issue17173/main/manager.c (original)
+++ team/pabelanger/issue17173/main/manager.c Fri Apr 23 15:42:28 2010
@@ -1190,7 +1190,7 @@
 	return ret;
 }
 
-static char *handle_showmancmd(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
+static char *handle_show_manager_action(int type, struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
 {
 	struct manager_action *cur;
 	struct ast_str *authority;
@@ -1268,6 +1268,11 @@
 	return CLI_SUCCESS;
 }
 
+static char *handle_showmancmd(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
+{
+	return handle_show_manager_action(MANAGER_COMMAND, e, cmd, a);
+}
+
 static char *handle_mandebug(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
 {
 	switch (cmd) {
@@ -1400,9 +1405,7 @@
 	return CLI_SUCCESS;
 }
 
-
-/*! \brief  CLI command  manager list commands */
-static char *handle_showmancmds(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
+static char *handle_show_manager_actions(int type, struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
 {
 	struct manager_action *cur;
 	struct ast_str *authority;
@@ -1427,6 +1430,12 @@
 	AST_RWLIST_UNLOCK(&actions);
 
 	return CLI_SUCCESS;
+}
+
+/*! \brief  CLI command  manager list commands */
+static char *handle_showmancmds(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
+{
+	return handle_show_manager_actions(MANAGER_COMMAND, e, cmd, a);
 }
 
 /*! \brief CLI command manager list connected */
@@ -5575,39 +5584,39 @@
 
 	if (!registered) {
 		/* Register default actions */
-		ast_manager_register_xml(MANAGER_ACTION, "Ping", 0, action_ping);
-		ast_manager_register_xml(MANAGER_ACTION, "Events", 0, action_events);
-		ast_manager_register_xml(MANAGER_ACTION, "Logoff", 0, action_logoff);
-		ast_manager_register_xml(MANAGER_ACTION, "Login", 0, action_login);
-		ast_manager_register_xml(MANAGER_ACTION, "Challenge", 0, action_challenge);
-		ast_manager_register_xml(MANAGER_ACTION, "Hangup", EVENT_FLAG_SYSTEM | EVENT_FLAG_CALL, action_hangup);
-		ast_manager_register_xml(MANAGER_ACTION, "Status", EVENT_FLAG_SYSTEM | EVENT_FLAG_CALL | EVENT_FLAG_REPORTING, action_status);
-		ast_manager_register_xml(MANAGER_ACTION, "Setvar", EVENT_FLAG_CALL, action_setvar);
-		ast_manager_register_xml(MANAGER_ACTION, "Getvar", EVENT_FLAG_CALL | EVENT_FLAG_REPORTING, action_getvar);
-		ast_manager_register_xml(MANAGER_ACTION, "GetConfig", EVENT_FLAG_SYSTEM | EVENT_FLAG_CONFIG, action_getconfig);
-		ast_manager_register_xml(MANAGER_ACTION, "GetConfigJSON", EVENT_FLAG_SYSTEM | EVENT_FLAG_CONFIG, action_getconfigjson);
-		ast_manager_register_xml(MANAGER_ACTION, "UpdateConfig", EVENT_FLAG_CONFIG, action_updateconfig);
-		ast_manager_register_xml(MANAGER_ACTION, "CreateConfig", EVENT_FLAG_CONFIG, action_createconfig);
-		ast_manager_register_xml(MANAGER_ACTION, "ListCategories", EVENT_FLAG_CONFIG, action_listcategories);
-		ast_manager_register_xml(MANAGER_ACTION, "Redirect", EVENT_FLAG_CALL, action_redirect);
-		ast_manager_register_xml(MANAGER_ACTION, "Atxfer", EVENT_FLAG_CALL, action_atxfer);
-		ast_manager_register_xml(MANAGER_ACTION, "Originate", EVENT_FLAG_ORIGINATE, action_originate);
-		ast_manager_register_xml(MANAGER_ACTION, "Command", EVENT_FLAG_COMMAND, action_command);
-		ast_manager_register_xml(MANAGER_ACTION, "ExtensionState", EVENT_FLAG_CALL | EVENT_FLAG_REPORTING, action_extensionstate);
-		ast_manager_register_xml(MANAGER_ACTION, "AbsoluteTimeout", EVENT_FLAG_SYSTEM | EVENT_FLAG_CALL, action_timeout);
-		ast_manager_register_xml(MANAGER_ACTION, "MailboxStatus", EVENT_FLAG_CALL | EVENT_FLAG_REPORTING, action_mailboxstatus);
-		ast_manager_register_xml(MANAGER_ACTION, "MailboxCount", EVENT_FLAG_CALL | EVENT_FLAG_REPORTING, action_mailboxcount);
-		ast_manager_register_xml(MANAGER_ACTION, "ListCommands", 0, action_listcommands);
-		ast_manager_register_xml(MANAGER_ACTION, "SendText", EVENT_FLAG_CALL, action_sendtext);
-		ast_manager_register_xml(MANAGER_ACTION, "UserEvent", EVENT_FLAG_USER, action_userevent);
-		ast_manager_register_xml(MANAGER_ACTION, "WaitEvent", 0, action_waitevent);
-		ast_manager_register_xml(MANAGER_ACTION, "CoreSettings", EVENT_FLAG_SYSTEM | EVENT_FLAG_REPORTING, action_coresettings);
-		ast_manager_register_xml(MANAGER_ACTION, "CoreStatus", EVENT_FLAG_SYSTEM | EVENT_FLAG_REPORTING, action_corestatus);
-		ast_manager_register_xml(MANAGER_ACTION, "Reload", EVENT_FLAG_CONFIG | EVENT_FLAG_SYSTEM, action_reload);
-		ast_manager_register_xml(MANAGER_ACTION, "CoreShowChannels", EVENT_FLAG_SYSTEM | EVENT_FLAG_REPORTING, action_coreshowchannels);
-		ast_manager_register_xml(MANAGER_ACTION, "ModuleLoad", EVENT_FLAG_SYSTEM, manager_moduleload);
-		ast_manager_register_xml(MANAGER_ACTION, "ModuleCheck", EVENT_FLAG_SYSTEM, manager_modulecheck);
-		ast_manager_register_xml(MANAGER_ACTION, "AgentComplete",EVENT_FLAG_SYSTEM, action_ping);
+		ast_manager_register_xml(MANAGER_COMMAND, "Ping", 0, action_ping);
+		ast_manager_register_xml(MANAGER_COMMAND, "Events", 0, action_events);
+		ast_manager_register_xml(MANAGER_COMMAND, "Logoff", 0, action_logoff);
+		ast_manager_register_xml(MANAGER_COMMAND, "Login", 0, action_login);
+		ast_manager_register_xml(MANAGER_COMMAND, "Challenge", 0, action_challenge);
+		ast_manager_register_xml(MANAGER_COMMAND, "Hangup", EVENT_FLAG_SYSTEM | EVENT_FLAG_CALL, action_hangup);
+		ast_manager_register_xml(MANAGER_COMMAND, "Status", EVENT_FLAG_SYSTEM | EVENT_FLAG_CALL | EVENT_FLAG_REPORTING, action_status);
+		ast_manager_register_xml(MANAGER_COMMAND, "Setvar", EVENT_FLAG_CALL, action_setvar);
+		ast_manager_register_xml(MANAGER_COMMAND, "Getvar", EVENT_FLAG_CALL | EVENT_FLAG_REPORTING, action_getvar);
+		ast_manager_register_xml(MANAGER_COMMAND, "GetConfig", EVENT_FLAG_SYSTEM | EVENT_FLAG_CONFIG, action_getconfig);
+		ast_manager_register_xml(MANAGER_COMMAND, "GetConfigJSON", EVENT_FLAG_SYSTEM | EVENT_FLAG_CONFIG, action_getconfigjson);
+		ast_manager_register_xml(MANAGER_COMMAND, "UpdateConfig", EVENT_FLAG_CONFIG, action_updateconfig);
+		ast_manager_register_xml(MANAGER_COMMAND, "CreateConfig", EVENT_FLAG_CONFIG, action_createconfig);
+		ast_manager_register_xml(MANAGER_COMMAND, "ListCategories", EVENT_FLAG_CONFIG, action_listcategories);
+		ast_manager_register_xml(MANAGER_COMMAND, "Redirect", EVENT_FLAG_CALL, action_redirect);
+		ast_manager_register_xml(MANAGER_COMMAND, "Atxfer", EVENT_FLAG_CALL, action_atxfer);
+		ast_manager_register_xml(MANAGER_COMMAND, "Originate", EVENT_FLAG_ORIGINATE, action_originate);
+		ast_manager_register_xml(MANAGER_COMMAND, "Command", EVENT_FLAG_COMMAND, action_command);
+		ast_manager_register_xml(MANAGER_COMMAND, "ExtensionState", EVENT_FLAG_CALL | EVENT_FLAG_REPORTING, action_extensionstate);
+		ast_manager_register_xml(MANAGER_COMMAND, "AbsoluteTimeout", EVENT_FLAG_SYSTEM | EVENT_FLAG_CALL, action_timeout);
+		ast_manager_register_xml(MANAGER_COMMAND, "MailboxStatus", EVENT_FLAG_CALL | EVENT_FLAG_REPORTING, action_mailboxstatus);
+		ast_manager_register_xml(MANAGER_COMMAND, "MailboxCount", EVENT_FLAG_CALL | EVENT_FLAG_REPORTING, action_mailboxcount);
+		ast_manager_register_xml(MANAGER_COMMAND, "ListCommands", 0, action_listcommands);
+		ast_manager_register_xml(MANAGER_COMMAND, "SendText", EVENT_FLAG_CALL, action_sendtext);
+		ast_manager_register_xml(MANAGER_COMMAND, "UserEvent", EVENT_FLAG_USER, action_userevent);
+		ast_manager_register_xml(MANAGER_COMMAND, "WaitEvent", 0, action_waitevent);
+		ast_manager_register_xml(MANAGER_COMMAND, "CoreSettings", EVENT_FLAG_SYSTEM | EVENT_FLAG_REPORTING, action_coresettings);
+		ast_manager_register_xml(MANAGER_COMMAND, "CoreStatus", EVENT_FLAG_SYSTEM | EVENT_FLAG_REPORTING, action_corestatus);
+		ast_manager_register_xml(MANAGER_COMMAND, "Reload", EVENT_FLAG_CONFIG | EVENT_FLAG_SYSTEM, action_reload);
+		ast_manager_register_xml(MANAGER_COMMAND, "CoreShowChannels", EVENT_FLAG_SYSTEM | EVENT_FLAG_REPORTING, action_coreshowchannels);
+		ast_manager_register_xml(MANAGER_COMMAND, "ModuleLoad", EVENT_FLAG_SYSTEM, manager_moduleload);
+		ast_manager_register_xml(MANAGER_COMMAND, "ModuleCheck", EVENT_FLAG_SYSTEM, manager_modulecheck);
+		ast_manager_register_xml(MANAGER_COMMAND, "AgentComplete",EVENT_FLAG_SYSTEM, action_ping);
 
 		ast_cli_register_multiple(cli_manager, ARRAY_LEN(cli_manager));
 		ast_extension_state_add(NULL, NULL, manager_state_cb, NULL);

Modified: team/pabelanger/issue17173/main/pbx.c
URL: http://svnview.digium.com/svn/asterisk/team/pabelanger/issue17173/main/pbx.c?view=diff&rev=258769&r1=258768&r2=258769
==============================================================================
--- team/pabelanger/issue17173/main/pbx.c (original)
+++ team/pabelanger/issue17173/main/pbx.c Fri Apr 23 15:42:28 2010
@@ -9730,7 +9730,7 @@
 	}
 
 	/* Register manager application */
-	ast_manager_register_xml(MANAGER_ACTION, "ShowDialPlan", EVENT_FLAG_CONFIG | EVENT_FLAG_REPORTING, manager_show_dialplan);
+	ast_manager_register_xml(MANAGER_COMMAND, "ShowDialPlan", EVENT_FLAG_CONFIG | EVENT_FLAG_REPORTING, manager_show_dialplan);
 
 	if (!(device_state_sub = ast_event_subscribe(AST_EVENT_DEVICE_STATE, device_state_cb, "pbx Device State Change", NULL,
 			AST_EVENT_IE_END))) {

Modified: team/pabelanger/issue17173/res/res_agi.c
URL: http://svnview.digium.com/svn/asterisk/team/pabelanger/issue17173/res/res_agi.c?view=diff&rev=258769&r1=258768&r2=258769
==============================================================================
--- team/pabelanger/issue17173/res/res_agi.c (original)
+++ team/pabelanger/issue17173/res/res_agi.c Fri Apr 23 15:42:28 2010
@@ -3837,7 +3837,7 @@
 	(void) ast_agi_register_multiple(ast_module_info->self, commands, ARRAY_LEN(commands));
 	ast_register_application_xml(deadapp, deadagi_exec);
 	ast_register_application_xml(eapp, eagi_exec);
-	ast_manager_register_xml(MANAGER_ACTION, "AGI", EVENT_FLAG_AGI, action_add_agi_cmd);
+	ast_manager_register_xml(MANAGER_COMMAND, "AGI", EVENT_FLAG_AGI, action_add_agi_cmd);
 	AST_TEST_REGISTER(test_agi_null_docs);
 	return ast_register_application_xml(app, agi_exec);
 }

Modified: team/pabelanger/issue17173/res/res_monitor.c
URL: http://svnview.digium.com/svn/asterisk/team/pabelanger/issue17173/res/res_monitor.c?view=diff&rev=258769&r1=258768&r2=258769
==============================================================================
--- team/pabelanger/issue17173/res/res_monitor.c (original)
+++ team/pabelanger/issue17173/res/res_monitor.c Fri Apr 23 15:42:28 2010
@@ -902,11 +902,11 @@
 	ast_register_application_xml("ChangeMonitor", change_monitor_exec);
 	ast_register_application_xml("PauseMonitor", pause_monitor_exec);
 	ast_register_application_xml("UnpauseMonitor", unpause_monitor_exec);
-	ast_manager_register_xml(MANAGER_ACTION, "Monitor", EVENT_FLAG_CALL, start_monitor_action);
-	ast_manager_register_xml(MANAGER_ACTION, "StopMonitor", EVENT_FLAG_CALL, stop_monitor_action);
-	ast_manager_register_xml(MANAGER_ACTION, "ChangeMonitor", EVENT_FLAG_CALL, change_monitor_action);
-	ast_manager_register_xml(MANAGER_ACTION, "PauseMonitor", EVENT_FLAG_CALL, pause_monitor_action);
-	ast_manager_register_xml(MANAGER_ACTION, "UnpauseMonitor", EVENT_FLAG_CALL, unpause_monitor_action);
+	ast_manager_register_xml(MANAGER_COMMAND, "Monitor", EVENT_FLAG_CALL, start_monitor_action);
+	ast_manager_register_xml(MANAGER_COMMAND, "StopMonitor", EVENT_FLAG_CALL, stop_monitor_action);
+	ast_manager_register_xml(MANAGER_COMMAND, "ChangeMonitor", EVENT_FLAG_CALL, change_monitor_action);
+	ast_manager_register_xml(MANAGER_COMMAND, "PauseMonitor", EVENT_FLAG_CALL, pause_monitor_action);
+	ast_manager_register_xml(MANAGER_COMMAND, "UnpauseMonitor", EVENT_FLAG_CALL, unpause_monitor_action);
 
 	return AST_MODULE_LOAD_SUCCESS;
 }

Modified: team/pabelanger/issue17173/res/res_mutestream.c
URL: http://svnview.digium.com/svn/asterisk/team/pabelanger/issue17173/res/res_mutestream.c?view=diff&rev=258769&r1=258768&r2=258769
==============================================================================
--- team/pabelanger/issue17173/res/res_mutestream.c (original)
+++ team/pabelanger/issue17173/res/res_mutestream.c Fri Apr 23 15:42:28 2010
@@ -347,7 +347,7 @@
 	int res;
 	res = ast_custom_function_register(&mute_function);
 
-	res |= ast_manager_register_xml(MANAGER_ACTION, "MuteAudio", EVENT_FLAG_SYSTEM, manager_mutestream);
+	res |= ast_manager_register_xml(MANAGER_COMMAND, "MuteAudio", EVENT_FLAG_SYSTEM, manager_mutestream);
 
 	return (res ? AST_MODULE_LOAD_DECLINE : AST_MODULE_LOAD_SUCCESS);
 }




More information about the asterisk-commits mailing list