B.5. AgentMonitorOutgoing()

Records the outgoing calls of an agent.
AgentMonitorOutgoing([options])
Records all the outgoing calls of an agent.
This application attempts to determine the ID of an agent making an outgoing call by comparing the caller ID of the agent with a global variable set by the AgentCallbackLogin() application. As such, it should be used with AgentCallbackLogin(), and always in a later priority. This application uses monitoring functions in chan_agent instead of Monitor(), so call recording must be configured in agents.conf.
By default, recordings are saved in /var/spool/asterisk/monitor/. You can override this behavior with the parameter savecallsin in agents.conf.

Warning

Be aware that recording of calls may be subject to freedom of information and privacy legislation in your jurisdiction. As a matter of professional practice you should know the terms under which it is lawful to record telephone calls. In most jurisdictions it is illegal to record a call without the knowledge of the participants.
If the caller ID and/or agent id for the agent cannot be determined, the call jumps to priority n+101, if it exists.
Unless the options specify otherwise, the application returns 0.
The following options may be used:
d
Forces the return of -1 in the event of error if there is no n+101 priority.
c
Changes the call detail record so that the source of the call is agent/agentid rather than the caller ID.
n
Suppresses error messages if the caller ID and/or agent ID cannot be determined. This is useful if a common context for agent and non-agent calls is desired.
; record outgoing calls of this agent and adjust the CDR accordingly
exten => 123,1,AgentMonitorOutgoing(c)

Note

Internal help for this application in Asterisk 1.4:
  -= Info about application 'AgentMonitorOutgoing' =- 

[Synopsis]
Record agent's outgoing call

[Description]
  AgentMonitorOutgoing([options]):
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 have to be configured in the agents.conf file.

Return value:
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.

Options:
 'd' - make the app return -1 if there is an error condition and there is
       no extension n+101
 'c' - change the CDR so that the source of the call is 'Agent/agent_id'
 '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.
diff output to internal help in Asterisk 1.2:
- none -