[asterisk-users] asterisk -> AGI (perl) -> sqlplus (oracle)
LL
digium at 9h9.org
Thu Jan 5 01:28:54 CST 2012
I guess this is a permissions issue.
Make sure your agi script has execute permissions (755) and it belongs
to asterisk:asterisk .
for that you need:
chmod 755 /var/lib/asterisk/agi-bin/agi-script-name.agi && chown
asterisk:asterisk /var/lib/asterisk/agi-bin/agi-script-name.agi
Regards,
LL
On 1/4/2012 7:19 PM, Steve Edwards wrote:
> Un-top-posting...
>
> On Wed, 4 Jan 2012, Ahmed Munir wrote:
>
>> I'm trying to run an AGI in PERL which uses the module DBD-Oracle.
>> Currently my AGI is working fine in my two servers but not in my
>> other four servers. When I tried execute an AGI (as a user asterisk)
>> in command line it works fine (even I also declare environmental
>> variables in user profile and in my AGI), but when I tried to call my
>> AGI (perl) in dial plan, it don't get executed.
>
> It usually boils down to PATHs, environment variables, permissions,
> missing script interpreters, etc.
>
> When you execute your AGI from the command line, are you passing a
> valid AGI environment to the AGI via STDIN? If not, you may be
> violating the AGI protocol, which, is probably not why your 'AGI' is
> not executing, but will bite you some time in the future.
>
> When you say 'it don't get executed' do you mean that Asterisk cannot
> locate the AGI at all or do you mean it does not execute as you expect?
>
> On Wed, 4 Jan 2012, Ahmed Munir wrote:
>
>> I installed the modules in asterisk user home directory with read and
>> excitable permissions for asterisk but still my AGI not working.
>
> Asterisk looks for AGI executables in the 'astagidir' (AKA ASTAGIDIR)
> directory which is usually /var/lib/asterisk/agi-bin/. This can be set
> in asterisk.conf. The path to this file can be specified on the
> command line used to start asterisk.
>
> It would be unusual for ASTAGIDIR to be set the asterisk user's home
> directory. It would also be unusual for the asterisk user's home
> directory to be set to ASTAGIDIR.
>
More information about the asterisk-users
mailing list