Agent Login (to queues)

Here’s what i’m trying to do.

I’m all set up with queues and extensions, what i’d like to have is unique agent logins, which are members in queues.

I can create the Agents in agents.conf no problem and * recognizes them with “show agents”. And I know to add them to queues as A###,#

All that works fine. Where i’m stuck is getting a live person to log into their agent number from their phone. I’ve found numerous AgentCallback examples, AgentLogin examples, and a few AddQueueMember examples. I can’t seem to get any of them to work.

So what i’m looking for is semi-detailed instructions telling me what to put where, examples are good too.

I’m trying to demo * and freepbx for my office as a solution for our current PBX issues and I would like to be able to show them a complete product. This is the ONLY thing holding me up.

Please help.

Now the obligatory system information:
CentOS 2.6.9-34.0.2
FreePBX 2.2.0beta2

this is what i use in my extensions_custom.conf. this add, or del in/fromqueues 100 and 101.

edit: you can change the Playback sound to the included sound files:


instead of the custom ones i’m using. they are part of asterisk sounds dist.


; Support queue logger for isp customer 45 french and english queues

; login to queue 100 (FR) and 101 (EN)
exten => 999*,1,Wait(1)
exten => 999*,n,Macro(easy-agent-add,100,) ;
exten => 999*,n,Macro(easy-agent-add,101,) ;
exten => 999*,n,Playback(agentloginfr)
exten => 999*,n,Hangup()

; logout from queue 100 (FR) and 101 (EN)
exten => 999**,1,Wait(1)
exten => 999**,n,Macro(easy-agent-del,100,) ;
exten => 999**,n,Macro(easy-agent-del,101,) ;
exten => 999**,n,Playback(agentlogoutfr)
exten => 999**,n,Hangup()

exten => s,1,NoOp
exten => s,3,GotoIf($[foo${CALLBACKNUM} = foo]?2))
exten => s,4,RemoveQueueMember(${ARG1}|Local/${CALLBACKNUM}@from-internal)
;Allows agents to log out without typing their id
;Arg1 = queue number

exten => s,1,NoOp
exten => s,3,GotoIf($[foo${CALLBACKNUM} = foo]?2)) ; if still no number, start over
exten => s,4,AddQueueMember(${ARG1}|Local/${CALLBACKNUM}@from-internal) ; using chan_local


mousepad99 at

1 Like

add to: extensions_custom.conf

exten => 400,1,AgentCallBackLogin(||@from-internal)

then do:
amportal restart
or may have to reboot.

Under your Queues the agents must be setup as Dynamic Agents ie: A100

Also update your agents.conf so it has something like:

Agent |Pass |Name
4100 1234 AgentName

  • Test
    Dial 400

You should be prompted for your Agent login: 4100
Then your agent password: 1234
Then will ask for your destination extension:

with the destination extension you could enter an extension number or your home/mobile phone number.

If you rather not have your agents enter there phone number manually setup Follow-me on the agents extension and in the extension box enter there home/mobile phone number followed by a # ie: 5551239999#

Then when the agent is asked for destination ext. they would enter there ext number.

*** its a great idea to enable the acknowledge setting in the agents.conf
this requires the agent to press the # after answering a call, to be connected
the caller is still on hold until the # is pressed.