Im trying to get the SIP Username / Agent number after the call has hung up. The following is my extensions.conf relevent information:
[sub-queue]
exten => h,1,AGI(queue-answered.php,${AGENTNUMBER},${SIP_HEADER(username)},${SIPUSERAGENT},55)
exten => s,2,ExecIf($["${ARG1}"="msg"]?Playback(adro/record-warning))
;same => n,AGI(queue-answered.php,55)
;same => n,AGI(queue-answered.php,${AGENTNUMBER})
;same => n,AGI(queue-answered.php,${SIP_HEADER(username)})
;exten => h,AGI(queue-answered.php,${AGENTNUMBER})
same => n,Queue(someQueue,tk,,,150)
;exten => h,1,AGI(queue-answered.php,${AGENTNUMBER})
same => n,Dial(SIP/CL/${ANSWERINGNUM})
same => n,Return()
And the AGI script calls:
foreach($argv as $t=>$l)
{log_agi("Got $t=$l");}
Which displays:
-- Launched AGI Script /var/lib/asterisk/agi-bin/queue-answered.php
queue-answered.php,,,,55:
queue-answered.php,,,,55: Got 0=/var/lib/asterisk/agi-bin/queue-answered.php
queue-answered.php,,,,55: Got 1=
queue-answered.php,,,,55: Got 2=
queue-answered.php,,,,55: Got 3=
queue-answered.php,,,,55: Got 4=55
This means that all the variables in the params are blank… Except for the 55 which i put there to show that it is working
So how do you catch the agent who picked up the call within Extensions.conf?
Thanks in advance
(Btw, cant use CDR for a variety of reasons)
Using Asterisk 1.8 from source. Addon pack installed.