Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Sat Apr 20, 2024 3:32 am
VoIP Billing solution


All times are UTC




Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: CALL PLAN AND RATECARDS LOGIC..
PostPosted: Tue Mar 09, 2010 4:07 am 
Offline

Joined: Sat Jul 25, 2009 8:03 pm
Posts: 45
Hi there,

If I have created 2 ratecards for international calls using 2 different providers, "International Cheap" and "International Premium". I also created a new Call Plan called "International Calls".

So my questions are:

1) Can both ratecards coexist in the same Call Plan without conflicts?
2) If #1's response is YES, How can I tell the call plan that the Cheap ratecard should be used first and if it fails then it should try the ratecard with premium (and more expensive) rates?

I know I can set "failover trunks" on every trunk used for every rate in any ratecard but the problem with that method is that I wouldn't be charging the customer the right rate in case the cheap trunk fails and switches to the premium one to try to place the call. For instance, let's suppose that calling a cell phone in Colombia costs 9 cents with the cheap ratecard but it costs 14 cents with the premium. Creating a Call Plan and just using the cheap ratecard with the premium trunk as failover trunk could end in a loss of profit for me if the cheap one fails and A2B tries the more expensive route.

if questions #1 and #2 do not make sense, then How can I combine 2 ratecards in the same call plan so the premium ratecard can be the backup or "failover" of the cheap ratecard and charge the customer the right rate depending on which trunk successfully connected the call?

Thank you in advance,

PAUL


Top
 Profile  
 
 Post subject: Re: CALL PLAN AND RATECARDS LOGIC..
PostPosted: Tue Mar 09, 2010 11:45 am 
Offline
User avatar

Joined: Thu Jan 14, 2010 4:07 pm
Posts: 23
Location: Brazil
Paul,

1) Both ratecards can coexist in the same Call Plan without any conflicts.

2) For a2billing always look for the cheapest rate for you, define the field LC TYPE = LCR(According to the buyer price), editing the settings of your call plan. If the trunk fails the system will look for another rate with the same prefix and uses it.

Rick.


Top
 Profile  
 
 Post subject: Re: CALL PLAN AND RATECARDS LOGIC..
PostPosted: Fri Mar 12, 2010 9:21 pm 
Offline

Joined: Sat Jul 25, 2009 8:03 pm
Posts: 45
Ricardo,

Thank you for the explanation, however, it is not working for me as desired.

I have two ratecards linked to two different providers under the same call plan and both have the prefixes to call numbers in Ecuador.

In one of them the buyer price is $0.157 for cellullar phones and the other one has $0.187 as a buyer price for cellular phones. In both cases, though, the seller price is $0.19. The Call Plan is set as LCR but when I place a call, A2B it chooses the prefix of the ratecard with the highest buyer price ($0.187) instead of the cheapest one ($0.157)

Any further suggestions? Otherwise I'll have to reconfigure the trunks as they were before to use a VoIP carrier as the backup of the main one, meaning that I'll be losing money when the A2B chooses as failover trunk the expensive carrier.

Best Regards,

Paul


Top
 Profile  
 
 Post subject: Re: CALL PLAN AND RATECARDS LOGIC..
PostPosted: Sat Mar 13, 2010 2:08 am 
Offline

Joined: Wed Feb 13, 2008 11:11 am
Posts: 224
haven't done it but look at rate card use DNID prefix

Quote:
Set the DNID rules to choose the ratecard 'dnidprefix', by default, matches all DNID. For instance, Set the DNIDPrefix to 900540540 to choose this ratecard when the DNID is 900540540


Rgds
Eamonn


Top
 Profile  
 
 Post subject: Re: CALL PLAN AND RATECARDS LOGIC..
PostPosted: Sat Mar 13, 2010 10:46 am 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4065
Hi

Don't forget that A2Billing chooses the longest match to dialcode first before LCR.

Joe


Top
 Profile  
 
 Post subject: Re: CALL PLAN AND RATECARDS LOGIC..
PostPosted: Sat Mar 13, 2010 4:29 pm 
Offline

Joined: Tue Aug 19, 2008 3:49 pm
Posts: 184
Hi,

This would not be a exact solution to the concern, however, is it or could it be possible to prefix a call plan?

Example:

Call Plan "ABC" is set up with cheap route ratecards from multiple providers.

Call Plan "XYZ" is set up with premium route ratecards from multiple providers.

The client is set up with call plan "ABC" by default. If that fails they can hang up and call the premium route by adding a prefix to the number.

I know you can do this with a rate card or trunk and there are services using A2B doing this. However, if I understand the system correctly, the rate card or trunk are tied to a single provider.

