Hi @sedwards
I know I said that my get and set variables are working which they are…but the problem is, when i try to retrieve the data part from the arrays, it fetches nothing/empty…
I was going thru an older topic on the same issue over here where someone had the same issue and you advised him to test using plain AGI but the conversation ended without any leads…
I am also using Asterisk 18 and PHPAGI 2.20 (welltime PHPAGI compatible with PHP 8+).
Can you guide me, what can I do to resolve this issue of not being able to get the data part of my variables?
Again, pasting logs for reference:
<SIP/1*7403-0000016e>AGI Rx << GET VARIABLE CDR(clid)
<SIP/1*7403-0000016e>AGI Tx >> 200 result=1 ("7403" <7403>)
<SIP/1*7403-0000016e>AGI Rx << VERBOSE "GET VARIABLE response: Array" 1
agi.php: GET VARIABLE response: Array
<SIP/1*7403-0000016e>AGI Tx >> 200 result=1
<SIP/1*7403-0000016e>AGI Rx << VERBOSE "(" 1
agi.php: (
<SIP/1*7403-0000016e>AGI Tx >> 200 result=1
<SIP/1*7403-0000016e>AGI Rx << VERBOSE " [code] => 200" 1
agi.php: [code] => 200
<SIP/1*7403-0000016e>AGI Tx >> 200 result=1
<SIP/1*7403-0000016e>AGI Rx << VERBOSE " [result] => 1" 1
agi.php: [result] => 1
<SIP/1*7403-0000016e>AGI Tx >> 200 result=1
<SIP/1*7403-0000016e>AGI Rx << VERBOSE " [data] => " 1
agi.php: [data] =>
<SIP/1*7403-0000016e>AGI Tx >> 200 result=1
<SIP/1*7403-0000016e>AGI Rx << VERBOSE ")" 1
agi.php: )
<SIP/1*7403-0000016e>AGI Tx >> 200 result=1
<SIP/1*7403-0000016e>AGI Rx << VERBOSE "" 1
agi.php:
<SIP/1*7403-0000016e>AGI Tx >> 200 result=1
My get_variable function is defined as:
function get_variable($variable,$getvalue=FALSE)
{
$res=$this->evaluate("GET VARIABLE $variable");
$this->verbose("GET VARIABLE response: " . print_r($res, true), 1);
if($getvalue==FALSE)
return($res);
return($res['data']);
}
any leads?