Perl AGIs not running in Vicidial [SOLVED]

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Perl AGIs not running in Vicidial [SOLVED]

Postby ccabrera » Wed Apr 20, 2016 3:34 pm

Me just installed a scratch install with Vicidial Trunk into a Centos 7 machine with Asterisk 11.18.0-vici. Apparently, all the installation processes went fine, but AGIs are not running (there´s no RX in the AGI debug, only TX).

Since there´s no CentOS 7 Scratch guide, we had to follow one available for 6.5 and adjust for changes.

We ran the installation again for asterisk-perl-0.8. Even though there are no errors, AGIs still not run.

Perl scripts run fine.
Agi script runs fine from the Linux CLI, but not from inside Asterisk.
Asterisk is making calls properly, it´s just the AGIs from inside which fail.

Are there any tests that any of you know about which can point us on where to find the AGI failure? It must definetely by something related to asterisk-perl, but we don´t know how to debug that properly.

Regards,
Last edited by ccabrera on Wed Apr 20, 2016 6:34 pm, edited 1 time in total.
Christian Cabrera
Enlaza Comunicaciones - Vicidial Partner
Mexico City
ccabrera
 
Posts: 153
Joined: Fri Jan 14, 2011 7:53 pm
Location: Mexico City

Re: Perl AGIs not running in Vicidial

Postby williamconley » Wed Apr 20, 2016 4:00 pm

ccabrera wrote:Since there´s no CentOS 7 Scratch guide, we had to follow one available for 6.5 and adjust for changes

Please provide a link to the instructions you actually used. This groups together those using these instructions so you can find each other when you have similar questions. Also provide the Full Vicidial Version with Build (trunk doesn't really do the trick there, lol).

Permissions issues most likely. Asterisk may be trying to start the scripts but failing as those scripts may belong to a user/group that asterisk can not invoke.

Next up: Do you have all your screens running? If so, the screen with the asterisk console shows errors (in fact, this is the only place some errors are visible ...). "screen -r asterisk"

Why are you using this method of installation? Vicibox.com has an excellent installer ... but if you MUST have CentOS, then Goautodial is what you should be using. Goautodial even has a method to allow you to install from packages on a stock CentOS image in a colo/cloud environment.
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Perl AGIs not running in Vicidial

Postby ccabrera » Wed Apr 20, 2016 4:30 pm

Hello William,

Our trunk is VERSION: 2.12-550a BUILD: 160414-1013. We just updated it yesterday. However, I don´t remember testing the AGIs before, as we usually just assume they work.

We are using CentOS 7 because it´s the only OS that we were able to install with our hardware (HP Proliant DL160 Gen9). We tried with Vicibox7, but it couldn´t detect the hardware RAID controller (P440). We had other Gen9 servers with also failed to identify hardware properly with CentOS 6 (which I believe is what GA uses), so we had to go with 7.

Trust us: this wasn´t our first choice, and this is our first Centos7 installation. Hopefully after these "bumps", any future installation should run smoother.

We followed the steps from http://striker24x7.blogspot.mx/2013/04/ ... idial.html with some adjustements.

Permissions should not be an issue: Asterisk is running as root. Besides, I believe that if permissions were an issue, the AGI would fail with a "permission denied" in the AGI debug.

Screens are running: Perl works, just not Perl AGIs.

Regarding to Perl, this is what was done:

We installed the executable and libraries with:
Code: Select all
yum -y install perl perl-DBD-MySQL perl-libwww-perl


We installed the following inside CPAN (I double ran all the commands to be sure no errors were being thrown):
Code: Select all
install CPAN::Meta::Requirements
install CPAN
reload cpan
install YAML
install MD5
install Digest::MD5
install Digest::SHA1
install readline
install Bundle::CPAN
reload cpan
install DBI
force install DBD::mysql
install Net::Telnet
install Time::HiRes
install Net::Server
install Switch
install Mail::Sendmail
install Unicode::Map
install Jcode
install Spreadsheet::WriteExcel
install OLE::Storage_Lite
install Proc::ProcessTable
install IO::Scalar
install Spreadsheet::ParseExcel
install Curses
install Getopt::Long
install Net::Domain
install Term::ReadKey
install Term::ANSIColor
install Spreadsheet::XLSX
install Spreadsheet::Read
install LWP::UserAgent
install HTML::Entities
install HTML::Strip
install HTML::FormatText
install HTML::TreeBuilder
install Time::Local
install MIME::Decoder
install Mail::POP3Client
install Mail::IMAPClient
install Mail::Message
install Crypt::SSLeay
install Net:SSLeay
install LWP::Protocol::https
install IO::Socket::SSL
install MIME::Base64
install MIME::QuotedPrint
install Crypt::Eksblowfish::Bcrypt
force install Crypt::RC4
install Text::CSV
install Text::CSV_XS
quit


We installed Asterisk-perl 0.8 with this:
Code: Select all
cd /usr/src
wget http://download.vicidial.com/required-apps/asterisk-perl-0.08.tar.gz
tar -zxf asterisk-perl-0.08.tar.gz
cd asterisk-perl-0.08
perl Makefile.PL
make all
make install


To be honest, we haven´t tried with Asterisk 1.8 inside CentOS 7. Perhaps asterisk-perl-0.08 is too old for CentOS 7?

Regards,
Christian Cabrera
Enlaza Comunicaciones - Vicidial Partner
Mexico City
ccabrera
 
Posts: 153
Joined: Fri Jan 14, 2011 7:53 pm
Location: Mexico City

Re: Perl AGIs not running in Vicidial

Postby williamconley » Wed Apr 20, 2016 6:19 pm

ccabrera wrote:Permissions should not be an issue: Asterisk is running as root. Besides, I believe that if permissions were an issue, the AGI would fail with a "permission denied" in the AGI debug.

I'm not prepared to make that assumption. This is the purpose of the "screen -r asterisk" screen. If that screen shows the file attempting to fire ... it should also show a permission error or some other reason why it failed, but that screen is the ONLY one that will show agi errors. Seriously. "asterisk -R" will not show them.

Have you verified that those files are present and in the correct location? Are you using a Vicidial Group patched version of Asterisk 11? Have you tried running any other agi scripts in asterisk just to verify that an agi script CAN be run?
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Perl AGIs not running in Vicidial

Postby ccabrera » Wed Apr 20, 2016 6:33 pm

Thanks for your suggestion William. It wasn´t a permission issue per se, but rather Perl was not finding the Asterisk.pm module. When running from screen, I was able to locate this error:
Code: Select all
Can't locate Asterisk/AGI.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /var/lib/asterisk/agi-bin/agi-DID_route.agi line 118.
BEGIN failed--compilation aborted at /var/lib/asterisk/agi-bin/agi-DID_route.agi line 118.


So what I did was to create a symbolic link:
Code: Select all
ln -s /usr/share/astguiclient/libs/Asterisk.pm /usr/lib64/perl5/Asterisk.pm


And everything seems to work now. I will remember to debug from screen next time.

Regards,
Christian Cabrera
Enlaza Comunicaciones - Vicidial Partner
Mexico City
ccabrera
 
Posts: 153
Joined: Fri Jan 14, 2011 7:53 pm
Location: Mexico City

Re: Perl AGIs not running in Vicidial [SOLVED]

Postby williamconley » Wed Apr 20, 2016 6:42 pm

Excellent postback. If there's a place to make this comment on the site where you got your instructions, it may be helpful to offer feedback there as well. Contribute some more (help the next poor lost soul)! 8-)
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)


Return to Support

Who is online

Users browsing this forum: No registered users and 87 guests