Kurian Thayil
2009-May-20 13:16 UTC
[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. [specqueuestat] exten => _10XX,1,AGI(agi_agentlogin.sh|${EXTEN}) exten => _10XX,2,AgentCallbackLogin(${agentno}||${sip_id}@specqueuestat) exten => _8XXX,1,AGI(agi_qdial.sh|${EXTEN}|${CALLERIDNUM}) --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. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090520/5ba2b86e/attachment.htm
Lenz Emilitri
2009-May-21 09:09 UTC
[asterisk-users] Queue and Dial operation - Common Variables?
What exactly are tyou trying to achieve? l. 2009/5/20 Kurian Thayil <kurianmthayil at 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. > > [specqueuestat] > exten => _10XX,1,AGI(agi_agentlogin.sh|${EXTEN}) > exten => _10XX,2,AgentCallbackLogin(${agentno}||${sip_id}@specqueuestat) > exten => _8XXX,1,AGI(agi_qdial.sh|${EXTEN}|${CALLERIDNUM}) > > --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 -- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >-- Loway - home of QueueMetrics - http://queuemetrics.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090521/e397ab67/attachment.htm