<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<tt>Unfortunately I just realised that you cannot change the Contact
header for this scenario.<br>
And to be honest I don't really understand why you are trying to
change it - if you need the real IP and port, you can take them
from the received field.<br>
<br>
Best regards,</tt>
<pre class="moz-signature" cols="72">Răzvan Crainea
OpenSIPS Developer
<a class="moz-txt-link-abbreviated" href="http://www.opensips-solutions.com">www.opensips-solutions.com</a></pre>
<div class="moz-cite-prefix">On 11/02/2017 11:43 PM, Dragomir
Haralambiev wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CADzurO+VdVKKUWJwvCCWkP72=ASJ1=AmrTLtL87Z0pFQi_os9w@mail.gmail.com">
<div dir="ltr">Hi,
<div><br>
</div>
<div>Here is part of my script:<br>
....</div>
<div>modparam("registrar", "mcontact_avp", "$avp(register)")</div>
<div>.....<br>
<br>
if (t_check_status("2[0-9][0-9]")) {<br>
<div><span style="white-space:pre"> </span>$log_level = 5;</div>
<div><span style="white-space:pre"> </span>script_trace( 1,
"$rm from $si, ruri=$ru, ct=$ct.fields(uri)
avp(register)=$avp(register)", "me");</div>
<div><span style="white-space:pre"> </span>route(save_location);</div>
<div> ....... </div>
<div> }</div>
<div><br>
You can see log here:<br>
</div>
</div>
<div><a href="https://pastebin.com/WWQ9Mmh4"
moz-do-not-send="true">https://pastebin.com/WWQ9Mmh4</a><br>
<br>
Here is the replacement contact:<br>
<br>
<div>DBG:registrar:build_contact: created Contact HF: Contact:
<<a href="http://sip:55595009@192.168.22.138:5062"
moz-do-not-send="true">sip:55595009@192.168.22.138:5062</a>>;expires=360</div>
<div>DBG:registrar:save: replacing contact uri [<a
href="http://sip:55595009@188.23.232.10:1043"
moz-do-not-send="true">sip:55595009@188.23.232.10:1043</a>]
with [<a href="http://sip:55595009@192.168.22.138:5062"
moz-do-not-send="true">sip:55595009@192.168.22.138:5062</a>]<br>
<br>
How to stop replacing contact from <a
href="http://188.23.232.10:1043" moz-do-not-send="true">188.23.232.10:1043</a>
to <a href="http://192.168.22.138:5062"
moz-do-not-send="true">192.168.22.138:5062</a> ?</div>
</div>
</div>
</blockquote>
</body>
</html>