AddQueueMember

Get help with installing, upgrading and running Asterisk.

Moderators: muppetmaster, Moderator, Support

AddQueueMember

Postby chimeno » Fri Jul 11, 2014 4:16 am

Hi

I have made a macro, to login extensions in more than one queue at the same time, with the same code, the problem is the following:

When I made -> myserver*CLI> queue show QueueNumber

The extensions that was logged with my macro appears like:
(extension 5)
Local/5@from-queue/n (ringinuse enabled) (dynamic) (Not in use) has taken no calls yet

And the extensions that was logged with the default code *45 appears like:
(extension 6)
ExtensionName (Local/6@from-queue/n from SIP/6) (ringinuse enabled) (Unavailable) has taken no calls yet

I would like to have the same information allways, because for exameple later I can find the agents by name in the logs..

I think that the problem is in my AddQueueMember, I'm trying to change it, but I can't have the extension name and (Local/6@from-queue/n from SIP/6) all together... :(
My macro:
[macro-agent-signin-MyMacro]
include => macro-agent-add-custom
exten => s,n,Goto(app-queue-toggle,s,start)
exten => s,1,Wait(1)
exten => s,n,Macro(user-callerid,SKIPTTL)
exten => s,n,GotoIf($["${CALLBACKNUM}" != ""]?a7)
exten => s,n(a5),Set(CALLBACKNUM=${AMPUSER})
exten => s,n,ExecIf($["${CALLBACKNUM}" = ""],Set,CALLBACKNUM=${CALLERID(number)})
exten => s,n,GotoIf($["${CALLBACKNUM}" = ""]?a3)
exten => s,n(a9),AddQueueMember(333,Local/${CALLBACKNUM}@from-queue/n)
exten => s,n(a9),AddQueueMember(777,Local/${CALLBACKNUM}@from-queue/n)
exten => s,n,UserEvent(Agentlogin,Agent: ${CALLBACKNUM})
exten => s,n,Wait(1)
exten => s,n,Playback(agent-loginok&with&extension)
exten => s,n,SayDigits(${CALLBACKNUM})
exten => s,n,Hangup
exten => s,n,MacroExit()
exten => s,n(invalid),Playback(pbx-invalid)
exten => s,n,Goto(a3)

; end of [macro-agent-signing-MyMacro]


[macro-agent-signout-MyMacro]
include => macro-agent-del-custom
exten => s,1,Wait(1)
exten => s,n,Macro(user-callerid,SKIPTTL)
exten => s,n(a3),Read(CALLBACKNUM,agent-logoff,,,,)
exten => s,n,GotoIf($["${CALLBACKNUM}" = ""]?a5:a7)
exten => s,n(a5),Set(CALLBACKNUM=${AMPUSER})
exten => s,n,ExecIf($["${CALLBACKNUM}" = ""],Set,CALLBACKNUM=${CALLERID(number)})
exten => s,n,GotoIf($["${CALLBACKNUM}" = ""]?a3)
exten => s,n(a7),RemoveQueueMember(333,Local/${CALLBACKNUM}@from-queue/n)
exten => s,n(a7),RemoveQueueMember(777,Local/${CALLBACKNUM}@from-queue/n)
exten => s,n,UserEvent(RefreshQueue)
exten => s,n,Wait(1)
exten => s,n,Playback(agent-loggedoff)
exten => s,n,Hangup

; end of [macro-agent-signout--MyMacro]

[from-internal-custom]
exten => 22*,1,Macro(agent-signin-MyMacro)
exten => 22**,1,Macro(agent-signout-MyMacro)

Regards
chimeno
Newsterisk
 
Posts: 10
Joined: Fri Apr 04, 2014 4:09 am

Return to Asterisk Support

Who is online

Users browsing this forum: Exabot [Bot] and 1 guest