This section introduces and explains how to use AMIgo implementation of the local channels agents.

What are 'Local Channel Agents'

Local channel agents are an alternative to the standard Asterisk's Agent Channel which offers more versatility and can be used as a replacement for the now deprecated Agent Callback feature, and more...

The name 'local channel agent' refer to the fact that this approach does not use the agent channel driver, but local channels which branch in the dialplan and use dialplan logic to process the call. The agents definitions are stored in the Asterisk DB so that they are easily accessible to the dialplan and to the AMI.

Using local channels allows for more versatility while retaining all the functionnality of the Agent Channels. Local channel agent behave in a very similar way than the agent channel except for a few details which are mostly hidden by AMIgo. The two types can even be used in a same system if desired or required.

Note

1 - The agent channel with callback feature has been deprecated and is is not supported by Asterisk version 1.6 and up. You must use local channel agent if you want the callback feature.

2 - The local channel agent doest not suppot agent login (without callback) where a agent calls in to login and stay on line with MOH to wait for call. Use 'channel agent' if you want this mode of operation.

Agent definition / AstDB

The agent definition are made up of 5 fields separated by a ! character and are stored in the AstDB. The AstDB allows to store data grouped in families and identified with a key that is unique within the family. Agents definitions are stored under a Key named 'Local' and the Family is the Agent Number / Extension.

The agent definitions fields are as follow:

  • Current Callback Location: This is the callback location or external phone number (including trunk access dial prefix), with optional context or "n/a" if not logged in
  • Login time: as a Unix timestamp or '0' if not logged in. This is used to calculate loogedin time at the end of the session. It is filled by the dialplan and or AMIgo controls when loggin in.
  • Default Location: If blank, ask callback location to agent on login. Used for quick loging/logoff. Leave the default extension blank if you want 'hot-desking' for this agent.
  • Default queues membership: A list of coma separated queues. If this is left blank, the agent should then use the queue specific login procedure for login / logof.
  • Agent Group Number (currently not used/reserved for future)

Here are a few example of local channel agents definition as stored in the AstDB:

  • /Local/6700 : n/a!0!6001!6500,6501!
  • /Local/6701 : 95555551212@DLPN_DialPlan2!1297263232!95555551212@DLPN_DialPlan2!6500,6501!1
  • /Local/6702 : 6001!1297786374!6002@DLPN_DialPlan1!6502!2

In the first example the agent no. 6700 is currently not loged in, it's default location is extension 6001 (at default context), this agent will be logged in for the queues extensions 6500 and 6501 and no group number is defined.

In the second example the agent no. 6701 is currently logged in with an external number callback location, it's default location. The system will call the agent using the DLPN_DialPlan2 context, which can contains instruction to dial the external agent using a specific trunk group, for instance. This default queues for this agent are extensions 6500 and 6501. The group number is '1'.

In the third example the agent no. 6702 is currently logged in with a local extension callback location, it's not it's default location. This agent is logged in for the queue extension 6500 and has a group number of '2'.

AMIgo Agent Editor
Edit Agent

Note

You can display and edit the content of the AstDB by using the AMIgoCommandPanel control.

Dialplan support

This section contains the following subsections.

In order to support the use of local channels as agents, some dial plan support is required. The local channel agent dialplan support provided by AMIgo offers functions to Login / Logoff for the Local (or regular Agent channel) agent and instruction to call back the local agent.

When the system call a local channel agent, the local agent number is actually used in the dialplan as a key to lookup the information for the agent that is located in the AstDB. This information is used to place the call to the agent.

An extension is defined by the system manager for agents Login / logout and another one for agent callback login / logoff. By default, the two last extension in the range reserved for agent are used for this purpose. These entry point extension can be changed if desired. For example assuming the range reserved for agent is 6500 - 6999, the extension 6998 will be assigned for Channel agent login (not callback), and 6999 will be assigne for Local and Channels agent login with callback.

Note

These extensions are stored in the general context of the agents.conf configuration file under the keys loginexten and cbloginexten.

Adding Dialplan support for local channel agents

Support for local agent can easily be added to the dialplan with a single method call, with the ConfigAddAgentSupportToDialplan(String, String, Int32) method. This will add a new agents context to the dialplan and two new macros: queues-login and queue-logoff.

Agents Callback Login with default values

Local channel agents (and regular agents) can login and logoff by calling the extension that is defined in the AMIgo setup (see note above). The dialplan logic will ask the agent number, and optionally, a password. If the agent is already logged in he will be logged off from all the queues defined in it's default membership list. If logged off and a default location is not defined a new location will be requested, and the agent will be logged in to all queues defined in it's default membership list. If hot desking is required, the agent's default location must be left blank, so that the location will be asked and used for callback.

Queue specific Login/Logoff

An agent can login / logof to / from a specific queue number by dialing its agent number followed by the desired queue number folowed by a '1' to login or a '0' to logoff. This login method can be used to overide the default location and queue.

For example agent 6700 can login to queue 6500 by dialing 6700 6500 1 and loggof from the same queue by calling 6700 6500 0.

Quick Login/Logoff

The quick loging procedure can be used when the agent login from the location that is defined as it's default location. In this case, the agent can login / logoff just by calling it's own agent number. For instance, suppose local agent number 6700 has it's default extension defined as 6000. Then he can simply call it's agent number, that is 6700 from it's default location extension (6000) to login / Logoff. If already logged in, calling 6700 (from default extension 6000) will logoff the agent. This quick login/logoff method can be used when hot desking is not required, or when agents have fixed assigned extensions.