Re: [asterisk-users] asterisk - AGI (perl) - sqlplus(oracle)
On Fri, 6 Jan 2012, Dale Noll wrote: I found the following lines to be helpful. $ENV{TNS_ADMIN}=/usr/lib/oracle/11.2/client/; $ENV{ORACLE_HOME}=/usr/lib/oracle/11.2/client/; $ENV{LD_LIBRARY_PATH}=/usr/lib/oracle/11.2/client/lib/; I think a 'better practice' would be to put the 'stuff likely to change' into the environment variables of the Asterisk process so they will 'trickle down' to sub-processes like AGIs. This way, when you upgrade Oracle, you don't have to track down and change all affected AGIs. Something like this snippet from my Asterisk start up script: nice --adjustment=-20\ env --ignore-environment\ HOSTNAME=${HOSTNAME}\ LD_LIBRARY_PATH='/usr/lib/oracle/11.2/client/lib/'\ ORACLE_HOME='/usr/lib/oracle/11.2/client/'\ PATH=${PATH}\ TNS_ADMIN='/usr/lib/oracle/11.2/client/'\ $ASTERISK $START_OPTIONS I like to 'ignore' the environment of the process executing the script that starts Asterisk and add in only what is needed -- I'm a 'parts left out don't get broken' kind of guy :) Can you give this a try and report back? -- Thanks in advance, - Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST Newline Fax: +1-760-731-3000 -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] asterisk - AGI (perl) - sqlplus(oracle)
Yes, I already declared 'use lib /home/asterisk/lib/lib64/perl5/5.8.8/x86_64-linux-thread-multi/;' in my AGI. When I execute the script as a user Asterisk, i.e. perl -wc test.pl in return I'm getting OK and no error messages and script is running fine when I try to run in shell. Even though I already declared the environmental variables in .bash_profile. At the end I tired every method but still stuck in this problem. Date: Thu, 5 Jan 2012 14:07:59 -0800 From: Ron Bergin r...@i.frys.com Subject: Re: [asterisk-users] asterisk - AGI (perl) - sqlplus (oracle) To: Asterisk Users Mailing List - Non-Commercial Discussion asterisk-users@lists.digium.com Message-ID: 69ecf8ff3230bc206837478422f97aad.squir...@webmail.i.frys.com Content-Type: text/plain;charset=iso-8859-1 Ahmed Munir wrote: Hi, I installed the modules in asterisk user home directory with read and excitable permissions for asterisk but still my AGI not working. IMO, it would have been better to install it in it's normal location. Is your script using the warnings and strict pragmas? What error message do you receive when running the script from the command line? Did you add the proper use lib '' statement to add the install directory to the @INC array? Ron Bergin Please provide me other advise to resolve this issue. Date: Wed, 4 Jan 2012 11:30:34 -0600 From: Danny Nicholas da...@debsinc.com Subject: Re: [asterisk-users] asterisk - AGI (perl) - sqlplus (oracle) To: 'Asterisk Users Mailing List - Non-Commercial Discussion' asterisk-users@lists.digium.com Message-ID: 00ca01cccb06$911e8300$b35b8900$@debsinc.com Content-Type: text/plain; charset=us-ascii The module probably isn't readable/executeable from Asterisk From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Ahmed Munir Sent: Wednesday, January 04, 2012 10:45 AM To: asterisk-users@lists.digium.com Subject: [asterisk-users] asterisk - AGI (perl) - sqlplus (oracle) Hi all, 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. Please advise me to resolve this issue. -- Regards, Ahmed Munir Chohan -- Regards, Ahmed Munir Chohan -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] asterisk - AGI (perl) - sqlplus(oracle)
Here's one more thing to try - do a su - nobody then run the agi - once it runs under su - nobody there's no reason it should run in Asterisk. From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Ahmed Munir Sent: Friday, January 06, 2012 9:33 AM To: asterisk-users@lists.digium.com Subject: Re: [asterisk-users] asterisk - AGI (perl) - sqlplus(oracle) Yes, I already declared 'use lib /home/asterisk/lib/lib64/perl5/5.8.8/x86_64-linux-thread-multi/;' in my AGI. When I execute the script as a user Asterisk, i.e. perl -wc test.pl in return I'm getting OK and no error messages and script is running fine when I try to run in shell. Even though I already declared the environmental variables in .bash_profile. At the end I tired every method but still stuck in this problem. Date: Thu, 5 Jan 2012 14:07:59 -0800 From: Ron Bergin r...@i.frys.com Subject: Re: [asterisk-users] asterisk - AGI (perl) - sqlplus (oracle) To: Asterisk Users Mailing List - Non-Commercial Discussion asterisk-users@lists.digium.com Message-ID: 69ecf8ff3230bc206837478422f97aad.squir...@webmail.i.frys.com Content-Type: text/plain;charset=iso-8859-1 Ahmed Munir wrote: Hi, I installed the modules in asterisk user home directory with read and excitable permissions for asterisk but still my AGI not working. IMO, it would have been better to install it in it's normal location. Is your script using the warnings and strict pragmas? What error message do you receive when running the script from the command line? Did you add the proper use lib '' statement to add the install directory to the @INC array? Ron Bergin Please provide me other advise to resolve this issue. Date: Wed, 4 Jan 2012 11:30:34 -0600 From: Danny Nicholas da...@debsinc.com Subject: Re: [asterisk-users] asterisk - AGI (perl) - sqlplus (oracle) To: 'Asterisk Users Mailing List - Non-Commercial Discussion' asterisk-users@lists.digium.com Message-ID: 00ca01cccb06$911e8300$b35b8900$@debsinc.com Content-Type: text/plain; charset=us-ascii The module probably isn't readable/executeable from Asterisk From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Ahmed Munir Sent: Wednesday, January 04, 2012 10:45 AM To: asterisk-users@lists.digium.com Subject: [asterisk-users] asterisk - AGI (perl) - sqlplus (oracle) Hi all, 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. Please advise me to resolve this issue. -- Regards, Ahmed Munir Chohan -- Regards, Ahmed Munir Chohan -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] asterisk - AGI (perl) - sqlplus(oracle)
Add a BEGIN {...} block prior to the use statements and in there redirect STDERR to a file. This will aloow you to capture compilation errors You should also add some debugging statements at key points in the script. Then run the script and review the file to see what errors it generated. -- Ron Bergin Network Operations Administrator Fry's Electronics Ahmed Munir wrote: Yes, I already declared 'use lib /home/asterisk/lib/lib64/perl5/5.8.8/x86_64-linux-thread-multi/;' in my AGI. When I execute the script as a user Asterisk, i.e. perl -wc test.pl in return I'm getting OK and no error messages and script is running fine when I try to run in shell. Even though I already declared the environmental variables in .bash_profile. At the end I tired every method but still stuck in this problem. Date: Thu, 5 Jan 2012 14:07:59 -0800 From: Ron Bergin r...@i.frys.com Subject: Re: [asterisk-users] asterisk - AGI (perl) - sqlplus (oracle) To: Asterisk Users Mailing List - Non-Commercial Discussion asterisk-users@lists.digium.com Message-ID: 69ecf8ff3230bc206837478422f97aad.squir...@webmail.i.frys.com Content-Type: text/plain;charset=iso-8859-1 Ahmed Munir wrote: Hi, I installed the modules in asterisk user home directory with read and excitable permissions for asterisk but still my AGI not working. IMO, it would have been better to install it in it's normal location. Is your script using the warnings and strict pragmas? What error message do you receive when running the script from the command line? Did you add the proper use lib '' statement to add the install directory to the @INC array? Ron Bergin Please provide me other advise to resolve this issue. Date: Wed, 4 Jan 2012 11:30:34 -0600 From: Danny Nicholas da...@debsinc.com Subject: Re: [asterisk-users] asterisk - AGI (perl) - sqlplus (oracle) To: 'Asterisk Users Mailing List - Non-Commercial Discussion' asterisk-users@lists.digium.com Message-ID: 00ca01cccb06$911e8300$b35b8900$@debsinc.com Content-Type: text/plain; charset=us-ascii The module probably isn't readable/executeable from Asterisk From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Ahmed Munir Sent: Wednesday, January 04, 2012 10:45 AM To: asterisk-users@lists.digium.com Subject: [asterisk-users] asterisk - AGI (perl) - sqlplus (oracle) Hi all, 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. Please advise me to resolve this issue. -- Regards, Ahmed Munir Chohan -- Regards, Ahmed Munir Chohan -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] asterisk - AGI (perl) - sqlplus(oracle)
On 01/06/2012 10:30 AM, Ron Bergin wrote: Add a BEGIN {...} block prior to the use statements and in there redirect STDERR to a file. This will aloow you to capture compilation errors You should also add some debugging statements at key points in the script. Then run the script and review the file to see what errors it generated. You may find that you need to define the Oracle environment in the script itself. I found the following lines to be helpful. $ENV{TNS_ADMIN}=/usr/lib/oracle/11.2/client/; $ENV{ORACLE_HOME}=/usr/lib/oracle/11.2/client/; $ENV{LD_LIBRARY_PATH}=/usr/lib/oracle/11.2/client/lib/; Of course change the path to be correct for your client version. This example is from the 11.2 instant client default install. Dale -- The truth speaks for itself. I'm just the messenger. Lyta Alexander - Babylon 5 -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] asterisk - AGI (perl) - sqlplus(oracle)
The thing is, my AGI is working fine if I don't include DBD::Oracle library in my script. If I include DBD::Oracle library my AGI script gets aborted. I installed DBD::Oracle module in asterisk application home directory as its' permissions are listed below; [asterisk@klpi062 ~]$ ls -lh /home/asterisk/perl-lib/lib/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/ total 40K drwxr-xr-x 3 asterisk asterisk 4.0K Jan 3 14:16 auto drwxr-xr-x 3 asterisk asterisk 4.0K Jan 3 14:16 DBD -rwxr-xr-x 1 asterisk asterisk 1.3K Aug 26 14:09 oraperl.ph -rwxr-xr-x 1 asterisk asterisk 28K Oct 12 12:43 Oraperl.pm I also included the library path for locating DBD::Oracle module in my AGI. But still unable to understand even though asterisk has permissions to access DBD module but still AGI don't work when I include DBD library in it. Date: Wed, 4 Jan 2012 12:18:24 -0600 From: Danny Nicholas da...@debsinc.com Subject: Re: [asterisk-users] asterisk - AGI (perl) - sqlplus (oracle) To: 'Asterisk Users Mailing List - Non-Commercial Discussion' asterisk-users@lists.digium.com Message-ID: 010101cccb0d$3fa6a140$bef3e3c0$@debsinc.com Content-Type: text/plain; charset=us-ascii What are the permissions on the module you are trying to run? (ls -l /var/lib/asterisk/agi-bin/module) From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Ahmed Munir Sent: Wednesday, January 04, 2012 12:15 PM To: asterisk-users@lists.digium.com Subject: Re: [asterisk-users] asterisk - AGI (perl) - sqlplus (oracle) Hi, I installed the modules in asterisk user home directory with read and excitable permissions for asterisk but still my AGI not working. Please provide me other advise to resolve this issue. Date: Wed, 4 Jan 2012 11:30:34 -0600 From: Danny Nicholas da...@debsinc.com Subject: Re: [asterisk-users] asterisk - AGI (perl) - sqlplus (oracle) To: 'Asterisk Users Mailing List - Non-Commercial Discussion' asterisk-users@lists.digium.com Message-ID: 00ca01cccb06$911e8300$b35b8900$@debsinc.com Content-Type: text/plain; charset=us-ascii The module probably isn't readable/executeable from Asterisk From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Ahmed Munir Sent: Wednesday, January 04, 2012 10:45 AM To: asterisk-users@lists.digium.com Subject: [asterisk-users] asterisk - AGI (perl) - sqlplus (oracle) Hi all, 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. Please advise me to resolve this issue. -- Regards, Ahmed Munir Chohan -- Regards, Ahmed Munir Chohan -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] asterisk - AGI (perl) - sqlplus (oracle)
Ahmed Munir wrote: Hi, I installed the modules in asterisk user home directory with read and excitable permissions for asterisk but still my AGI not working. IMO, it would have been better to install it in it's normal location. Is your script using the warnings and strict pragmas? What error message do you receive when running the script from the command line? Did you add the proper use lib '' statement to add the install directory to the @INC array? Ron Bergin Please provide me other advise to resolve this issue. Date: Wed, 4 Jan 2012 11:30:34 -0600 From: Danny Nicholas da...@debsinc.com Subject: Re: [asterisk-users] asterisk - AGI (perl) - sqlplus (oracle) To: 'Asterisk Users Mailing List - Non-Commercial Discussion' asterisk-users@lists.digium.com Message-ID: 00ca01cccb06$911e8300$b35b8900$@debsinc.com Content-Type: text/plain; charset=us-ascii The module probably isn't readable/executeable from Asterisk From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Ahmed Munir Sent: Wednesday, January 04, 2012 10:45 AM To: asterisk-users@lists.digium.com Subject: [asterisk-users] asterisk - AGI (perl) - sqlplus (oracle) Hi all, 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. Please advise me to resolve this issue. -- Regards, Ahmed Munir Chohan - Regards, Ahmed Munir Chohan -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[asterisk-users] asterisk - AGI (perl) - sqlplus (oracle)
Hi all, 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. Please advise me to resolve this issue. -- Regards, Ahmed Munir Chohan -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] asterisk - AGI (perl) - sqlplus (oracle)
The module probably isn't readable/executeable from Asterisk From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Ahmed Munir Sent: Wednesday, January 04, 2012 10:45 AM To: asterisk-users@lists.digium.com Subject: [asterisk-users] asterisk - AGI (perl) - sqlplus (oracle) Hi all, 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. Please advise me to resolve this issue. -- Regards, Ahmed Munir Chohan -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] asterisk - AGI (perl) - sqlplus (oracle)
Hi, I installed the modules in asterisk user home directory with read and excitable permissions for asterisk but still my AGI not working. Please provide me other advise to resolve this issue. Date: Wed, 4 Jan 2012 11:30:34 -0600 From: Danny Nicholas da...@debsinc.com Subject: Re: [asterisk-users] asterisk - AGI (perl) - sqlplus (oracle) To: 'Asterisk Users Mailing List - Non-Commercial Discussion' asterisk-users@lists.digium.com Message-ID: 00ca01cccb06$911e8300$b35b8900$@debsinc.com Content-Type: text/plain; charset=us-ascii The module probably isn't readable/executeable from Asterisk From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Ahmed Munir Sent: Wednesday, January 04, 2012 10:45 AM To: asterisk-users@lists.digium.com Subject: [asterisk-users] asterisk - AGI (perl) - sqlplus (oracle) Hi all, 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. Please advise me to resolve this issue. -- Regards, Ahmed Munir Chohan - Regards, Ahmed Munir Chohan -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] asterisk - AGI (perl) - sqlplus (oracle)
What are the permissions on the module you are trying to run? (ls -l /var/lib/asterisk/agi-bin/module) From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Ahmed Munir Sent: Wednesday, January 04, 2012 12:15 PM To: asterisk-users@lists.digium.com Subject: Re: [asterisk-users] asterisk - AGI (perl) - sqlplus (oracle) Hi, I installed the modules in asterisk user home directory with read and excitable permissions for asterisk but still my AGI not working. Please provide me other advise to resolve this issue. Date: Wed, 4 Jan 2012 11:30:34 -0600 From: Danny Nicholas da...@debsinc.com Subject: Re: [asterisk-users] asterisk - AGI (perl) - sqlplus (oracle) To: 'Asterisk Users Mailing List - Non-Commercial Discussion' asterisk-users@lists.digium.com Message-ID: 00ca01cccb06$911e8300$b35b8900$@debsinc.com Content-Type: text/plain; charset=us-ascii The module probably isn't readable/executeable from Asterisk From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Ahmed Munir Sent: Wednesday, January 04, 2012 10:45 AM To: asterisk-users@lists.digium.com Subject: [asterisk-users] asterisk - AGI (perl) - sqlplus (oracle) Hi all, 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. Please advise me to resolve this issue. -- Regards, Ahmed Munir Chohan - Regards, Ahmed Munir Chohan -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] asterisk - AGI (perl) - sqlplus (oracle)
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 sedwa...@sedwards.com Voice: +1-760-468-3867 PST Newline Fax: +1-760-731-3000 -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] asterisk - AGI (perl) - sqlplus (oracle)
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. -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users