Sometimes it's better to just try it out ;o)
It works, btw. I only forgot a "strip(3)" in the branch-route of the
pseudo-code below to strip the "out"-prefix.
Andreas
Andreas Granig wrote:
Hi,
Is it possible to set the dst-uri in a branch-route (in openser 1.1)? It
would be useful if you could for example do least-cost-routing with lcr,
where some of the gateways need an extra hop via an outbound-proxy,
which could be marked with a prefix in the gw-table, like:
route[1]
{
# let's assume uri = 'sip:12345@something'
load_gws();
next_gw();
# lcr module selects a gw according to lcr patterns, and some of
# them needs an outbound-proxy, which are marked by prefix 'out'
t_on_failure("1");
t_on_branch("1");
# do something else and t_relay()
}
failure_route[1]
{
if( /* error code which triggers failover */ )
{
if(next_gw())
{
t_on_branch("1");
t_on_failure("1");
t_relay();
}
else { /* error */ }
}
}
branch_route[1]
{
# check if it's marked for using an outbound proxy:
if(uri =~ "^sip:out[0-9]+@")
setdsturi("sip:my.outbound.ip:5060");
}
Would this work? Comments?
Regards,
Andreas
This e-mail is confidential and may well also be legally privileged. If
you have received it in error, you are on notice of its status. Please
notify us immediately by reply e-mail and then delete this message from
your system. Please do not copy it or use it for any purposes, or
disclose its contents to any other person: to do so could be a breach of
confidence. Thank you for your cooperation.
Information pursuant to paragraph 14 Austrian Companies Code: UPC
Austria GmbH; Registered Office: Wolfganggasse 58-60, 1120 Vienna
Company Register Number: FN 189858d at the Commercial Court of Vienna
_______________________________________________
Users mailing list
Users(a)openser.org
http://openser.org/cgi-bin/mailman/listinfo/users
This e-mail is confidential and may well also be legally privileged. If you have received
it in error, you are on notice of its status. Please notify us immediately by reply e-mail
and then delete this message from your system. Please do not copy it or use it for any
purposes, or disclose its contents to any other person: to do so could be a breach of
confidence. Thank you for your cooperation.
Information pursuant to paragraph 14 Austrian Companies Code: UPC Austria GmbH; Registered
Office: Wolfganggasse 58-60, 1120 Vienna Company Register Number: FN 189858d at the
Commercial Court of Vienna