Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Fri Apr 19, 2024 4:50 pm
Hosted Voice Broadcast


All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Incorrect LCR
PostPosted: Mon Jan 06, 2014 10:53 pm 
Offline

Joined: Mon Jun 24, 2013 7:59 pm
Posts: 18
I'm using version 2.0.4 with asterisk 1.8

I have a provider that gives me a prefix of 1 for all of america and a single price.

I have another provider that gives me more details breakouts e.g. 1 855 is 0 or 1 712 is 0.1 etc

When I set LCR to '0' (classic) it always selects the longest matching prefix. This is fine.

When I set LCR mode to '1' (provider) a2billing selects the shortest prefix of 1 - but this is also the most expensive - why is this?

Surely a2billing should find the shortest prefix (that matches the dialled number) from EACH ratecard and then select the cheapest of the bunch?

Cheers,

C


Top
 Profile  
 
 Post subject: Re: Incorrect LCR
PostPosted: Tue Jan 07, 2014 8:57 pm 
Offline

Joined: Mon Mar 02, 2009 8:56 pm
Posts: 271
You're correct. In LCR mode I think it should be finding a matching rate on each rate card and then choosing the least expensive.

I would switch on detailed debugging and check the logs to see what queries A2Billing is making when choosing the rate card to use.


Top
 Profile  
 
 Post subject: Re: Incorrect LCR
PostPosted: Wed Jan 08, 2014 2:16 am 
Offline

Joined: Mon Jun 24, 2013 7:59 pm
Posts: 18
I tried to check the logs but my a2billing doesnt seem to output a log file to /var/log/a2billing

Any ideas how I can get the log file generated or check where it is being stored?


Top
 Profile  
 
 Post subject: Re: Incorrect LCR
PostPosted: Wed Jan 08, 2014 9:30 am 
Offline

Joined: Mon Mar 02, 2009 8:56 pm
Posts: 271
You should be able to turn on debug logging like this - http://sysadminman.net/blog/2011/a2bill ... gging-2417

Don't forget to turn it off after though as it will slow down call processing.


Top
 Profile  
 
 Post subject: Re: Incorrect LCR
PostPosted: Sun Jan 26, 2014 2:34 pm 
Offline

Joined: Mon Jun 24, 2013 7:59 pm
Posts: 18
My system wasn't generating an a2billing_agi.log file because there was no a2billing folder under /var/log.

I created a folder /var/log/a2billing then made a test call, et voila I now have a log file.

Thanks for the help guys!


Top
 Profile  
 
 Post subject: Re: Incorrect LCR
PostPosted: Sun Jan 26, 2014 3:41 pm 
Offline

Joined: Mon Jun 24, 2013 7:59 pm
Posts: 18
I can see in the log file (with LCR mode set to 1)

That a2billing finds the following rates:
Number Dialled: USA - 15165

Provider 1
[destination] => 1
[buyrate] => 0.00720

Provider 2
[destination] => 1516
[buyrate] => 0.00462

Provider 3
[destination] => 1516
[buyrate] => 0.00567

Provider 2 and 3 also have a destination of '1' but this is priced higher than the longer match '1516' therefore they are removed from the equation.

For some reason though a2billing seems to think that Provider 1 is the cheapest route, when clearly Provider 2 is.

In the rate simulator only providers 2 and 3 are given as options, which means provider 1 should never be chosen, but in reality this doesn't happen. Why is this?! (Simulator shows 'lcrtype' as 1).

Another example

Provider 1:
[destination] => 442
[buyrate] => 0.00470

Provider 2:
[destination] => 4420
[buyrate] => 0.00637

Provider 3:
[destination] => 4420
[buyrate] => 0.00371

Here Provider 3 has the longest matching prefix and also the cheapest rate, yet provider 1 is selected!

In classic mode it selects provider 3.


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


All times are UTC


Who is online

Users browsing this forum: No registered users and 19 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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group