No subject


Thu Dec 6 16:59:43 CET 2012


If the gateway for least expensive route fails, try the next route etc...

Nice and simple I think? If anyone feels there is anything wrong with this,
I would really
appreciate your input. Also, if anyone can write this perl script easily, I
would be happy
to compensate for it.

Kind Regards,

Nick.

--089e0158b6bc0a0c7104e4a5dfe0
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hello =D0=9A=D0=B0=D0=BC=D0=B8=D0=BB=D1=8C<div><br></div><=
div style>Thank you so much for your response. Basically, what I have done =
is created a table `dr_rates`:</div><div style><br></div><div style><div>+-=
-------+----------------------------------------+--------+--------------+--=
--------+------------------+-------------+----------+</div>
<div>| rateid | destination =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 | cc =C2=A0 =C2=A0 | prefix =C2=A0 =
=C2=A0 =C2=A0| listrate | retailrate =C2=A0 =C2=A0 | currency | carrier |</=
div><div>+--------+----------------------------------------+--------+------=
--------+----------+------------------+--------------+---------+</div>
<div>| =C2=A0 5839 | Canada 416 Metro Toronto | 1 =C2=A0 =C2=A0 =C2=A0| =C2=
=A0 =C2=A0 =C2=A0 =C2=A01416 | =C2=A0 0.0028 | =C2=A0 =C2=A00.00364 | USD =
=C2=A0 =C2=A0 =C2=A0 =C2=A0| TN1 <span class=3D"" style=3D"white-space:pre"=
>	  </span>|</div><div>+--------+----------------------------------------+-=
-------+--------------+----------+------------------+--------------+-------=
--+</div>
<div><br></div><div style>And in `dr_rules`</div><div style><br></div><div =
style><div>+---------+-----------+--------+---------+--------------+-------=
--+--------+-------------+-------------------------------------------------=
-----+</div>
<div>| ruleid =C2=A0| groupid | prefix | timerec | priority | routeid | gwl=
ist | attrs =C2=A0 =C2=A0| description =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0|</div><div>+---------+-----------+--------+=
---------+--------------+---------+--------+-------------+-----------------=
--------------------------------------+</div>
<div>| =C2=A0 5839 | 0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 | 1416 =C2=A0 | =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 | =C2=A0 =C2=A0 =C2=A0 =C2=A01 =C2=A0 =C2=A0 | =
0 =C2=A0 =C2=A0 =C2=A0 | =C2=A0 =C2=A0 =C2=A0 =C2=A0| yes =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0| =C2=A0 Route for Canada 416 Metro Toronto |</div><div>+-=
--------+-----------+--------+---------+--------------+---------+--------+-=
------------+-------------------------------------------------------+</div>
<div><br></div></div></div><div style><br>=E2=80=8BFor scalability reasons =
as mentioned with Muhammad, we would like on every call to fire a perl scri=
pt that would</div><div style>query the database, and pull all the prefix f=
or the dialled number order by price ascending. I don&#39;t know much about=
</div>
<div style>prefixes and types of tricks carrier like to play longest vs. sh=
ortest matching etc however, what I am thinking about is:</div><div style><=
br></div><div style><br></div><div style>1) Pull up all records for the dia=
led CC</div>
<div style>2) If CC is 1 digit substring the first four digits of prefix</d=
iv><div style>2) If CC is 2 digits substring the first five digits of prefi=
x<br></div><div style>2) If CC is 3 digits substring the first six digits d=
igits of prefix<br>
</div><div style><br></div><div style>From all those relevant records, orde=
r by price ascending.</div><div style><br></div><div style>If the gateway f=
or least expensive route fails, try the next route etc...</div><div style>
<br></div><div style>Nice and simple I think? If anyone feels there is anyt=
hing wrong with this, I would really</div><div style>appreciate your input.=
 Also, if anyone can write this perl script easily, I would be happy</div>
<div style>to compensate for it.</div><div style><br></div><div style>Kind =
Regards,</div><div style><br></div><div style>Nick.</div></div>

--089e0158b6bc0a0c7104e4a5dfe0--



More information about the Users mailing list