Im trying to originate a SIP phone and an AGI script.
Here is the php script i run from bash:
#!/usr/bin/php -q<?php require "phpagi-asmanager.php"; $asm = new AGI_AsteriskManager(); $asm->connect(); $channel = "SIP/305"; $application = "DeadAGI"; $data = "test-asm.agi"; $res = $asm->Originate($channel, NULL, NULL, NULL, $application, $data); echo "Dump of returned data:\n"; foreach($res as $var=>$val) echo "$var = $val\n"; $asm->disconnect(); ?>
I get this error when I run it:
Dump of returned data:
Response = Error
Message = Originate failed
I have chmod 755 *.php
chown asterisk:asterisk *.php
chown root:root *.php
Any help? Im going nuts.