[code]queues.conf
[420786]
setinterfacevar=yes
setqueuevar=yes
setqueueentryvar=yes
membermacro=queuemacro
autofill=no
eventmemberstatus=no
eventwhencalled=no
joinempty=yes
leavewhenempty=no
maxlen=0
reportholdtime=no
retry=5
ringinuse=yes
servicelevel=60
strategy=ringall
timeout=15
weight=0
wrapuptime=0
member => SIP/991
member => SIP/999
extensions.conf
[from-pstn-queue]
exten => _X.,1,Goto(s,1)
exten => s,n,Ringing()
exten => s,n,Set(MSISDN=${CALLERID(number)})
;exten => s,n,Queue(420786,queuemacro^${MSISDN}) ---- Doesn’t work
exten => s,n,Queue(420786,queuemacro) ;---- Works
exten => s,n,Hangup
[macro-queuemacro]
exten => s,1,Set(PICKUPOPER=${CALLERID(num)})
exten => s,n,Noop(*** MACRO : Queue Macro : ${ARG1} – ${PICKUPOPER} – ${MEMBERNAME} – ${MEMBERINTERFACE} – ***)
------ CLI Output ----------
-- Executing [s@from-pstn-queue:10] Queue("SIP/421-0000001c", "420786,,,,,,queuemacro") in new stack
-- Started music on hold, class 'default', on SIP/421-0000001c
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– SIP/999-0000001d connected line has changed. Saving it until answer for SIP/421-0000001c
– SIP/999-0000001d is ringing
– SIP/999-0000001d connected line has changed. Saving it until answer for SIP/421-0000001c
– SIP/999-0000001d answered SIP/421-0000001c
– Stopped music on hold on SIP/421-0000001c
– Executing [s@macro-queuemacro:1] Set(“SIP/999-0000001d”, “PICKUPOPER=999”) in new stack
– Executing [s@macro-queuemacro:2] NoOp(“SIP/999-0000001d”, “*** MACRO : Queue Macro : – 999 – SIP/999 – SIP/999 – ***”) in new stack
– Locally bridging SIP/421-0000001c and SIP/999-0000001d
== Spawn extension (from-pstn-queue, s, 10) exited non-zero on ‘SIP/421-0000001c’
[/code]
This is final code I got my original concern addressed, but the issue open is I can’t pass variables to macro in queue (highlighted ${MSISDN}). If I do that macro simply fails or never executes
Now I can get agent who picked the call BUT, callerid of caller is missing 