Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Tue Apr 23, 2024 1:34 pm
Hosted Voice Broadcast


All times are UTC




Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: Intermittent Billing Issue
PostPosted: Wed Sep 17, 2008 1:46 pm 
Offline

Joined: Mon Jun 26, 2006 5:19 am
Posts: 14
Location: US
Intermittent Billing Issue

All:

I have recently discovered an issue where some calls are not being updated correctly. The customer's balance is not being updated since
the call is not marked ANSWER even though it completed. The issue is intermittent.

Symptoms:

- In A2B, go to the CDR's and click on "All Calls". If you see that the TC does not contain a value, then this might indicate that
you potentially have the same issue.


Asterisk 1.4.17

a2billing.php
$agi_version = "Asterisk2Billing - Version 1.3.3 (Doudou08)";

Mysql 5.0.45

Issue:

- Calls that appear as ANSWER in the * CDRs are not marked ANSWER in A2B.

- This happens using IAX || SIP

- The issue has taken place when the caller hangs up and also when the called party hangs up as well.

- It's intermittent which makes it very very hard to troubleshoot/debug.

- There are no errors (MYSQL or a2billing.php)

- The DB is updated, the TC is not populated though and the balance is not adjusted accordingly.

- I've looked at the a2billing.php source code and traced down all the calls and I think the issue is coming from * itself, more specifically
how the DIALSTATUS variable is being populated by *. My impression is that * is at times for some reason not populating this variable causing the
issue and all the symptoms described above.

I've searched the forum to see if this has been solved and have not been able to find a solution.

Any help with this will be greatly appreciated. I understand that downgrading * would be a possible solution, one that I would like to avoid though.

Thanks in advance for any help/suggestions.

Alfredo


Top
 Profile  
 
 Post subject: Re: Intermittent Billing Issue
PostPosted: Wed Sep 17, 2008 3:25 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
lawwton wrote:
Asterisk 1.4.17
I'm not aware of any problem in that version of Asterisk that might cause the symptoms you're describing, although there are quite a few scary security problems with that release so you should definately upgrade to v1.4.21.
Do you have PHP's pcntl module installed?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 17, 2008 4:02 pm 
Offline

Joined: Mon Jun 26, 2006 5:19 am
Posts: 14
Location: US
- It shows up on my list of installed modules.

php -m

[PHP Modules]
pcntl


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 17, 2008 4:05 pm 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
Are you using AGI(...) or DeadAGI(...) in your extensions?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 17, 2008 4:19 pm 
Offline

Joined: Mon Jun 26, 2006 5:19 am
Posts: 14
Location: US
extensions.conf

exten => 00,1,Answer()
exten => 00,2,Wait,1
exten => 00,3,AGI,(a2billing.php|1|)
exten => 00,4,Wait,2
exten => 00,5,Hangup()

a2billing.conf

dialcommand_param = "|60|HRgrL(%timeout%:61000:30000)"


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 17, 2008 4:27 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
lawwton wrote:
exten => 00,3,AGI,(a2billing.php|1|)
Then that's your problem. Use DeadAGI() as the documentation describes.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 17, 2008 4:30 pm 
Offline

Joined: Mon Jun 26, 2006 5:19 am
Posts: 14
Location: US
Just made the change, will monitor this to see what happens, appreciate the help.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 17, 2008 4:45 pm 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
It's a relief to see that he was using AGI(...). I was starting to panic about this eventual bug.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 17, 2008 4:48 pm 
Offline

Joined: Mon Jun 26, 2006 5:19 am
Posts: 14
Location: US
The strange thing is that AGI works for 99% of the calls. It's an intermittent issue which is not fun at all. I have switched back to DeadAGI and will monitor this to see how it goes.

There is also a warning from * saying to switch to AGI instead of DeadAGI on the console.

I'll keep you guys posted. I should be able to tell in a few hours or so.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 17, 2008 4:55 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
lawwton wrote:
It's an intermittent issue which is not fun at all.
It's not truly intermittent; when using AGI() it affects all calls where the callee clears down before the caller.
Quote:
There is also a warning from * saying to switch to AGI instead of DeadAGI on the console.
You could use the search function here on that phrase if you want to learn more about the situation.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 17, 2008 5:00 pm 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
When using AGI, if the channel is hung up, than the PHP script is forced to stopped even if there were some unfinished business.

With that in mind, depending on which channel has launched the AGI script, the script will be kill if that channel is closed. So if the called party hangs up before the caller, things will be ok. But if the caller hangs up first, than the billing will not be correctly completed.

When using DeadAGI, the script will be allowed to continue its execution after line line is hung up. That allows a2billing to do some clean up stuff and keep everyone happy.

Cheers


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 18, 2008 4:43 pm 
Offline

Joined: Mon Jun 26, 2006 5:19 am
Posts: 14
Location: US
- Well, it's been a few hours and things are working as expected using DeadAGI.

- A couple of things to keep in mind. When using AGI, as I previously mentioned, there were several test calls where I personally made sure the called party disconnected first and the calls were correctly registered. I performed lots and lots of tests before posting the issue. It happens as I mentioned previously intermittently at least in my platform and this is in both cases, caller and called party hanging up first.

Thanks guys for all the help, really appreciate it.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 
Auto Dialer Software


All times are UTC


Who is online

Users browsing this forum: No registered users and 8 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