Ahmed Munir
2012-Jan-05 14:54 UTC
[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 at 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" <danny at debsinc.com> > Subject: Re: [asterisk-users] asterisk -> AGI (perl) -> sqlplus > (oracle) > To: "'Asterisk Users Mailing List - Non-Commercial Discussion'" > <asterisk-users at 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-bounces at lists.digium.com > [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Ahmed Munir > Sent: Wednesday, January 04, 2012 12:15 PM > To: asterisk-users at 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" <danny at debsinc.com> > Subject: Re: [asterisk-users] asterisk -> AGI (perl) -> sqlplus > (oracle) > To: "'Asterisk Users Mailing List - Non-Commercial Discussion'" > <asterisk-users at 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-bounces at lists.digium.com > [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Ahmed Munir > Sent: Wednesday, January 04, 2012 10:45 AM > To: asterisk-users at 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20120105/12694bc0/attachment.htm>
Danny Nicholas
2012-Jan-05 15:16 UTC
[asterisk-users] asterisk -> AGI (perl) -> sqlplus(oracle)
Did you "install" DBD::Oracle or is it just in your /home/asterisk directory? Put up the part of the PERL module that has your include statements. From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Ahmed Munir Sent: Thursday, January 05, 2012 8:54 AM To: asterisk-users at lists.digium.com Subject: 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 at 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" <danny at debsinc.com> Subject: Re: [asterisk-users] asterisk -> AGI (perl) -> sqlplus (oracle) To: "'Asterisk Users Mailing List - Non-Commercial Discussion'" <asterisk-users at 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-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Ahmed Munir Sent: Wednesday, January 04, 2012 12:15 PM To: asterisk-users at 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" <danny at debsinc.com> Subject: Re: [asterisk-users] asterisk -> AGI (perl) -> sqlplus (oracle) To: "'Asterisk Users Mailing List - Non-Commercial Discussion'" <asterisk-users at 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-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Ahmed Munir Sent: Wednesday, January 04, 2012 10:45 AM To: asterisk-users at 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20120105/11651cf2/attachment.htm>
Ahmed Munir
2012-Jan-06 15:32 UTC
[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" <rkb at i.frys.com> > Subject: Re: [asterisk-users] asterisk -> AGI (perl) -> sqlplus > (oracle) > To: "Asterisk Users Mailing List - Non-Commercial Discussion" > <asterisk-users at lists.digium.com> > Message-ID: > <69ecf8ff3230bc206837478422f97aad.squirrel at 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" <danny at debsinc.com> > >> Subject: Re: [asterisk-users] asterisk -> AGI (perl) -> sqlplus > >> (oracle) > >> To: "'Asterisk Users Mailing List - Non-Commercial Discussion'" > >> <asterisk-users at 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-bounces at lists.digium.com > >> [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Ahmed > >> Munir > >> Sent: Wednesday, January 04, 2012 10:45 AM > >> To: asterisk-users at 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20120106/18e72d09/attachment.htm>