Go Back   Voxilla VoIP Forum > Hardware/Software Support Forums > Asterisk Support Forum

Asterisk Support Forum Technical support, how-to guides, troubleshooting, and general assistance, from beginner to seasoned pro, this is where to discuss Asterisk, the most powerful open source PBX.



Closed Thread
 
LinkBack (2) Thread Tools Rate Thread Display Modes
  2 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old November 22nd, 2006, 12:59 AM
Senior Member
 
Join Date: May 2006
Posts: 110
rybshik
Default Perl warning message after 'amportal restart' (calleridname.agi)

I am running Trixbox 1.2.3 and FreePBX2.1.3 on my CentOS linux box.

I installed a perl-based calleridname.agi for caller name lookup. It works perfectly after reboot. After I issue command ‘amportal restart’, the script still works, but gives the following warning message:
Code:
Use of uninitialized value in string eq at /var/lib/asterisk/agi-bin/calleridname.agi line 30, <STDIN> line 19.
Use of uninitialized value in concatenation (.) or string at /usr/lib/perl5/site_perl/5.8.5/Asterisk/AGI.pm line 1036, <STDIN> line 19.
calleridname.agi: CALLERID IS: 15191234567
Use of uninitialized value in concatenation (.) or string at /usr/lib/perl5/site_perl/5.8.5/Asterisk/AGI.pm line 1036, <STDIN> line 20.
calleridname.agi: Checking 519 1234567...
Use of uninitialized value in concatenation (.) or string at /usr/lib/perl5/site_perl/5.8.5/Asterisk/AGI.pm line 1036, <STDIN> line 21.
calleridname.agi: Asteridex lookup disabled.
Use of uninitialized value in concatenation (.) or string at /usr/lib/perl5/site_perl/5.8.5/Asterisk/AGI.pm line 1036, <STDIN> line 22.
calleridname.agi: Ready for Whitepages lookup...
Use of uninitialized value in concatenation (.) or string at /usr/lib/perl5/site_perl/5.8.5/Asterisk/AGI.pm line 1036, <STDIN> line 24.
calleridname.agi: Whitepages match. New CallerIDName = Doe, J
This warning message continues showing up every time the script runs until I reboot my box.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #2 (permalink)  
Old November 24th, 2006, 04:44 AM
Senior Member
 
Join Date: Jul 2005
Posts: 362
chandave is an unknown quantity at this point
Send a message via MSN to chandave
Default Re: Perl warning message after 'amportal restart' (calleridname.agi)

I've see this problem posted somewhere else as well.

I don't have a copy of Trixbox. Please post a copy of "/usr/lib/perl5/site_perl/5.8.5/Asterisk/AGI.pm" from your Trixbox to this forum.

I'm sure we can do a quick hack (just set the variable being complained about to the empty string before it's being concatenated) to alleviate the warning messages.

See ya...

d.c.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #3 (permalink)  
Old November 24th, 2006, 07:13 AM
Senior Member
 
Join Date: May 2006
Posts: 110
rybshik
Default Re: Perl warning message after 'amportal restart' (calleridname.agi)

Please see attachment
Attached Files
File Type: zip AGI.zip (6.0 KB, 2 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #4 (permalink)  
Old November 25th, 2006, 08:41 AM
Senior Member
 
Join Date: Jul 2005
Posts: 362
chandave is an unknown quantity at this point
Send a message via MSN to chandave
Default Re: Perl warning message after 'amportal restart' (calleridname.agi)

Quote:
Originally Posted by rybshik View Post
Please see attachment
OK. Found the problem.

More recent versions of Perl appear to be more strict about using uninitialized variables.

In calleridname.agi, the function $AGI->verbose() is used. But, all instances omit the verbose logging level parameter required by the function. Previous versions of Perl appear to overlook the fact that the parameter was not passed to the function. More recent versions of Perl warn about the using an uninitialized variable (in this case the undefined $level parameter).

The easiest fix would be to edit /var/lib/asterisk/agi-bin/calleridname.agi and change all instances of:

$AGI->verbose("some message")

to

$AGI->verbose("some message",1)

That will alleviate the constant warning messages generated when $AGI-verbose() is used in calleridname.agi.

See ya...

d.c.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #5 (permalink)  
Old November 25th, 2006, 07:25 PM
Senior Member
 
Join Date: May 2006
Posts: 110
rybshik
Default Re: Perl warning message after 'amportal restart' (calleridname.agi)

chandave, thanks a lot.

As you advised, I have changed all the instances of $AGI->verbose("some message") to $AGI->verbose("some message",1). Now disappeared all the warnings except for the very first one:
Use of uninitialized value in string eq at /var/lib/asterisk/agi-bin/calleridname.agi line 34,
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #6 (permalink)  
Old November 25th, 2006, 08:23 PM
Senior Member
 
Join Date: Jul 2005
Posts: 269
AlexanderBell
Default Re: Perl warning message after 'amportal restart' (calleridname.agi)

Fixed on Nerd Vittles as well. Thanks, Davy!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


LinkBacks (?)
LinkBack to this Thread: http://forum.voxilla.com/asterisk-support-forum/perl-warning-message-after-amportal-restart-calleridname-agi-19228.html
Posted By For Type Date
Nerd Vittles This thread Refback December 1st, 2006 11:24 PM
Nerd Vittles This thread Refback November 26th, 2006 10:37 PM

Similar Threads
Thread Thread Starter Forum Replies Last Post
AnyWho lookup in calleridname.agi rybshik Asterisk Support Forum 2 November 24th, 2006 03:11 AM
In Asterisk@Home mysql & perl connectivity problem mr_mehul_shah Asterisk Support Forum 0 April 25th, 2006 05:34 AM
3 Perl Ditties to Put Names Back in CallerID AlexanderBell Asterisk Support Forum 14 February 23rd, 2006 09:03 PM
Bizarre asterisk warning message lonnie2 Asterisk Support Forum 2 August 13th, 2005 03:31 PM
difference between restart and reboot commands on SPA-841 seth.fulton Cisco/Linksys (Sipura) VoIP Support Forum 1 May 23rd, 2005 07:45 PM

Voxilla Recommends
  • Voxilla News

    More Voxilla news



    All times are GMT. The time now is 07:41 PM.


    vBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
    SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc.
    Logos and trademarks are the property of Voxilla or their respective owner. All other content © 2003-2009 by Voxilla, Inc.