[asterisk-users] Macro arguments on app_queue

Cesar Benjamin Garcia Martinez cesar at codinet.com.mx
Thu May 7 16:49:58 CDT 2009


thanks for answer, but is not working...

with your dialplan asterisk returns chan status UNKNOWN and nothing else..

before my mail, i try to use ${MEMBERINTERFACE} and  ${MEMBERNAME} into 
myMacro , but his values are ever "" of course, i put yes on 
setinterfacevar=yes, on queues.conf file, you can see:

[testt]

musicclass = default
strategy = rrmemory
timeout = 10
retry = 1
maxlen = 0
setinterfacevar=yes
setqueueentryvar=yes
setqueuevar=yes
eventwhencalled = vars
;membermacro=jabberizar,${MEMBERINTERFACE}
membermacro=jabberizar
ringinuse = no
announce-frequency = 0
announce-holdtime = no
announce-position = no

member => SIP/101,,nombre de agente 101
member => SIP/102,,nombre de agente 102
member => SIP/103,,nombre de agente 103

my purpose with this is, when an agent takes a call, execute a macro and 
that macro send a jabber message to a jabber client depending of  
${MEMBERINTERFACE}, but his value is empty, how do i can recover that 
value from myMacro??


Jim Dickenson escribió:
> Here is what I do:
>
> [macro-cfmc_queue_private]
> ; Due to a change around version 1.6.0.8 MEMBERINTERFACE and 
> MEMBERNAME are not set but CHANNEL has the agent we are connected with.
> ; We need to look for Agent/<number> is either CHANNEL or 
> MEMBERINTERFACE and it will be in one or the other
> exten => s,1,UserEvent(DidQueue,ActionID:${Local_CfMC_ActionID} & 
> ${UNIQUEID} & ${CHANNEL} & ${Local_CfMC_AgentToUse} & 
> ${Local_CfMC_DialInfo} & ${Local_CfMC_QueueToUse} & ${MEMBERINTERFACE} 
> & ${MEMBERNAME})
>
>
>
> exten => queue_answer,1,Answer()
> exten => queue_answer,n,Set(CfMC_AMDValue="NotChecked")
> exten => queue_answer,n,GotoIf($["${CfMC_DoAMD}"!="Yes"]?NoAMD)
> exten => queue_answer,n,AMD()
> ; AMDSTATUS - MACHINE HUMAN NOTSURE HANGUP
> exten => queue_answer,n,Set(CfMC_AMDValue="${AMDSTATUS}")
> exten => queue_answer,n(NoAMD),Wait(0.3)
> exten => 
> queue_answer,n,UserEvent(BeforeQueue,ActionID:${CfMC_ActionID} & 
> ${UNIQUEID} & ${CHANNEL} & ${CfMC_AgentToUse} & ${CfMC_DialInfo} & 
> ${CfMC_QueueToUse} & ${CfMC_AMDValue} & ${AMDCAUSE})
> exten => queue_answer,n,GotoIf($[${CfMC_AMDValue} & "NotChecked"]?QueueIt)
> exten => queue_answer,n,GotoIf($[${CfMC_AMDValue}!="HUMAN"]?ForceHangUp)
> ; Some time around version 1.6.0.8 * hangs up a channel before it used 
> to so the channel pointed at macro cfmc_queue_private is not the same one.
> ; This causes us to be looking at a different channel thus some of our 
> variables were not there. We need to propogate them upward so do Set().
> exten => 
> queue_answer,n(QueueIt),Set(_Local_CfMC_ActionID=${CfMC_ActionID})
> exten => queue_answer,n,Set(_Local_CfMC_AgentToUse=${CfMC_AgentToUse})
> exten => queue_answer,n,Set(_Local_CfMC_DialInfo=${CfMC_DialInfo})
> exten => queue_answer,n,Set(_Local_CfMC_QueueToUse=${CfMC_QueueToUse})
> exten => 
> queue_answer,n,Queue(${CfMC_QueueToUse},cn,,,20,,cfmc_queue_private)
> ; QUEUESTATUS - TIMEOUT FULL JOINEMPTY LEAVEEMPTY JOINUNAVAIL 
> LEAVEUNAVAIL CONTINUE
> exten => queue_answer,n,UserEvent(AfterQueue,ActionID:${CfMC_ActionID} 
> & ${UNIQUEID} & ${CHANNEL} & ${CfMC_AgentToUse} & ${CfMC_DialInfo} & 
> ${CfMC_QueueToUse} & ${QUEUESTATUS})
> exten => queue_answer,n(ForceHangUp),Hangup()
>
> -- 
> Jim Dickenson
> mailto:dickenson at cfmc.com
>
> CfMC
> http://www.cfmc.com/
>
>
>
> > From: <cesar at codinet.com.mx>
> > Reply-To: Asterisk Users Mailing List - Non-Commercial Discussion
> > <asterisk-users at lists.digium.com>
> > Date: Thu, 07 May 2009 13:20:02 -0500
> > To: <asterisk-users at lists.digium.com>
> > Subject: [asterisk-users] Macro arguments on app_queue
> >
> > hi list, i have a question about the args of queue:
> >
> > when we use Queue() app, there are some arguments than can use. help from
> > CLI:
> >
> > Queue(queuename[,options[,URL[,announceoverride[,timeout[,AGI[,macro[,gosub[,r
> > ule]]]]]]]])
> >
> > well.. i'm trying to identify who has taken the call on a queue, and, 
> when
> > agent conected, launch a macro with some args based on who takes the call
> >
> > i do:
> >
> > exten => s,1,answer()
> > exten => s,1,Queue(myQueue,,,,,,myMacro)
> >
> > but, there is no arguments there, right?
> >
> > what about use
> >
> >
> > exten => s,1,answer()
> > exten => s,1,Queue(myQueue,,,,,,myMacro,arg1)
> >
> > (remember that macro works like exten => 
> s,n,Macro(myMacro,myArg1,myArg2),
> > that means, concatenate args after macro name, separate with comas.
> >
> > but....
> >
> > Queue takes that thing after comas like other arguments OF QUEUE, not
> > subargs of args. this is, my second example says,
> > Queue(myQueue,,,,,,myMacro,arg1), but "arg1" is taken like queue argument
> > means Gosub entry...
> >
> > there is way of call that macro into queue, but with macro arguments ???
> >
> > in the queues.conf
> >
> > if i put
> >
> > membermacro=myMacro,myArgument
> >
> > works fine.. except that, i can't use
> >
> > membermacro=myMacro,${MYVAR}
> >
> > because ${MYVAR} is taken like String, not the var value
> >
> > help mee!! please
> >
> > sorry for my very bad english
> >
> > _______________________________________________
> > -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> >
> > asterisk-users mailing list
> > To UNSUBSCRIBE or update options visit:
> >    http://lists.digium.com/mailman/listinfo/asterisk-users
>
>
> __________ Information from ESET NOD32 Antivirus, version of virus 
> signature database 3832 (20090206) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
> ------------------------------------------------------------------------
>
> _______________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>
>
> __________ Information from ESET NOD32 Antivirus, version of virus signature database 3832 (20090206) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>   



__________ Information from ESET NOD32 Antivirus, version of virus signature database 3832 (20090206) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com





More information about the asterisk-users mailing list