<html><head><base href="x-msg://274/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Ruddy<div><br></div><div><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div lang="EN-CA" link="blue" vlink="purple"><div class="WordSection1" style="page: WordSection1; "><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; ">Run a script that will loop on every existing npa-nxx</span></div></div></div></span></blockquote><br></div><div>that is what is not wanted. Internationally there is no list of dialing codes that is chiseled in stone. Any operator can create break-out codes as deep as he wishes.</div><div><br></div><div>Using predefined destination code lists has usually two results:</div><div><br></div><div>1. Your rate is too high in relation to the market, no business.</div><div>2. Your rate it too low, you get cherry-picked (if you dont have some sort of loss protection)</div><div><br></div><div>Gerry</div><div><br></div><div><br></div><div><div><div>On 27 Sep 2012, at 15:26, Ruddy Gbaguidi wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div lang="EN-CA" link="blue" vlink="purple"><div class="WordSection1" style="page: WordSection1; "><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; ">Well, this is a classic database job.<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; ">Create your customer_rate with npa-nxx.<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; ">Run a script that will loop on every existing npa-nxx, and for each on of them, will query your providers table, get the best one add your margin and insert into the npa-nxx table.<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; ">You can contact me off the list and show me what your schema looks like so I can help.<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; "><o:p>&nbsp;</o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; ">Thanks<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; "><o:p>&nbsp;</o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><b><span lang="EN-US" style="font-size: 10pt; font-family: Tahoma, sans-serif; ">From:</span></b><span lang="EN-US" style="font-size: 10pt; font-family: Tahoma, sans-serif; "><span class="Apple-converted-space">&nbsp;</span><a href="mailto:asterisk-biz-bounces@lists.digium.com" style="color: blue; text-decoration: underline; ">asterisk-biz-bounces@lists.digium.com</a><span class="Apple-converted-space">&nbsp;</span>[mailto:asterisk-biz-bounces@lists.digium.com]<span class="Apple-converted-space">&nbsp;</span><b>On Behalf Of<span class="Apple-converted-space">&nbsp;</span></b>Avi Marcus<br><b>Sent:</b><span class="Apple-converted-space">&nbsp;</span>2012-09-27 07:44<span class="Apple-converted-space">&nbsp;</span><br><b>To:</b><span class="Apple-converted-space">&nbsp;</span>Commercial and Business-Oriented Asterisk Discussion<br><b>Subject:</b><span class="Apple-converted-space">&nbsp;</span>Re: [asterisk-biz] Algorithms for generating dialing codes and rates?<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><o:p>&nbsp;</o:p></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; ">Ruddy, he's asking the next question...<o:p></o:p></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; ">I have my routing table, but I want to provide the customer with an a-z or &nbsp;just npa-nxx rate list.<o:p></o:p></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; ">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?<o:p></o:p></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><o:p>&nbsp;</o:p></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; ">It's not a simple question...<o:p></o:p></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><br clear="all"><o:p></o:p></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-family: Verdana, sans-serif; ">-Avi</span><o:p></o:p></div></div><p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 12pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><br><br><o:p></o:p></p><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; ">On Thu, Sep 27, 2012 at 1:31 PM, Ruddy Gbaguidi &lt;<a href="mailto:plugworld@micnes.com" target="_blank" style="color: blue; text-decoration: underline; ">plugworld@micnes.com</a>&gt; wrote:<o:p></o:p></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; ">Hi<br>It all depends on your database design.<br>What you can do is first have a provider's rates table.<br>It will have the provider name/id, the destination prefix, and price.<br>So, when you have a full destination number (eg 10 digits), you run a query<br>where the number contains the provider prefix.<br>Then you order by prefix length descending and by price ascending..<br><br>It is called least cost routing.<o:p></o:p></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><br><br>-----Original Message-----<br>From:<span class="Apple-converted-space">&nbsp;</span><a href="mailto:asterisk-biz-bounces@lists.digium.com" style="color: blue; text-decoration: underline; ">asterisk-biz-bounces@lists.digium.com</a><br>[mailto:<a href="mailto:asterisk-biz-bounces@lists.digium.com" style="color: blue; text-decoration: underline; ">asterisk-biz-bounces@lists.digium.com</a>] On Behalf Of Gerry Jacobsen<br>Sent: 2012-09-27 03:26<br>To: Commercial and Business-Oriented Asterisk Discussion<br>Subject: [asterisk-biz] Algorithms for generating dialing codes and rates?<br><br>Hello,<br><br>is anyone aware of algorithms or software which can generate customer rate<br>tables with dialing codes and rates from given provider rates - without<br>having a predefined destination, dialing code table for customers ?<br><br>Inputs:<br><br>- several offers from providers with break-out codes and rates<br>- parameter: maximum break-out code length<br>- parameter: profit margin<br><br>Output:<br>- Customer rate table with breakout codes / destinations and rates<br><br>Anyone?<br><br>TIA<br><br>Gerry<br><br><br>--<br>_____________________________________________________________________<br>-- Bandwidth and Colocation Provided by<span class="Apple-converted-space">&nbsp;</span><a href="http://www.api-digital.com" target="_blank" style="color: blue; text-decoration: underline; ">http://www.api-digital.com</a><span class="Apple-converted-space">&nbsp;</span>--<br><br>asterisk-biz mailing list<br>To UNSUBSCRIBE or update options visit:<br>&nbsp; &nbsp;<a href="http://lists.digium.com/mailman/listinfo/asterisk-biz" target="_blank" style="color: blue; text-decoration: underline; ">http://lists.digium.com/mailman/listinfo/asterisk-biz</a><br><br><br><br>--<br>_____________________________________________________________________<br>-- Bandwidth and Colocation Provided by<span class="Apple-converted-space">&nbsp;</span><a href="http://www.api-digital.com" target="_blank" style="color: blue; text-decoration: underline; ">http://www.api-digital.com</a><span class="Apple-converted-space">&nbsp;</span>--<br><br>asterisk-biz mailing list<br>To UNSUBSCRIBE or update options visit:<br>&nbsp; &nbsp;<a href="http://lists.digium.com/mailman/listinfo/asterisk-biz" target="_blank" style="color: blue; text-decoration: underline; ">http://lists.digium.com/mailman/listinfo/asterisk-biz</a><o:p></o:p></div></div></div></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><o:p>&nbsp;</o:p></div></div></div></div></div></div>--<br>_____________________________________________________________________<br>-- Bandwidth and Colocation Provided by<span class="Apple-converted-space">&nbsp;</span><a href="http://www.api-digital.com" style="color: blue; text-decoration: underline; ">http://www.api-digital.com</a><span class="Apple-converted-space">&nbsp;</span>--<br><br>asterisk-biz mailing list<br>To UNSUBSCRIBE or update options visit:<br>&nbsp;&nbsp;<a href="http://lists.digium.com/mailman/listinfo/asterisk-biz" style="color: blue; text-decoration: underline; ">http://lists.digium.com/mailman/listinfo/asterisk-biz</a></div></span></blockquote></div><br></div></body></html>