[Asterisk-Users] CallerID name lookup AGI script
Brian Dingman
bdingman at gmail.com
Sun May 8 12:51:26 MST 2005
When I run the script from the command line, I get the following error:
[asterisk at asterisk agi-bin]# ./cid_rewrite.php
<br />
<b>Parse error</b>: parse error, expecting `T_OLD_FUNCTION' or
`T_FUNCTION' or `T_VAR' or `'}'' in
<b>/var/lib/asterisk/agi-bin/astlib_jm.php</b> on line <b>73</b><br />
<br />
<b>Fatal error</b>: Cannot instantiate non-existent class: agi in
<b>/var/lib/asterisk/agi-bin/cid_rewrite.php</b> on line <b>60</b><br
/>
> On 5/8/05, Jay Milk <jay at skimmilk.net> wrote:
Make sure the script is executable -- since it's hash-banged, you should
be able to run it from the command-line without errors. If not, chances
are you have the wrong PHP version -- this script requires 5.x, a
limitation brought on by my use of the php-agi API. When I have some
time, I'll modify this to run with all PHP versions, or provide at least
a backward compatible version.
So, run it from commmand line
("/var/lib/asterisk/agi-bin/cid_rewrite.php") and see if it throws any
errors. If it just "hangs", CTRL+C will cancel it -- it's waiting for
AGI input and should work ok. If you do see errors, they should point
you to what you're missing. I'm guessing it would be a requirement such
as PHP version or pear DB.
More information about the asterisk-users
mailing list