#!/usr/bin/php -q
<?php
echo "ANSWER";
echo "\n";
echo "\n";
echo "EXEC read d,demo-thanks,1";
echo "\n";
?>
/* second script play.php*/
#!/usr/bin/php -q
<?php
if($argv[1]==4){
echo "EXEC saydigits $argv[1]";
}
if($argv[1]==5){
echo "EXEC saydigits $argv[1]";
}
else {
echo "EXEC playback im-sorry";
}
?>
[agi-script]
exten=>123,1,Noop()
same=>n,AGI(/root/agi.php,${CALLERID(num)})
same=>n,Noop(value of ${d})
same=>n,AGI(/root/play.php,${d})
NOTE PATH for PHP is different to /usr/bin/php on centos use the which command to get the correct path
No hay comentarios:
Publicar un comentario