How i know who Agent answer a call in a queue?

I need make a IVR and one option is transfer the call to a queue, but i need know the Agent that answered the call, how make this in a dialplan?.

Thanks for your assistance!!
Felix Vidal
from Chile

See the membermacro option, set the setinterfacevar variable to yes, and then create a macro that pulls MEMBERINTERFACE

Hi malcomd

i made that but don’t work, i have asterisk 1.6 and this is my configuration:

extensions.conf

exten => 1000,1,Answer()
exten => 1000,n,Set(CALLERID=1234)
exten => 1000,n,Queue(1000,tT)
exten => 1000,n,NoOp(MY AGENT IS : ${MEMBERINTERFACE} ${MEMBERNAME})
exten => 1000,n,Hangup

queues.conf

[general]
persistentmembers=yes
keepstats=yes
autofill = yes
monitor-type = MixMonitor

[1000]
musicclass = default
strategy=Leastrecent
timeout = 15
retry = 5
weight=0
autopause=no
maxlen = 0
announce-frequency = 90
min-announce-frequency = 15
announce-holdtime = once
announce-position = yes
announce-round-seconds = 10
setinterfacevar=yes

help me please!!

Thanks!!

this is my output

== Using SIP RTP CoS mark 5
– Executing [1000@internal:1] Answer(“SIP/4000-0000000a”, “”) in new stack
– Executing [1000@internal:2] Set(“SIP/4000-0000000a”, “CALLERID=1234”) in new stack
– Executing [1000@internal:3] Queue(“SIP/4000-0000000a”, “1000,tT”) in new stack
– Started music on hold, class ‘default’, on SIP/4000-0000000a
– Stopped music on hold on SIP/4001-00000000
– agent_call, call to agent ‘12647847’ call on ‘SIP/4001-00000000’
– <SIP/4001-00000000> Playing ‘beep.gsm’ (language ‘es’)
– Agent/12647847 answered SIP/4000-0000000a
– Stopped music on hold on SIP/4000-0000000a
– Started music on hold, class ‘default’, on SIP/4001-00000000
== Spawn extension (internal, 1000, 3) exited non-zero on ‘SIP/4000-0000000a’

thank’s!!
Felix Vidal

I don’t see the membermacro option or your macro. You did both?

Hi malcomd
only works with macro?, I found a post that explains how it works, but with macro, is that correct?

extensions.conf
[macro-mymacro]
exten => s,1,NoOp(${MEMBERINTERFACE})

[queue]
exten => s,1,Queue(queue)

queues.conf
setinterfacevar=yes
membermacro=mymacro

Thank’s malcomd!!!

the variable that contains the agent who answered the call is “${QAGENT}”

Hi mos33

how i get that variable?, on the queue dialplan?

exten => 1000,1,Answer()
exten => 1000,n,Set(CALLERID=1234)
exten => 1000,n,Queue(1000,tT)
exten => 1000,n,NoOp(MY AGENT IS : ${QAGENT})
exten => 1000,n,Hangup

this is ok??

thanks!!

can you tellme if this code is ok?

thank’s!!!