<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("INVITE"))</div><div> {</div><div> if (!lookup("location"))</div><div> {</div><div> xlog("L_INFO","\n\n OK \n\n");</div>
<div> rewriteuri("<a href="mailto:sip%3A1001@ip.server.org">sip:1001@ip.server.org</a>");</div><div> t_relay();</div><div> exit;</div><div> }</div>
<div> xlog("L_INFO","\n\n $tU \n\n");</div><div> if ($tU=="1002")</div><div> {</div><div> xlog("L_INFO","\n\n OK \n\n");</div>
<div> rewriteuri("<a href="mailto:sip%3A1001@ip.server.org">sip:1001@ip.server.org</a>");</div><div> t_relay();</div><div> exit;</div><div> }</div>
<div> #t_on_branch("2");</div><div> #t_on_reply("2");</div><div> #t_on_failure("1");</div></div><div><br></div><div><br></div><div dir="ltr"></div>
</div>