Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Sat Apr 20, 2024 12:13 am
Hosted Voice Broadcast


All times are UTC




Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: Getting Undefined variable agi
PostPosted: Sun Sep 02, 2007 12:10 am 
Offline

Joined: Wed Jul 25, 2007 9:20 am
Posts: 6
Since I killed and restarted Asterisk, I've been getting this message repeatedly:
"Aug 30 23:52:50 fax php: /var/lib/asterisk/agi-bin/libs_a2billing/Class.RateEngine.php[722]: Undefined variable: agi"

I did not do any other operation other than restart and reload Asterisk.
I took no specific A2billing related action.

I'm worried that something has gotten messed up in the billing.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 02, 2007 3:32 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
I think you're right to be worried. I hope you're keeping an eye on the CDRs after making a call to ensure folks are being billed correctly.

I've not seen this particular problem before, but you're not alone. Are you running the same distro as rrisco? What version of Asterisk are you running?

The code around where the fault occurs is responsible for writing the CDRs and deducting the cost from the card. I can't see how execution could get that far without the AGI global being defined. A complete guess: if you're running certain versions of Asterisk 1.4, this could possibly be caused by using DeadAGI not AGI. Probably not, but I'm at a loss as to any other explanation.


Top
 Profile  
 
 Post subject: Running Trixbox version 2.0.0
PostPosted: Sun Sep 02, 2007 3:47 pm 
Offline

Joined: Wed Jul 25, 2007 9:20 am
Posts: 6
I'm running Trixbox version 2.0.0. Is there any additional information I could provide which would help in debugging this problem?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 02, 2007 4:25 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
Your Asterisk version. I'm not familiar enough with TrixBox to know if this dictates your Asterisk version.

Did you try swapping AGI for DeadAGI (or even vice-versa) temporarily?


Top
 Profile  
 
 Post subject: Asterisk version 1.2.13
PostPosted: Sun Sep 02, 2007 4:31 pm 
Offline

Joined: Wed Jul 25, 2007 9:20 am
Posts: 6
No, I didn't try switching. How do I do so?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 02, 2007 4:46 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
If TrixBox uses default Asterisk conventions you need to edit /etc/asterisk/extensions.conf (after making a backup). Replace instances of 'DeadAGI(' with 'AGI('. Save. From the Asterisk console 'extensions reload'. Then retest.

Quote:
Since I killed and restarted Asterisk
I only just noticed this part. If you had to kill Asterisk I guess it's possible this might have left some pidfile, lockfile or other session information lying around. I know it's anathema on Linux, but does a reboot make any difference? It's an easy way to clear out /tmp and /var/run.


Top
 Profile  
 
 Post subject: Good idea, thanks
PostPosted: Sun Sep 02, 2007 4:52 pm 
Offline

Joined: Wed Jul 25, 2007 9:20 am
Posts: 6
You could very well be right. We're going to do a reboot later when traffic slows down and see if that doesn't help.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 02, 2007 5:18 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
I should make it clear that my previous advice about checking DeadAGI/AGI is based on the assumption that at some point Asterisk was upgraded on this machine.
Are you 100% sure that nothing was changed/upgraded on this system since the last time Asterisk was restarted? If so then don't bother swapping DeadAGI/AGI, as it evidently worked for you previously.

BTW we still don't know your Asterisk version, or whether your CDRs are being generated correctly. Please advise.


Top
 Profile  
 
 Post subject: Sorry
PostPosted: Sun Sep 02, 2007 5:31 pm 
Offline

Joined: Wed Jul 25, 2007 9:20 am
Posts: 6
I thought I had posted the Asterisk version, sorry. It's version 1.2.13


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 31, 2007 4:46 pm 
Offline

Joined: Tue May 23, 2006 8:30 pm
Posts: 67
hi yitzhakbg
did you solve this problem?

rafael


Top
 Profile  
 
 Post subject: Undefined index messages
PostPosted: Wed Oct 31, 2007 6:43 pm 
Offline

Joined: Wed Jul 25, 2007 9:20 am
Posts: 6
Thanks very much for your interest.
I keep getting messages like these in the log. I'd love to fix it.
Yitzhak

Oct 31 20:27:32 fax php: /var/lib/asterisk/agi-bin/libs_a2billing/Class.A2Billing.php[1734]: Undefined index: asterisk_version
Oct 31 20:27:32 fax php: /var/lib/asterisk/agi-bin/libs_a2billing/Class.RateEngine.php[67]: Undefined index: force_callplan_id
Oct 31 20:27:32 fax php: /var/lib/asterisk/agi-bin/libs_a2billing/Class.RateEngine.php[296]: Undefined variable: agi
Oct 31 20:27:32 fax php: /var/lib/asterisk/agi-bin/libs_a2billing/Class.RateEngine.php[302]: Undefined variable: agi
Oct 31 20:27:41 fax php: /var/lib/asterisk/agi-bin/libs_a2billing/Class.RateEngine.php[610]: Undefined variable: agi
Oct 31 20:27:41 fax php: /var/lib/asterisk/agi-bin/libs_a2billing/Class.RateEngine.php[645]: Undefined variable: agi
Oct 31 20:27:41 fax php: /var/lib/asterisk/agi-bin/libs_a2billing/Class.RateEngine.php[722]: Undefined variable: agi
Oct 31 20:28:07 fax php: /var/lib/asterisk/agi-bin/libs_a2billing/Class.A2Billing.php[1734]: Undefined index: asterisk_version

Oct 31 20:33:48 fax php: /var/lib/asterisk/agi-bin/libs_a2billing/Class.A2Billing.php[1734]: Undefined index: asterisk_version
Oct 31 20:33:48 fax php: /var/lib/asterisk/agi-bin/libs_a2billing/Class.RateEngine.php[67]: Undefined index: force_callplan_id
Oct 31 20:33:48 fax php: /var/lib/asterisk/agi-bin/libs_a2billing/Class.RateEngine.php[296]: Undefined variable: agi
Oct 31 20:33:48 fax php: /var/lib/asterisk/agi-bin/libs_a2billing/Class.RateEngine.php[302]: Undefined variable: agi


Top
 Profile  
 
 Post subject: Re: Undefined index messages
PostPosted: Wed Oct 31, 2007 6:59 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
yitzhakbg wrote:
Oct 31 20:27:32 fax php: /var/lib/asterisk/agi-bin/libs_a2billing/Class.A2Billing.php[1734]: Undefined index: asterisk_version
Oct 31 20:27:32 fax php: /var/lib/asterisk/agi-bin/libs_a2billing/Class.RateEngine.php[67]: Undefined index: force_callplan_id
These look as though your a2billing.conf file is corrupt in some way.
yitzhakbg wrote:
Oct 31 20:27:32 fax php: /var/lib/asterisk/agi-bin/libs_a2billing/Class.RateEngine.php[296]: Undefined variable: agi
These are troubling. I guess they could be caused by the AMI credentials in a2billing.conf not matching those in manager.conf. What does the Asterisk console say when you modify a SIP friend and click Reload?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 
Voice Broadcast System


All times are UTC


Who is online

Users browsing this forum: No registered users and 13 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group