<div dir="ltr"><div>for testing purposes i set up route[1] to call <a href="mailto:1001@ip.server.org">1001@ip.server.org</a> no matter what. but i only seem to be able to call it when i use the actual number ? is there someway to rewrite the uri on a given condition, like if 1002 is called it gets rewritten to <a href="mailto:1001@ip.server.org">1001@ip.server.org</a></div>
<div><br></div><div>this is my test try, but i cant seem to get any reaction on my conditions?</div><br clear="all"><div><div>route[1]</div><div>{</div><div>        # for INVITEs enable some additional helper routes</div>
<div>        if (is_method(&quot;INVITE&quot;))</div><div>        {</div><div>                if (!lookup(&quot;location&quot;))</div><div>                {</div><div>                        xlog(&quot;L_INFO&quot;,&quot;\n\n OK \n\n&quot;);</div>
<div>                        rewriteuri(&quot;<a href="mailto:sip%3A1001@ip.server.org">sip:1001@ip.server.org</a>&quot;);</div><div>                        t_relay();</div><div>                        exit;</div><div>                }</div>
<div>                xlog(&quot;L_INFO&quot;,&quot;\n\n $tU \n\n&quot;);</div><div>                if ($tU==&quot;1002&quot;)</div><div>                {</div><div>                        xlog(&quot;L_INFO&quot;,&quot;\n\n OK \n\n&quot;);</div>
<div>                        rewriteuri(&quot;<a href="mailto:sip%3A1001@ip.server.org">sip:1001@ip.server.org</a>&quot;);</div><div>                        t_relay();</div><div>                        exit;</div><div>                }</div>
<div>                #t_on_branch(&quot;2&quot;);</div><div>                #t_on_reply(&quot;2&quot;);</div><div>                #t_on_failure(&quot;1&quot;);</div></div><div><br></div><div><br></div><div dir="ltr"></div>

</div>