Agent Login (to queues)

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:

agent-loginok
agent-loggedoff

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

[code:1]

[ext-queues-custom]
; 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()

[macro-easy-agent-del]
exten => s,1,NoOp
exten => s,2,SetVar(CALLBACKNUM=${CALLERIDNUM})
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

[macro-easy-agent-add]
exten => s,1,NoOp
exten => s,2,SetVar(CALLBACKNUM=${CALLERIDNUM})
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

[/code:1]

Steve
mousepad99 at gmail.com

1 Like