Posted: Wed May 20, 2009 12:22 pm Post subject: [asterisk-users] Queue and Dial operation - Common Variables
Hi All,
I am trying to implement ACD using Asterisk 1.2.18 and I've chosen AgentCallbackLogin for login purpose. One AGI is written which will actually get executed when agent dials '1001' (say) from his SIP phone and enters into the queue. Second AGI gets executed when the Dial operation is performed. I see the agi_uniqueid obtained from both AGI instances are different and I can't really find a way to relate the pair. I need to perform some DB operations for agentlogin instance and dial instance. Is there a variable that is common for both instance or is there a way that I can pass variables across. My context and AGI's are given below.
I am trying to implement ACD using Asterisk 1.2.18 and I've chosen AgentCallbackLogin for login purpose. One AGI is written which will actually get executed when agent dials '1001' (say) from his SIP phone and enters into the queue. Second AGI gets executed when the Dial operation is performed. I see the agi_uniqueid obtained from both AGI instances are different and I can't really find a way to relate the pair. I need to perform some DB operations for agentlogin instance and dial instance. Is there a variable that is common for both instance or is there a way that I can pass variables across. My context and AGI's are given below.
--agi_agentlogin.sh
declare -a array
while read -e ARG && [ "$ARG" ] ; do
    array=(` echo $ARG | sed -e 's/://'`)
    echo ${array[0]} = ${array[1]} >>$LOG_FILE
    export ${array[0]}=${array[1]}
done
echo "SET VARIABLE agentno $agentid"
echo "SET VARIABLE sip_id $sipid"
Here $sipid and $agentid is obtained from the DB and that segment is not shown above.
agi_qdial.sh
declare -a array
while read -e ARG && [ "$ARG" ] ; do
    array=(` echo $ARG | sed -e 's/://'`)
    echo ${array[0]} = ${array[1]} >>$LOG_FILE
    export ${array[0]}=${array[1]}
done
echo "EXEC Dial SIP/$agi_extension 20 tTo"
Any hint on this??
Regards,
Kurian Thayil.
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
Posted: Thu May 21, 2009 6:25 pm Post subject: [asterisk-users] Queue and Dial operation - Common Variables
Hi Lenz,
Here is my objective. Planning to implement queue using Asterisk 1.2.18.
So created a queue named testqueue in queues.conf and then created
agents for this. Now, our actual requirement is to collect the callerid
from the inbound call and search in the DB (customer list) and display
the info in a web-browser. queues_log was able to parse and insert into
MySQL DB. So I have the callerid, queue uniqueid. Now, my challenge is,
for agents logged in, I have to display the information. Now, since
agent logged in via agentCallbackLogin application, they will be getting
call in the context described specqueuestat. And as you can see this is
actually an AGI (agi_qdial.sh) which will dial out to their extension.
It would be good if I can have the agi_uniqueid generated from queue in
agi_qdial.sh. In this way I can relate the two instance generated by
Asterisk, call entering the queue and the agents that are being tried
and can obtain corresponding agents that are tried for.
[inbound]
exten => 9712,1,AGI(agi_queue.sh)
Regards,
Kurian Thayil.
On Thu, 2009-05-21 at 11:09 +0200, Lenz Emilitri wrote:
Quote:
What exactly are tyou trying to achieve?
l.
2009/5/20 Kurian Thayil <kurianmthayil@gmail.com>
Hi All,
I am trying to implement ACD using Asterisk 1.2.18 and I've
chosen AgentCallbackLogin for login purpose. One AGI is
written which will actually get executed when agent dials
'1001' (say) from his SIP phone and enters into the queue.
Second AGI gets executed when the Dial operation is performed.
I see the agi_uniqueid obtained from both AGI instances are
different and I can't really find a way to relate the pair. I
need to perform some DB operations for agentlogin instance and
dial instance. Is there a variable that is common for both
instance or is there a way that I can pass variables across.
My context and AGI's are given below.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum