[OpenSIPS-Users] set_advertised_address suspected bug 1.9
Newlin, Ben
Ben.Newlin at inin.com
Tue Mar 31 15:23:39 CEST 2015
Yes, topology_hiding(). I am actually doing exactly what you have described wanting to do. I am using set_advertised_address() in request route and then in onreply_route to change the address in each direction. When topology_hiding() is being used, the module is already going to replace the IP addresses in all the headers in onreply_route and it will allow set_advertised_address() to change the address that it will use to do that.
The relevant portion of my config looks something like below. I am using AVPs for the addresses which are populated from data elsewhere in the script. I am checking the source address ($si) of the initial request to determine which direction the request is going and set up the AVPs accordingly.
route
{
.
.
.
topology_hiding("U");
uac_replace_from("sip:$fU@$avp(inbound_ip)");
t_on_branch("route_branch");
t_on_reply("route_reply");
set_advertised_address("$avp(inbound_ip)");
set_advertised_port("$avp(inbound_port)");
route(relay);
}
branch_route[route_branch]
{
uac_replace_to("", "$ru");
}
onreply_route[route_reply]
{
# Have to load the transaction to get the AVPs but
# t_check_trans() can't be used in reply route.
t_check_status(".*");
set_advertised_address("$avp(outbound_ip)");
set_advertised_port("$avp(outbound_port)");
}
Ben Newlin
From: users-bounces at lists.opensips.org [mailto:users-bounces at lists.opensips.org] On Behalf Of Terrance Devor
Sent: Tuesday, March 31, 2015 8:58 AM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] set_advertised_address suspected bug 1.9
Hello Ben!
I really appreciate this. I am assuming you are talking about topology_hiding()? Furthermore,
what is the best place to have the command and signal internal devices with internal ips and
external devices with external ips. We are trying to have the change applied branch and reply
signalling (ie, INVITE, Session Progress, ACK and 200OKs). Finally do you use an if
statement of some sort (ie if($si==.......)) to determine if the next signal would be internal vs
external?
Thanks in Advance,
Terrance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20150331/f6da11dc/attachment-0001.htm>
More information about the Users
mailing list