Anybody can help me out and let me know what am I doing wrong? I am trying to pass varaible from Asterisk 11 script to AGI, here is:
Asterisk 11 Script:
exten => _.,1,AGI(testj.php,xyz)
exten => _.,n,NoOP(${Num})
exten => _.,hangup()
AGI (php) script:
#!/usr/bin/php -q
<?php require 'phpagi.php'; $agi = new AGI(); $agi->set_variable("Num", "$argv[1]"); ?>I tried $argv[0] also, not sure if array start with 1 or 0. But none showed up, I would think I should see “xyz” no?