Hi Rodrigo,

The set_advertised_address() is not changing anything by itself, but setting (as the name says) what should be the IP when comes to advertising OpenSIPS in new headers like VIA or Record-Route - once again, when building and inserting such headers. This happens for requests, not for replies.

So, I do not understand your case with calling the function for a 200 OK :( .Do you have a trace at opensips level ?

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 03.08.2016 17:55, Rodrigo Pimenta Carvalho wrote:


Hi.

The function set_advertised_address() is changing the wrong IP in record-routs from the SIP OK message. I need to avoid this issue. The caller is in a remote network and the callee is in the local network.


What is my situation:
----------------------------
An UAS (the callee), running in the same hardware as OpenSIPS, is registered with IP 127.0.0.1. It could be 192.168.0.100 too. However, due to some specifics requirements of our project, such UAS must register itself using IP 127.0.0.1, not 192.168.0.100.


What is the problem:
---------------------------
When set_advertised_address("domain") is called, for the SIP OK message, this function decides to change 127.0.0.1 to "domain".
For example, OpenSIPS receives:

SIP/2.0 200 OK
Via: SIP/2.0/TCP XXX.YYY.240.204:61871;rport=61871;received=131.221.240.204;branch=z9hG4bKPj8bd4d5988f4a4a0ba3599eba77f42600;alias
Record-Route: <sip:127.0.0.1;transport=tcp;lr;r2=on;did=862.47466066>
Record-Route: <sip:192.168.0.100;transport=tcp;lr;r2=on;did=862.47466066>

and change it to:

SIP/2.0 200 OK
Via: SIP/2.0/TCP XXX.YYY.240.204:61871;rport=61871;received=131.221.240.204;branch=z9hG4bKPj8bd4d5988f4a4a0ba3599eba77f42600;alias
Record-Route: <sip:domain;transport=tcp;lr;r2=on;did=862.47466066>
Record-Route: <sip:192.168.0.100;transport=tcp;lr;r2=on;did=862.47466066>

But, OpenSIPS should change the IP 192.168.0.100 to "domain", not the other Record-Route. As I have this issue, the UAC can't send the SIP ACK confirming the SIP OK.


What I need to provide:
--------------------------------
I have to get/build a solution to make the set_advertised_address("domain") change the Record-Route that contains the IP 1921.168.0.100.

Maybe, the OpenSIPS always change the top most Record-Route. If it is true, I need a workaround for it.

So, how can I fix the record-routs as I need? Does it make sense to do what I'm needing?
Any hint will be very helpful!
Best regards.


RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979


_______________________________________________
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