<?php
require_once('phpagi.php');
$agi=new $AGI();
$agi=answer();
$agi->exec('Playback','hello'); //hello is a gsm file in Sounds directory.
$agi->verbose("hello done");
?>
here is my context:
[test]
exten=>1,1,wait(1)
exten=>1,2,AGI(hello.php)
exten=>1,3,playback(vm-goodbye)
exten=>1,4,hangup()
after using SIP phone (X-litte) to call, Asterisk CLI display:
–launched AGI script /var/lib/asterisk/agi-bin/hello.php
–<SIP/truonglh-b7bbfca8>AGI script hello.php completed, returning 0.
But I don’t hear anything (my hello.gsm).I don’t know why! please help me!
Ah,if I replace exten=>1,2,AGI(hello.php) by exten=>1,2,AGI(agi-test.agi), everything work as expected! Crying or Very sad (agi-test.agi is already in agi-bin directory, and it is writen by perl,is it the reason???).