Having the call plan prefix trigger would allow multiple ratecards/providers.

This may not be the best LCR solution but it might be one that does not require a complete rewrite of the current one.

Kind Regards,

Les


Top
 Profile  
 
 Post subject: Re: CALL PLAN AND RATECARDS LOGIC..
PostPosted: Sun Mar 14, 2010 6:34 am 
Offline

Joined: Sat Jul 25, 2009 8:03 pm
Posts: 45
Hi guys,

First, Joe is quite right. I noticed that if you want two or more ratecards to work the way you want under the same call plan the first you have to do is ENSURE that *all* ratecards have the same set of prefix patterns. BUT, for instance, if the expensive ratecard has the prefix 5939782 and the cheap ratecard only has 59397 and a user dials 59397820900 A2B *will* select 5939782 which belongs to the expensive route and not the cheap despite the Call Plan has been set as "LCR". Careful with this guys.

Now, what has discouraged and disappointed me is that even if I can 'standardize' all the prefixes for all my ratecards and put them all under the same Call Plan, A2B *won't* use the other ratecards as the "failover" of the first pick when someone dials a number. Instead, A2B gives up if the trunk of the chosen ratecard fails and the user hears "The number you have dialed is currently unavailable, please enter the number you wish to call and then press the pound key"

This situation leaves me right where I started, and that is..... I must 'nest' my trunks like I did before in order to avoid connection problems for my customers, however, that will make me lose both money and the accuracy of the profit reports for the CDR will register the buy and sell rates of the first ratecard despite the fact that the A2B engine actually placed the call using the failover trunk belonging to a more expensive carrier.

Does anyone have more suggestions?

Thank you all in advance,

Paul


Top
 Profile  
 
 Post subject: Re: CALL PLAN AND RATECARDS LOGIC..
PostPosted: Sun Mar 14, 2010 6:42 am 
Offline

Joined: Sat Jul 25, 2009 8:03 pm
Posts: 45
By the way, Les:

Regarding your question of multiple trunks/providers for the same ratcard, yes, you can combine different trunks under the same ratecard for every entry of your rate list. I have done that in a couple of my ratecards.

- Paul


Top
 Profile  
 
 Post subject: Re: CALL PLAN AND RATECARDS LOGIC..
PostPosted: Sun Mar 14, 2010 2:39 pm 
Offline

Joined: Tue Aug 19, 2008 3:49 pm
Posts: 184
striderec wrote:
By the way, Les:

Regarding your question of multiple trunks/providers for the same ratcard, yes, you can combine different trunks under the same ratecard for every entry of your rate list. I have done that in a couple of my ratecards.

- Paul


Hi Paul,

Thanks, I see what you are saying with the select the trunk and the ratecard import and or edit rate. I like to keep my peas and carrots separate and I was blinded by that. Areski, has allowed so many ways to configure A2Billing, that I can see why documentation is so hard. There are a lot of scenarios to cover. You have to love his logic even if it does not necessarily hit you in the head on the first try.

However, you still have the most specific prefix concern though.

Also, I am not sure if this will help with your fail over concern but there is a setting failover_lc_prefix in the agi-conf you might be able to use.

Kind Regards,

Les


Top
 Profile  
 
 Post subject: Re: CALL PLAN AND RATECARDS LOGIC..
PostPosted: Sun Mar 14, 2010 9:05 pm 
Offline

Joined: Mon Jan 08, 2007 6:56 pm
Posts: 345
http://trac.asterisk2billing.org/cgi-bi ... ticket/209

That is a link to a patch that was submitted earlier to match on the shortest prefix if ratecards are different. The A2B team opted not to put it in trunk because the shortest prefixes are usually land lines. Eg 0020 . 002056 will always match if it is a mobile number.

You can submit a better patch I guess.


Top
 Profile  
 
 Post subject: Re: CALL PLAN AND RATECARDS LOGIC..
PostPosted: Mon Mar 15, 2010 12:43 am 
Offline

Joined: Sat Jul 25, 2009 8:03 pm
Posts: 45
Hey Les,

Thank you very much for your help, that really seemed to achieve my goal!!

My cheapest provider's trunk was down the whole weekend (it was restored a few minutes ago) and following your advice to set the failover_lcd_prefix variable to "YES" on my agi-conf files I noticed that A2B used the expensive route and the appropriate ratecard to place the calls so no more "The number you have dialed is currently unavailable."

Vulcan, as for the length of the prefixes, I mentioned in my previous e-mail that I standardized all my ratecards to avoid the usage of special features or patches to allow A2B choose the right value. Thank you very much for the patch anyway.

Best Regards,

PAUL


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 
VoIP Billing solution


All times are UTC


Who is online

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