[OpenSIPS-Users] set_advertised_address suspected bug 1.9
Răzvan Crainea
razvan at opensips.org
Fri Mar 27 09:25:56 CET 2015
Hi, Terrance!
The routing logic (determinig the IPs and ports) have to be decided in
the request route. The routing information in replies should be passed
by OpenSIPS unchanged to the UAS, you _should not_ change the routing
information in replies.
If your message is comming from the internet, then it should have
already arrived on the interface which as hassinged an advertised
address. If you want to pass it to a private network, just use
force_send_socket() to the private network. Let's take an example: if I
have the following interfaces:
listen=udp:10.0.0.1:5060 as 1.1.1.1 # used for public network
listen=udp:10.0.0.2:5060 # used forprivate network
The client sends the invite to OpenSIPS via public network, so it will
get in OpenSIPS via 10.0.0.1. In request route I would do:
route {
...
if ($Ri == "10.0.0.1")
force_send_socket(udp:10.0.0.2:5060);
...
}
This request will go to UAS with two Record Routes:
udp:10.0.0.2:5060
udp:1.1.1.1:5060
Therefore, the reply will have the proper information in the Record
Route header.
I hope it is clear now.
Best regards,
Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com
On 03/26/2015 04:12 PM, Terrance Devor wrote:
> I hope it's ok to re-phrase my question in this same email. Where is
> the best place to change
> the ip address using set_advertised_address for 200OK being sent out
> by OpenSIPS to the
> UAS.
>
> T.
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20150327/ca698037/attachment.htm>
More information about the Users
mailing list