[OpenSIPS-Users] how does usrloc work
Mike Claudi Pedersen
mike.pedersen at ipnordic.dk
Tue Apr 8 11:17:33 CEST 2014
for testing purposes i set up route[1] to call 1001 at ip.server.org 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 1001 at ip.server.org
this is my test try, but i cant seem to get any reaction on my conditions?
route[1]
{
# for INVITEs enable some additional helper routes
if (is_method("INVITE"))
{
if (!lookup("location"))
{
xlog("L_INFO","\n\n OK \n\n");
rewriteuri("sip:1001 at ip.server.org");
t_relay();
exit;
}
xlog("L_INFO","\n\n $tU \n\n");
if ($tU=="1002")
{
xlog("L_INFO","\n\n OK \n\n");
rewriteuri("sip:1001 at ip.server.org");
t_relay();
exit;
}
#t_on_branch("2");
#t_on_reply("2");
#t_on_failure("1");
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20140408/5df37f33/attachment.htm>
More information about the Users
mailing list