Add AgentMonitorOutgoing application to allow recording of outgoing calls made by the interface that is registered as an callback agent. Refer to "show application AgentMonitorOutput" for more info.
"The agent's callback extension is called (optionally with the specified\n"
"context. \n";
staticchar*descrip3=
" AgentMonitorOutgoing([options]):\n"
"Tries to figure out the id of the agent who is placing outgoing call based on comparision 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 have to be configured in the agents.conf file. Normally the app returns 0 unless the options are passed. Also if the callerid or the agentid are not specified it'll look for n+101 priority. The options are:\n"
" 'd' - make the app return -1 if there is an error condition and there is no extension n+101\n"
" 'c' - change the source channel in the CDR record for this call to agent/agent_id so that we know which agent generates the call\n"
" 'n' - don't generate the warnings when there is no callerid or the agentid is not known. It's handy if you want to have one context for agent and non-agent calls.\n";
staticcharmoh[80]="default";
#define AST_MAX_AGENT 80 /* Agent ID or Password max length */
@ -94,6 +103,8 @@ int createlink = 0;
charurlprefix[AST_MAX_BUF];
charsavecallsin[AST_MAX_BUF];
#define GETAGENTBYCALLERID "AGENTBYCALLERID"
staticstructagent_pvt{
ast_mutex_tlock;/* Channel private lock */
intdead;/* Poised for destruction? */
@ -252,9 +263,8 @@ static int agent_answer(struct ast_channel *ast)
ast_log(LOG_WARNING,"Couldn't find the global variable %s, so I can't figure out which agent (if it's an agent) is placing outgoing call.\n",agentvar);
}
}else{
res=-1;
if(!nowarnings)
ast_log(LOG_WARNING,"There is no callerid on that call, so I can't figure out which agent (if it's an agent) is placing outgoing call.\n");