EXEC READ

Joined
Aug 5, 2009
Messages
17
Points
0
I tried with this, but the variable is empty, but in the asterisk CLI, is getting the variable correctly, but in the PHP script the variable is empty, Why?

This is my script

$agi->text2wav('Digita tu numero y despues presiona la tecla gato' );
$agi->exec('Read', 'mivar|beep|14||2|50' );
$mivar = $agi->get_variable(mivar);
$agi->verbose($mivar);
if ($myvar['result'] == 1 && $myvar['data'] != '' ) {
$agi->text2wav('Es'.$myvar['data']);
} else {
$agi->text2wav('No introdujo la variable jajaja' );
}

And this is showing the asterisk CLI

AGI Script Executing Application: (Read) Options: (mivar|beep|14||2|50)
-- User entered '23548412'
/var/lib/asterisk/agi-bin/a.php,: Array
/var/lib/asterisk/agi-bin/a.php,: (
/var/lib/asterisk/agi-bin/a.php,: [ code] => 200
/var/lib/asterisk/agi-bin/a.php,: [result] => 0
/var/lib/asterisk/agi-bin/a.php,: [data] =>
/var/lib/asterisk/agi-bin/a.php,: )
/var/lib/asterisk/agi-bin/a.php,:
 

Members online

No members online now.

Latest posts

Forum statistics

Threads
30,987
Messages
131,100
Members
17,716
Latest member
Orbit114
Top