Yeah, I wrote it on a different file and it worked, i guess there was some hidden character in the script that was messing it up.<br>Thank you anyway,<br><br>Mauricio Mantilla<br><br><div><span class="gmail_quote">On 7/17/06,
<b class="gmail_sendername">Time Bandit</b> <<a href="mailto:timebandit001@gmail.com">timebandit001@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
> #!/usr/bin/php -q<br>> <?php<br>> require('/var/lib/asterisk/agi-bin/phpagi.php');<br>> $agi = new AGI();<br>> $agi->say_digits(62410);<br>> $cid = $agi->get_variable("dir");<br>> $agi->say_digits($cid);
<br>> ?><br>><br>><br>> I'm getting this error:<br>><br>> parse error, unexpected '=' on line 6<br><br>I don't know why you're getting this error, it parse correctly here.<br><br>But one thing is that the line "$agi->say_digits($cid);" won't work.
<br>When you do a get_variable, the result you get is an array, and the<br>member holding the value is 'data'. So you have to write your line<br>like this : $agi->say_digits($cid['data']);<br><br>Check the documentation :
<a href="http://phpagi.sourceforge.net/phpagi2/docs/">http://phpagi.sourceforge.net/phpagi2/docs/</a><br><br>hth<br>_______________________________________________<br>--Bandwidth and Colocation provided by <a href="http://Easynews.com">
Easynews.com</a> --<br><br>asterisk-users mailing list<br>To UNSUBSCRIBE or update options visit:<br> <a href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users
</a><br></blockquote></div><br>