AgentCallbackLogin() help

I have two questions:

  1. Is it possible to have AgentCallbackLogin() auto logoff an agent without them having to press the ‘#’ for no extension? I want my users to put in their login and password only and have it auto log them off (much like how I can set it up so it auto logs them in to an extension).

  2. Is it possible to have it setup in such a way that I can have one extension for logging into and out of a queue? By that I mean my users will be prompted for a login/password combination. If they are already logged in, it will log them out, otherwise it will log them in.

Thanks in advance.

Hello? Anyone? Help, please.

Bump again. Someone has to know the answers.

here, as most forums, lack of a response implies otherwise. unless you think we know and are just toying with you?

yeah, we’re toying with you !! i couldn’t be bothered to build the extension myself for you but i can paste some macros from an AMP setup that will give you a headstart.

[code][macro-agent-add]
exten => s,1,Wait(1)
exten => s,2,Macro(user-callerid)
exten => s,3,Read(CALLBACKNUM,agent-user) ; get callback number from user
exten => s,4,GotoIf($[foo${CALLBACKNUM} = foo]?5:7)) ; if user just pressed # or timed out, use cidnum
exten => s,5,SetVar(CALLBACKNUM=${CALLERIDNUM})
exten => s,6,GotoIf($[foo${CALLBACKNUM} = foo]?2)) ; if still no number, start over
exten => s,7,GotoIf($[foo${ARG2} = foo]?9:8)) ; arg2 is queue password
exten => s,8,Authenticate(${ARG2})
exten => s,9,AddQueueMember(${ARG1}|Local/${CALLBACKNUM}@from-internal) ; using chan_local allows us to have agents over trunks
exten => s,10,Wait(1)
exten => s,11,Playback(agent-loginok)
exten => s,12,Hangup()

; Removes a dynamic agent/member from a Queue
; Prompts for call-back number - in not entered, uses CIDNum
[macro-agent-del]
exten => s,1,Wait(1)
exten => s,2,Macro(user-callerid)
exten => s,3,Read(CALLBACKNUM,agent-user) ; get callback number from user
exten => s,4,GotoIf($[foo${CALLBACKNUM} = foo]?5:7)) ; if user just pressed # or timed out, use cidnum
exten => s,5,SetVar(CALLBACKNUM=${CALLERIDNUM})
exten => s,6,GotoIf($[foo${CALLBACKNUM} = foo]?2)) ; if still no number, start over
exten => s,7,RemoveQueueMember(${ARG1}|Local/${CALLBACKNUM}@from-internal)
exten => s,8,Wait(1)
exten => s,9,Playback(agent-loggedoff)
exten => s,10,Hangup()

[ext-queues]
exten => 900*,1,Macro(agent-add,900,)
exten => 900**,1,Macro(agent-del,900)
[/code]now all you need to do is adapt this so that it uses a single number/macro to log in/out (probably by setting a db value to ASTDB ?) and clean out the bits you don’t have or won’t use.

btw, using the # key to signal the end of the input just makes things faster from the user’s point of view … i dislike having to wait for digit timeouts, but you can modify the Read() options to only accept x digits with no # termination required.

Bacon,
That works fine for dynamic queue members but it doesn’t work for static Agents. What we really need is a AgentCallbackLogin that doesn’t require an extension. I would like only queue calls to be sent to agent devices and I don’t understand why this would require an extension. If I use AgentLogin then there is no requirement for an exten so why is this requirement there for AgentCallbackLogin? Just bridge the call to the chan_agent.