The agents.conf File

If you’ve browsed through the samples in the ~/src/asterisk-complete/1.8/configs/ directory, you may have noticed the agents.conf file. It may seem tempting, and it has its places, but overall the best way to implement queues is through the use of SIP channels. There are two reasons for this. The first is that SIP channels are the only type that provide true device state information. The other reason is that agents are always logged in when using the agent channel, and if you’re using remote agents, the bandwidth requirements may be greater than you wish. However, in busy call centers it may be desirable to force agents to answer calls immediately rather than having them press the answer button on the phone.

The agents.conf file is use to define agents for queues using the agents channel. This channel is similar in nature to the other channel types in Asterisk (local, SIP, IAX2, etc.), but it is more of a pseudo-channel in that it is used to connect callers to agents who have logged into the system using other types of transport channel. For example, suppose we use our SIP-enabled phone to log in to Asterisk using the AgentLogin() dialplan application. Once we’re logged in, the channel remains online the entire time it is available (logged on), and calls are then passed to it through the agent channel.

Let’s take a look at the various options available to us in the agents.conf file to get a better idea of what it provides us. Table 13.3, “Options available under the [general] header in agents.conf” shows the single option available in the [general] section of agents.conf. Table 13.4, “Options available under the [agents] header in agents.conf” shows the available options under the [agents] header.

Table 13.3. Options available under the [general] header in agents.conf

OptionsAvailable valuesDescription
multipleloginyes, noIf set to yes, a single line on a device can log in as multiple agents. Defaults to yes.

Table 13.4. Options available under the [agents] header in agents.conf

OptionsAvailable valuesDescription
maxloginretriesInteger valueSpecifies the maximum number of tries an agent has to log in before the system considers it a failed attempt and ends the call. Defaults to 3.
autologoffValue in secondsSpecifies the number of seconds for which an agent’s device should ring before the agent is automatically logged off.
autologoffunavailyes, noIf set to yes, the agent is automatically logged off when the device being called returns a status of CHANUNAVAIL.
ackcallyes, noIf set to yes, the agent must enter a single DTMF digit to accept the call. To be used in conjunction with acceptdtmf. Defaults to no.
acceptdtmfSingle DTMF characterUsed in conjunction with ackcall, this option defines the DTMF character to be used to accept a call. Defaults to #.
endcallyes, noIf set to yes, allows an agent to end a call with a single DTMF digit. To be used in conjunction with enddtmf. Defaults to yes.
enddtmfSingle DTMF characterUsed in conjunction with endcall, this option defines the DTMF character to be used to end a call. Defaults to *.
wrapuptimeValue in millisecondsSpecifies the amount of time after disconnection of a caller from an agent for which the agent will not be available to accept another call. Used in situations where agents must perform a function after each call (such as entering call details into a log).
musiconholdMusic class as defined in musiconhold.confDefines the default music class agents listen to when logged in.
goodbyeName of file (relative to /var/lib/asterisk/sounds/<lang>/)Defines the default goodbye sound played to agents. Defaults to vm-goodbye.
updatecdryes, noUsed in call detail records to change the source channel field to the agent/agent_id.
groupInteger valueAllows you to define groups for sets of agents. The use of agent groups is essentially deprecated functionality that we do not recommend you use. If you define group1, you can use Agent/@1 in queues.conf to call that group of agents. The call will be connected arbitrarily to one of those agents. If no agents are available, it will return back to the queue like any other unanswered call. If you use Agent/:1, it will wait for a member of the group to become available. The use of strategies has no effect on agent groups. Do not use these.
recordagentcallsyes, noEnables/disables the recording of agent calls. Disabled by default.
recordformatFile format (gsm, wav, etc.)Defines the format to be used when recording agent calls. Default is wav.
urlprefixString (URL)Accepts a string as its argument. The string can be formed as a URL and is appended to the start of the text to be added to the name of the recording.
savecallsinFilesystem path (e.g., /var/calls/)Accepts a filesystem path as its argument. Allows you to override the default path of /var/spool/asterisk/monitor/ with one of your choosing.[a]
custom_beepName of file (relative to /var/lib/asterisk/sounds/<lang>/)Accepts a filename as its argument. Can be used to define a custom notification tone to signal to an always-connected agent that there is an incoming call.
agentAgent definition (see description)Defines an agent for use by Queue() and AgentLogin(). These are agents that will log in and stay connected to the system, waiting for calls to be delivered by the Queue() dialplan application. Agents are defined like so:
agent => agent_id,agent_password,name

An example of a defined agent would be:

agent => 1000,1234,Danielle Roberts

[a] Since the storage of calls will require a large amount of hard drive space, you will want to define a strategy to handle storing and managing these recordings. This location should probably reside on a separate volume, one with very high performance characteristics.