[asterisk-users] asterisk -> AGI (perl) -> sqlplus (oracle)

Steve Edwards asterisk.org at sedwards.com
Wed Jan 4 13:19:47 CST 2012


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.

-- 
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards       sedwards at sedwards.com      Voice: +1-760-468-3867 PST
Newline                                              Fax: +1-760-731-3000



More information about the asterisk-users mailing list