Thanks Daniel,<div><br></div><div>That got me started, however, it seems that the return value from $(rU{s.len}) is actually an integer and therefore could not be concatenated to $rU string ?</div><div><br></div><div><div>
4(18194) ERROR: pv [pv_core.c:1798]: str value required to set R-URI user</div><div>14(18194) ERROR: <core> [lvalue.c:354]: setting pvar failed</div><div>14(18194) ERROR: <core> [lvalue.c:407]: assignment failed at pos: (906,8-906,25)</div>
<div>14(18194) ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=907 a=26 n=xlog</div><div>14(18194) ERROR: <script>: rU is now 8287825573!!!!!!!!!!!!!!!!</div><br><div class="gmail_quote">On Mon, Aug 27, 2012 at 2:30 PM, Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
one solution is doing following trick:<br>
<br>
- get the length of the dialed number via transformation and prefix
it to the number<br>
<br>
$rU = $(rU{s.len}) + $rU;<br>
<br>
- in drouting keep rules only for prefixes 2, 4, 6, 7 and 8<br>
- for drouting gateways set strip to 1, so the first digit (the
length) is removed before forwarding<br>
<br>
Cheers,<br>
Daniel<div><div class="h5"><br>
<br>
<div>On 8/27/12 10:20 PM, Luis Fernando
Urrea wrote:<br>
</div>
<blockquote type="cite">Yes thank you Daniel,
<div><br>
</div>
<div>On my setup I terminate local calls using colocated TDM
equipment, these calls are 8 digit numbers that start with
2,4,6,7 and 8</div>
<div><br>
</div>
<div>Then I use a FreeSWITCH box as a gateway for US and
international calls, so I was hoping I could somehow route based
on numbers of digits.</div>
<div><br>
</div>
<div>I hope that is clear enough.</div>
<div><br>
</div>
<div>Regards,</div>
<div><br>
</div>
<div>Luis<br>
<br>
<div class="gmail_quote">On Mon, Aug 27, 2012 at 2:08 PM,
Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,
<div><br>
<br>
On 8/27/12 6:54 PM, Luis Fernando Urrea wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I haven't been able to find the answer in the
documentation.<br>
<br>
It seems DROUTING does not take regex in the dr_rules
table to match routable numbers, are there any kind of
wilcards that could be used.<br>
<br>
How does one specify different rules for 8 digit numbers
and 10 digit numbers.<br>
<br>
<br>
</blockquote>
</div>
drouting uses longest prefix matching to select the rule.<br>
<br>
Do you have rules only on length or also on prefix? If you
provide a bit more details about what routing rules you are
looking for, we may be able to provide hints about how to
implement in the config file.<br>
<br>
Cheers,<br>
Daniel<span><font color="#888888"><br>
<br>
-- <br>
Daniel-Constantin Mierla - <a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a><br>
<a href="http://twitter.com/#%21/miconda" target="_blank">http://twitter.com/#!/miconda</a>
- <a href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a><br>
Kamailio Advanced Training, Berlin, Nov 5-8, 2012 - <a href="http://asipto.com/u/kat" target="_blank">http://asipto.com/u/kat</a><br>
<br>
</font></span></blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div><font color="#999999">O: 2248-2483</font></div>
<div><font color="#999999">C: 6040-3624</font></div>
<div><font color="#999999"><img><br>
</font></div>
<br>
</div>
</blockquote>
<br>
<pre cols="72">--
Daniel-Constantin Mierla - <a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a>
<a href="http://twitter.com/#!/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a>
Kamailio Advanced Training, Berlin, Nov 5-8, 2012 - <a href="http://asipto.com/u/kat" target="_blank">http://asipto.com/u/kat</a></pre>
</div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div><font color="#999999">O: 2248-2483</font></div><div><font color="#999999">C: 6040-3624</font></div><div><font color="#999999"><img src="http://db.tt/0GiYVVen"><br>
</font></div><br>
</div>