[asterisk-biz] Algorithms for generating dialing codes and rates?
Alex Balashov
abalashov at evaristesys.com
Thu Sep 27 07:31:21 CDT 2012
Practically speaking, there is no universal answer here.
The technical answer to the question of "how do I comb my database?"
depends on your database design. It's a question to ask a SQL person or
DBA.
As for algorithms, that depends on your desired business rules. Rate
blending formulas can be very simple, or quite complex. A simple
formula would be to take the most granular prefix available among all
your vendors, mark up the price by a percentage or linear margin, and
put the price and the prefix into a resulting retail rate deck. That is
safe enough, assuming that the vendor that provides your most granular
(longest) prefixes has decent ASR, and can be counted on to actually
take most of the calls you send them.
On the other hand, our routing/LCR/rating product comes with a
supplementary rate blender script that applies a somewhat more complex
theory. It does use the longest prefixes available from vendors, as
well, but operates on the theory that the cheapest vendor routes should
also be the highest-margin, and therefore takes, as parameters, linear
steps in pricing breaks. Thus, you can, say something like: start at
0.005/min margin for rates of 0.002/min or lower, and decrease in steps
of X% margin to a ceiling of, say, 0.008/min, after which the margin is
held constant (so that the margin doesn't decrease asymptotically). It
also applies an additional tax and risk premium to every destination, to
cover things like USF, and the risk that the primary vendor won't be the
one completing the call.
This is not industry standard. There is no industry standard. We just
came up with it ourselves. That's what everyone does.
On 09/27/2012 07:44 AM, Avi Marcus wrote:
> Ruddy, he's asking the next question...
> I have my routing table, but I want to provide the customer with an a-z
> or just npa-nxx rate list.
> How do I automatically comb my database for each possible destination
> sub-type to generate a rate deck, and properly merge carriers with my
> pre-defined profit margin?
>
> It's not a simple question...
>
> -Avi
>
>
>
> On Thu, Sep 27, 2012 at 1:31 PM, Ruddy Gbaguidi <plugworld at micnes.com
> <mailto:plugworld at micnes.com>> wrote:
>
> Hi
> It all depends on your database design.
> What you can do is first have a provider's rates table.
> It will have the provider name/id, the destination prefix, and price.
> So, when you have a full destination number (eg 10 digits), you run
> a query
> where the number contains the provider prefix.
> Then you order by prefix length descending and by price ascending..
>
> It is called least cost routing.
>
>
> -----Original Message-----
> From: asterisk-biz-bounces at lists.digium.com
> <mailto:asterisk-biz-bounces at lists.digium.com>
> [mailto:asterisk-biz-bounces at lists.digium.com
> <mailto:asterisk-biz-bounces at lists.digium.com>] On Behalf Of Gerry
> Jacobsen
> Sent: 2012-09-27 03:26
> To: Commercial and Business-Oriented Asterisk Discussion
> Subject: [asterisk-biz] Algorithms for generating dialing codes and
> rates?
>
> Hello,
>
> is anyone aware of algorithms or software which can generate
> customer rate
> tables with dialing codes and rates from given provider rates - without
> having a predefined destination, dialing code table for customers ?
>
> Inputs:
>
> - several offers from providers with break-out codes and rates
> - parameter: maximum break-out code length
> - parameter: profit margin
>
> Output:
> - Customer rate table with breakout codes / destinations and rates
>
> Anyone?
>
> TIA
>
> Gerry
>
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-biz mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-biz
>
>
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-biz mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-biz
>
>
>
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-biz mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-biz
>
--
Alex Balashov - Principal
Evariste Systems LLC
235 E Ponce de Leon Ave
Suite 106
Decatur, GA 30030
Tel: +1-678-954-0670
Fax: +1-404-961-1892
Web: http://www.evaristesys.com/, http://www.alexbalashov.com/
More information about the asterisk-biz
mailing list