<div class="gmail_quote"><div>Hello Ben</div><div><br></div><div>dialplan module should help you: <a href="http://kamailio.org/docs/modules/3.2.x/modules/dialplan.html">http://kamailio.org/docs/modules/3.2.x/modules/dialplan.html</a></div>
<div><br></div><div>Regards</div><div><br></div><div><br></div><div>Javi </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
------------------------------<br>
<br>
Message: 5<br>
Date: Fri, 17 Feb 2012 12:49:04 +1300<br>
From: Ben WIlliams &lt;<a href="mailto:benwilliams@joobworld.com" target="_blank">benwilliams@joobworld.com</a>&gt;<br>
Subject: Re: [SR-Users] How to do request URI rewrites using database<br>
        tables?<br>
To: &quot;SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) -<br>
        Users   Mailing List&quot; &lt;<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>&gt;<br>
Message-ID:<br>
        &lt;CANfYGQkeK3i=vBbdox+ekGeeKmjWhhgarUJcAo3oV=rrO=<a href="mailto:Wwig@mail.gmail.com" target="_blank">Wwig@mail.gmail.com</a>&gt;<br>
Content-Type: text/plain; charset=ISO-8859-1<br>
<br>
I&#39;ve managed to get dbaliases and lcr to do most of this. But the lcr<br>
prefix does not allow regular expressions. Is there any other module<br>
that allows you to store in the database a regular expression rewrite<br>
rule?<br>
<br>
On Thu, Feb 16, 2012 at 1:21 PM, Ben WIlliams &lt;<a href="mailto:benwilliams@joobworld.com" target="_blank">benwilliams@joobworld.com</a>&gt; wrote:<br>
&gt; Hi, can someone please recommend the most appropriate modules to<br>
&gt; rewrite R-URIs based on a database lookup table? I&#39;ve read the<br>
&gt; documentation for lcr and carrierroute but not sure if they can do<br>
&gt; this.<br>
&gt;<br>
&gt; In most cases it will be a simple R-URI rewrite but I also need to<br>
&gt; rewrite based on From user.<br>
&gt;<br>
&gt; ie<br>
&gt;<br>
&gt; R-URI match ? ? ? ? ? ? From match ? ? ? ? ? ? ? ? ?new R-URI<br>
&gt; =========== ? ? ? ? ? ? ========== ? ? ? ? ? ? ? ? ?=========<br>
&gt; *<a href="mailto:97@example.com" target="_blank">97@example.com</a> ? ? ? ? 6[0-9]@<a href="http://example.com" target="_blank">example.com</a> ? ? ? ? ?*<a href="mailto:97@10.0.0.1" target="_blank">97@10.0.0.1</a><br>

&gt; *<a href="mailto:97@example.com" target="_blank">97@example.com</a> ? ? ? ? 7[0-9]@<a href="http://example.com" target="_blank">example.com</a> ? ? ? ? ?*<a href="mailto:97@10.0.0.2" target="_blank">97@10.0.0.2</a><br>

&gt; 6[0-9]@<a href="http://example.com" target="_blank">example.com</a> ? ? ?match any ? ? ? ? ? ? ? ? ? rewrite domain to 10.0.0.1<br>
&gt; <a href="mailto:abc@example.com" target="_blank">abc@example.com</a> ? ? ? ? match any ? ? ? ? ? ? ? ? ? <a href="mailto:def@example.com" target="_blank">def@example.com</a><br>
&gt;<br>
&gt; Thanks<br>
&gt; Ben<br>
<br>
<br>
<br></blockquote></div>