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
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to