<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p></p>
<div><br>
<br>
Hi.<br>
<br>
The function set_advertised_address() is changing the wrong IP in record-routs from the SIP OK message.<br>
I need to avoid this issue. The caller is in a remote network and the callee is in the local network.<br>
<br>
<br>
What is my situation:<br>
----------------------------<br>
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.<br>
<br>
<br>
What is the problem:<br>
---------------------------<br>
When set_advertised_address("domain") is called, for the SIP OK message, this function decides to change 127.0.0.1 to "domain".<br>
For example, OpenSIPS receives:<br>
<br>
<div><span style="color: rgb(0, 111, 201);">SIP/2.0 200 OK</span><br>
<span style="color: rgb(0, 111, 201);">Via: SIP/2.0/TCP XXX.YYY.240.204:61871;rport=61871;received=131.221.240.204;branch=z9hG4bKPj8bd4d5988f4a4a0ba3599eba77f42600;alias</span><br>
<span style="color: rgb(0, 111, 201);">Record-Route: <sip:<span style="color: rgb(255, 0, 0);">127.0.0.1</span>;transport=tcp;lr;r2=on;did=862.47466066></span><br>
<span style="color: rgb(0, 111, 201);">Record-Route: <sip:192.168.0.100;transport=tcp;lr;r2=on;did=862.47466066></span><br>
<br>
and change it to:<br>
<br>
<span style="color: rgb(0, 111, 201);">SIP/2.0 200 OK</span><br>
<span style="color: rgb(0, 111, 201);">Via: SIP/2.0/TCP XXX.YYY.240.204:61871;rport=61871;received=131.221.240.204;branch=z9hG4bKPj8bd4d5988f4a4a0ba3599eba77f42600;alias</span><br>
<span style="color: rgb(0, 111, 201);">Record-Route: <sip:<span style="color: rgb(255, 0, 0);">domain</span>;transport=tcp;lr;r2=on;did=862.47466066></span><br>
<span style="color: rgb(0, 111, 201);">Record-Route: <sip:192.168.0.100;transport=tcp;lr;r2=on;did=862.47466066></span><br>
</div>
<br>
But, OpenSIPS should change the IP 192.168.0.100 to "domain", not the other Record-Route.<br>
As I have this issue, the UAC can't send the SIP ACK confirming the SIP OK.<br>
<br>
<br>
What I need to provide:<br>
--------------------------------<br>
I have to get/build a solution to make the <span>set_advertised_address("domain")</span> change the Record-Route that contains the IP 1921.168.0.100.<br>
<br>
Maybe, the OpenSIPS always change the top most Record-Route. If it is true, I need a workaround for it.<br>
<br>
So, how can I fix the record-routs as I need? Does it make sense to do what I'm needing?<br>
Any hint will be very helpful!<br>
Best regards.<br>
</div>
<br>
<p></p>
<p><br>
</p>
<div id="Signature">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div class="BodyFragment"><font size="2">
<div class="PlainText">RODRIGO PIMENTA CARVALHO<br>
Inatel Competence Center<br>
Software<br>
Ph: +55 35 3471 9200 RAMAL 979<br>
</div>
</font></div>
</div>
</div>
</div>
</body>
</html>