welltime / phpagi

PHPAGI is a PHP class for the Asterisk Gateway Interface. The package is available for use and distribution under the terms of the GNU Public License.
GNU Lesser General Public License v2.1
58 stars 93 forks source link

PHPAGI get value in a variable #8

Closed qasimkhans closed 10 years ago

qasimkhans commented 10 years ago

Hi all, I am trying to get queue member list in .php using $agi->get_variable("QUEUE_MEMBER_LIST(washingtonflyer)"); which retrive queue member list. i want to save that value in a veriable. but it is not saving. please help me here. following is my config.

exten => s,1,Answer exten => s,2,AGI(/scripts/getagent.php) exten => s,3,Noop(${agent1})

require_once("phpagi/phpagi.php"); $agi = new AGI(); $agent = $agi->get_variable("QUEUE_MEMBER_LIST(washingtonflyer)"); $agi->set_variable('agent',$agent1)

<SIP/3289-00000010>AGI Tx >> 200 result=1 (Local/9308@agent,Local/9311@agent,Local/9301@agent,Local/9315@agent,Local/9305@agent,Local/9309@agent,Local/9312@agent,Local/9302@agent,Local/9306@agent,Local/9313@agent,Local/9303@agent,Local/9307@agent,Local/9310@agent,Local/9314@agent,Local/9304@agent) <SIP/3289-00000010>AGI Rx << SET VARIABLE a "" <SIP/3289-00000010>AGI Tx >> 200 result=1 -- <SIP/3289-00000010>AGI Script /scripts/check_agent2.php completed, returning 0 -- Executing [s@washingtonflyer:3] NoOp("SIP/3289-00000010", "") in new stack -- Auto fallthrough, channel 'SIP/3289-00000010' status is 'UNKNOWN'

chesstrian commented 10 years ago

From what I can see QUEUE_MEMBER_LIST(washingtonflyer) is returning and get_variable method is trying to get value from a variable called the returned value from QUEUE_MEMBER_LIST(washingtonflyer).