diff --git a/channels/chan_agent.c b/channels/chan_agent.c
index f84c0f0119..c8f3381c55 100644
--- a/channels/chan_agent.c
+++ b/channels/chan_agent.c
@@ -69,40 +69,113 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/stringfields.h"
#include "asterisk/event.h"
+/*** DOCUMENTATION
+
+
+ Call agent login.
+
+
+
+
+
+
+
+
+
+
+ Asks the agent to login to the system. Always returns -1.
+ While logged in, the agent can receive calls and will hear a beep
+ when a new call comes in. The agent can dump the call by pressing the star key.
+
+
+ Queue
+ AddQueueMember
+ RemoveQueueMember
+ PauseQueueMember
+ UnpauseQueueMember
+ AGENT
+ agents.conf
+ queues.conf
+
+
+
+
+ Record agent's outgoing call.
+
+
+
+
+
+
+
+
+
+
+
+ Tries to figure out the id of the agent who is placing outgoing call based on
+ comparison of the callerid of the current interface and the global variable
+ placed by the AgentCallbackLogin application. That's why it should be used only
+ with the AgentCallbackLogin app. Uses the monitoring functions in chan_agent
+ instead of Monitor application. That has to be configured in the
+ agents.conf file.
+ Normally the app returns 0 unless the options are passed.
+
+
+ agents.conf
+
+
+
+
+ Gets information about an Agent
+
+
+
+
+ The valid items to retrieve are:
+
+
+ (default) The status of the agent (LOGGEDIN | LOGGEDOUT)
+
+
+ The password of the agent
+
+
+ The name of the agent
+
+
+ MusicOnHold class
+
+
+ The callback extension for the Agent (AgentCallbackLogin)
+
+
+ The name of the active channel for the Agent (AgentLogin)
+
+
+
+
+
+
+ ***/
+
static const char tdesc[] = "Call Agent Proxy Channel";
static const char config[] = "agents.conf";
static const char app[] = "AgentLogin";
static const char app3[] = "AgentMonitorOutgoing";
-static const char synopsis[] = "Call agent login";
-static const char synopsis3[] = "Record agent's outgoing call";
-
-static const char descrip[] =
-" AgentLogin([AgentNo][,options]):\n"
-"Asks the agent to login to the system. Always returns -1. While\n"
-"logged in, the agent can receive calls and will hear a 'beep'\n"
-"when a new call comes in. The agent can dump the call by pressing\n"
-"the star key.\n"
-"The option string may contain zero or more of the following characters:\n"
-" 's' -- silent login - do not announce the login ok segment after agent logged on/off\n";
-
-static const char descrip3[] =
-" AgentMonitorOutgoing([options]):\n"
-"Tries to figure out the id of the agent who is placing outgoing call based on\n"
-"comparison of the callerid of the current interface and the global variable \n"
-"placed by the AgentCallbackLogin application. That's why it should be used only\n"
-"with the AgentCallbackLogin app. Uses the monitoring functions in chan_agent \n"
-"instead of Monitor application. That has to be configured in the agents.conf file.\n"
-"\nReturn value:\n"
-"Normally the app returns 0 unless the options are passed.\n"
-"\nOptions:\n"
-" 'd' - make the app return -1 if there is an error condition\n"
-" 'c' - change the CDR so that the source of the call is 'Agent/agent_id'\n"
-" 'n' - don't generate the warnings when there is no callerid or the\n"
-" agentid is not known.\n"
-" It's handy if you want to have one context for agent and non-agent calls.\n";
-
static const char mandescr_agents[] =
"Description: Will list info about all possible agents.\n"
"Variables: NONE\n";
@@ -2467,17 +2540,7 @@ static int function_agent(struct ast_channel *chan, const char *cmd, char *data,
struct ast_custom_function agent_function = {
.name = "AGENT",
- .synopsis = "Gets information about an Agent",
- .syntax = "AGENT([:item])",
.read = function_agent,
- .desc = "The valid items to retrieve are:\n"
- "- status (default) The status of the agent\n"
- " LOGGEDIN | LOGGEDOUT\n"
- "- password The password of the agent\n"
- "- name The name of the agent\n"
- "- mohclass MusicOnHold class\n"
- "- exten The callback extension for the Agent (AgentCallbackLogin)\n"
- "- channel The name of the active channel for the Agent (AgentLogin)\n"
};
@@ -2501,8 +2564,8 @@ static int load_module(void)
if (persistent_agents)
reload_agents();
/* Dialplan applications */
- ast_register_application(app, login_exec, synopsis, descrip);
- ast_register_application(app3, agentmonitoroutgoing_exec, synopsis3, descrip3);
+ ast_register_application_xml(app, login_exec);
+ ast_register_application_xml(app3, agentmonitoroutgoing_exec);
/* Manager commands */
ast_manager_register2("Agents", EVENT_FLAG_AGENT, action_agents, "Lists agents and their status", mandescr_agents);