<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<tt>Hi, Dragomir!<br>
<br>
Can you also print the Contact header ($ct[1]).<br>
<br>
[1] <a class="moz-txt-link-freetext" href="http://www.opensips.org/Documentation/Script-CoreVar-2-4#toc26">http://www.opensips.org/Documentation/Script-CoreVar-2-4#toc26</a><br>
<br>
Best regards,<br>
</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 10/26/2017 10:32 PM, Dragomir
Haralambiev wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CADzurOKmSuJaSTRuY-rz4UspANK6c4dq7nD+QEvwrNaawjCxyQ@mail.gmail.com">
<div dir="ltr">Hi <span
style="font-size:12.8px;white-space:nowrap">Răzvan,</span>
<div><span
style="font-size:12.8px;font-weight:bold;white-space:nowrap"><br>
</span></div>
<div><span style="font-size:12.8px;white-space:nowrap">Here is
script_trace() for REGISTER:</span><br>
<br>
<div><span style="font-size:12.8px;white-space:nowrap">Oct 26
22:14:30 /opensips[17718]: 57995010: REGISTER start trace</span></div>
<div><span style="font-size:12.8px;white-space:nowrap">Oct 26
22:14:30 /opensips[17718]: [Script
Trace][/etc/opensips/opensips.cfg:245][me][module
fix_nated_register] -> (REGISTER from 108.203.232.10,
ruri=sip:Opensips_IP:Opensips_port)</span></div>
<div><span style="font-size:12.8px;white-space:nowrap">Oct 26
22:14:30 /opensips[17718]: [Script
Trace][/etc/opensips/opensips.cfg:246][me][core setbflag]
-> (REGISTER from 108.203.232.10,
ruri=sip:Opensips_IP:Opensips_port)</span></div>
<div><span style="font-size:12.8px;white-space:nowrap">Oct 26
22:14:30 /opensips[17718]: [Script
Trace][/etc/opensips/opensips.cfg:249][me][module
fix_nated_contact] -> (REGISTER from 108.203.232.10,
ruri=sip:Opensips_IP:Opensips_port)</span></div>
<div><span style="font-size:12.8px;white-space:nowrap">Oct 26
22:14:30 /opensips[17718]: [Script
Trace][/etc/opensips/opensips.cfg:260][me][core if] ->
(REGISTER from 108.203.232.10,
ruri=sip:Opensips_IP:Opensips_port)</span></div>
<div><span style="font-size:12.8px;white-space:nowrap">Oct 26
22:14:30 /opensips[17718]: [Script
Trace][/etc/opensips/opensips.cfg:262][me][core if] ->
(REGISTER from 108.203.232.10,
ruri=sip:Opensips_IP:Opensips_port)</span></div>
<div><span style="font-size:12.8px;white-space:nowrap">Oct 26
22:14:30 /opensips[17718]: [Script
Trace][/etc/opensips/opensips.cfg:260][me][module
is_method] -> (REGISTER from 108.203.232.10,
ruri=sip:Opensips_IP:Opensips_port)</span></div>
<div><span style="font-size:12.8px;white-space:nowrap">Oct 26
22:14:30 /opensips[17718]: [Script
Trace][/etc/opensips/opensips.cfg:269][me][core if] ->
(REGISTER from 108.203.232.10,
ruri=sip:Opensips_IP:Opensips_port)</span></div>
<div><span style="font-size:12.8px;white-space:nowrap">Oct 26
22:14:30 /opensips[17718]: [Script
Trace][/etc/opensips/opensips.cfg:265][me][module
is_method] -> (REGISTER from 108.203.232.10,
ruri=sip:Opensips_IP:Opensips_port)</span></div>
<div><span style="font-size:12.8px;white-space:nowrap">Oct 26
22:14:30 /opensips[17718]: [Script
Trace][/etc/opensips/opensips.cfg:276][me][core if] ->
(REGISTER from 108.203.232.10,
ruri=sip:Opensips_IP:Opensips_port)</span></div>
<div><span style="font-size:12.8px;white-space:nowrap">Oct 26
22:14:30 /opensips[17718]: [Script
Trace][/etc/opensips/opensips.cfg:272][me][module
is_method] -> (REGISTER from 108.203.232.10,
ruri=sip:Opensips_IP:Opensips_port)</span></div>
<div><span style="font-size:12.8px;white-space:nowrap">Oct 26
22:14:30 /opensips[17718]: [Script
Trace][/etc/opensips/opensips.cfg:368][me][core if] ->
(REGISTER from 108.203.232.10,
ruri=sip:Opensips_IP:Opensips_port)</span></div>
<div><span style="font-size:12.8px;white-space:nowrap">Oct 26
22:14:30 /opensips[17718]: [Script
Trace][/etc/opensips/opensips.cfg:279][me][module
is_method] -> (REGISTER from 108.203.232.10,
ruri=sip:Opensips_IP:Opensips_port)</span></div>
<div><span style="font-size:12.8px;white-space:nowrap">Oct 26
22:14:30 /opensips[17718]: [Script
Trace][/etc/opensips/opensips.cfg:289][me][core if] ->
(REGISTER from 108.203.232.10,
ruri=sip:Opensips_IP:Opensips_port)</span></div>
<div><span style="font-size:12.8px;white-space:nowrap">Oct 26
22:14:30 /opensips[17718]: [Script
Trace][/etc/opensips/opensips.cfg:363][me][core if] ->
(REGISTER from 108.203.232.10,
ruri=sip:Opensips_IP:Opensips_port)</span></div>
<div><span style="font-size:12.8px;white-space:nowrap">Oct 26
22:14:30 /opensips[17718]: [Script
Trace][/etc/opensips/opensips.cfg:289][me][core isflagset]
-> (REGISTER from 108.203.232.10,
ruri=sip:Opensips_IP:Opensips_port)</span></div>
<div><span style="font-size:12.8px;white-space:nowrap">Oct 26
22:14:30 /opensips[17718]: [Script
Trace][/etc/opensips/opensips.cfg:329][me][assign equal]
-> (REGISTER from 108.203.232.10,
ruri=sip:Opensips_IP:Opensips_port)</span></div>
<div><span style="font-size:12.8px;white-space:nowrap">Oct 26
22:14:30 /opensips[17718]: [Script
Trace][/etc/opensips/opensips.cfg:331][me][core xlog]
-> (REGISTER from 108.203.232.10,
ruri=sip:Opensips_IP:Opensips_port)</span></div>
<div><span style="font-size:12.8px;white-space:nowrap">Oct 26
22:14:30 /opensips[17718]: 57995010: Expires=360</span></div>
<div><span style="font-size:12.8px;white-space:nowrap">Oct 26
22:14:30 /opensips[17718]: [Script
Trace][/etc/opensips/opensips.cfg:346][me][core if] ->
(REGISTER from 108.203.232.10,
ruri=sip:Opensips_IP:Opensips_port)</span></div>
<div><span style="font-size:12.8px;white-space:nowrap">Oct 26
22:14:30 /opensips[17718]: [Script
Trace][/etc/opensips/opensips.cfg:353][me][core if] ->
(REGISTER from 108.203.232.10,
ruri=sip:Opensips_IP:Opensips_port)</span></div>
<div><span style="font-size:12.8px;white-space:nowrap">Oct 26
22:14:30 /opensips[17718]: [Script
Trace][/etc/opensips/opensips.cfg:346][me][module
is_registered] -> (REGISTER from 108.203.232.10,
ruri=sip:Opensips_IP:Opensips_port)</span></div>
<div><span style="font-size:12.8px;white-space:nowrap">Oct 26
22:14:30 /opensips[17718]: [Script
Trace][/etc/opensips/opensips.cfg:351][me][core if] ->
(REGISTER from 108.203.232.10,
ruri=sip:Opensips_IP:Opensips_port)</span></div>
<div><span style="font-size:12.8px;white-space:nowrap">Oct 26
22:14:30 /opensips[17718]: [Script
Trace][/etc/opensips/opensips.cfg:347][me][module remove]
-> (REGISTER from 108.203.232.10,
ruri=sip:Opensips_IP:Opensips_port)</span></div>
<div><span style="font-size:12.8px;white-space:nowrap">Oct 26
22:14:30 /opensips[17718]: [Script
Trace][/etc/opensips/opensips.cfg:348][me][core xlog]
-> (REGISTER from 108.203.232.10,
ruri=sip:Opensips_IP:Opensips_port)</span></div>
<div><span style="font-size:12.8px;white-space:nowrap">Oct 26
22:14:30 /opensips[17718]: 57995010: Remove old
registation (sip:57995010@Opensips_IP:Opensips_port)</span></div>
<div><span style="font-size:12.8px;white-space:nowrap">Oct 26
22:14:30 /opensips[17718]: [Script
Trace][/etc/opensips/opensips.cfg:353][me][assign equal]
-> (REGISTER from 108.203.232.10,
ruri=sip:Opensips_IP:Opensips_port)</span></div>
<div><span style="font-size:12.8px;white-space:nowrap">Oct 26
22:14:30 /opensips[17718]: [Script
Trace][/etc/opensips/opensips.cfg:355][me][assign equal]
-> (REGISTER from 108.203.232.10,
ruri=sip:Opensips_IP:Opensips_port)</span></div>
<div><span style="font-size:12.8px;white-space:nowrap">Oct 26
22:14:30 /opensips[17718]: [Script
Trace][(null):0][me][core set_host] -> (REGISTER from
108.203.232.10, ruri=sip:Opensips_IP:Opensips_port)</span></div>
<div><span style="font-size:12.8px;white-space:nowrap">Oct 26
22:14:30 /opensips[17718]: [Script
Trace][/etc/opensips/opensips.cfg:356][me][assign equal]
-> (REGISTER from 108.203.232.10,
ruri=sip:Registrar_IP:Opensips_port)</span></div>
<div><span style="font-size:12.8px;white-space:nowrap">Oct 26
22:14:30 /opensips[17718]: [Script
Trace][(null):0][me][core set_port] -> (REGISTER from
108.203.232.10, ruri=sip:Registrar_IP:Opensips_port)</span></div>
<div><span style="font-size:12.8px;white-space:nowrap">Oct 26
22:14:30 /opensips[17718]: [Script
Trace][/etc/opensips/opensips.cfg:357][me][assign equal]
-> (REGISTER from 108.203.232.10,
ruri=sip:Registrar_IP:Registrar_Port)</span></div>
<div><span style="font-size:12.8px;white-space:nowrap">Oct 26
22:14:30 /opensips[17718]: [Script
Trace][/etc/opensips/opensips.cfg:358][me][assign equal]
-> (REGISTER from 108.203.232.10,
ruri=sip:Registrar_IP:Registrar_Port)</span></div>
<div><span style="font-size:12.8px;white-space:nowrap">Oct 26
22:14:30 /opensips[17718]: [Script
Trace][/etc/opensips/opensips.cfg:359][me][core xlog]
-> (REGISTER from 108.203.232.10,
ruri=sip:Registrar_IP:Registrar_Port)</span></div>
<div><span style="font-size:12.8px;white-space:nowrap">Oct 26
22:14:30 /opensips[17718]: 57995010: Forward REGISTER to
REGISTRAR: Registrar_IP:Registrar_Port</span></div>
<div><span style="font-size:12.8px;white-space:nowrap">Oct 26
22:14:30 /opensips[17718]: [Script
Trace][/etc/opensips/opensips.cfg:360][me][module
t_on_reply] -> (REGISTER from 108.203.232.10,
ruri=sip:Registrar_IP:Registrar_Port)</span></div>
<div><span style="font-size:12.8px;white-space:nowrap">Oct 26
22:14:30 /opensips[17718]: [Script
Trace][/etc/opensips/opensips.cfg:361][me][module t_relay]
-> (REGISTER from 108.203.232.10,
ruri=sip:Registrar_IP:Registrar_Port)</span></div>
<div><span style="font-size:12.8px;white-space:nowrap">Oct 26
22:14:30 /opensips[17718]: [Script
Trace][/etc/opensips/opensips.cfg:362][me][core exit]
-> (REGISTER from 108.203.232.10,
ruri=sip:Registrar_IP:Registrar_Port)</span></div>
<div><span style="font-size:12.8px;white-space:nowrap">Oct 26
22:14:30 /opensips[17715]: 57995010: Onreplay register
From REGISTRAR - Trying (100)</span></div>
<div><span style="font-size:12.8px;white-space:nowrap">Oct 26
22:14:30 /opensips[17718]: 57995010: Onreplay register
From REGISTRAR - REGISTERED (200 OK)</span></div>
<div><span style="font-size:12.8px;white-space:nowrap">Oct 26
22:14:30 /opensips[17718]: 57995010: REGISTERED. Save in
location.</span></div>
<div style="font-size:12.8px;white-space:nowrap"><br>
</div>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">2017-10-26 10:36 GMT+03:00 Răzvan
Crainea <span dir="ltr"><<a
href="mailto:razvan@opensips.org" target="_blank"
moz-do-not-send="true">razvan@opensips.org</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF"> <tt>Hi, Dragomir!<br>
<br>
Again, I really doubt fix_nated_register() is executed ,
since I am not seeing the Received: part in the "ul
show" output.<br>
Can you post the output of the script_trace() function
for that REGISTER message? You can find here[1] a
tutorial on how to use this function.<br>
<br>
[1] <a
class="m_3674191391486332738moz-txt-link-freetext"
href="https://blog.opensips.org/2017/09/20/troubleshooting-opensips-script/"
target="_blank" moz-do-not-send="true">https://blog.opensips.org/<wbr>2017/09/20/troubleshooting-<wbr>opensips-script/</a><br>
<br>
Best regards,<br>
</tt><span class="">
<pre class="m_3674191391486332738moz-signature" cols="72">Răzvan Crainea
OpenSIPS Developer
<a class="m_3674191391486332738moz-txt-link-abbreviated" href="http://www.opensips-solutions.com" target="_blank" moz-do-not-send="true">www.opensips-solutions.com</a></pre>
</span>
<div>
<div class="h5">
<div class="m_3674191391486332738moz-cite-prefix">On
10/24/2017 12:41 AM, Dragomir Haralambiev wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hi,
<div><br>
</div>
<div>I made setup like this help:<br>
<br>
<a
href="https://blog.opensips.org/2016/12/13/how-to-proxy-sip-registrations/"
target="_blank" moz-do-not-send="true">https://blog.opensips.org/<wbr>2016/12/13/how-to-proxy-sip-<wbr>registrations/</a></div>
<div><br>
</div>
<div><br>
<font face="monospace"><span
style="font-size:10.4px">fix_nated_register()
is executed.</span></font></div>
<div><span
style="font-family:monospace;font-size:10.4px"><br>
</span></div>
<div><font face="arial, helvetica, sans-serif">If
you like I can send my full script in privet
email.</font></div>
<div><font face="arial, helvetica, sans-serif"><br>
</font></div>
<div><font face="arial, helvetica, sans-serif">Best
regards,</font></div>
<div><font face="arial, helvetica, sans-serif">Dragomir </font></div>
<div><font face="monospace"><span
style="font-size:10.4px"><br>
</span></font></div>
<div><font face="monospace"><span
style="font-size:10.4px"><br>
</span></font><br>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">2017-10-23 10:55
GMT+03:00 Răzvan Crainea <span dir="ltr"><<a
href="mailto:razvan@opensips.org"
target="_blank" moz-do-not-send="true">razvan@opensips.org</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0
0 0 .8ex;border-left:1px #ccc
solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF"> <tt>Hi,
Dragomir!<br>
<br>
Are you sure the code gets to that save()
function? You are also using
fix_nated_register(), but I don't see any
register field in the location table
either, so I presume you are not hitting
that code at all.<br>
<br>
Best regards,<br>
</tt>
<pre class="m_3674191391486332738m_-6273127769234668906moz-signature" cols="72">Răzvan Crainea
OpenSIPS Developer
<a class="m_3674191391486332738m_-6273127769234668906moz-txt-link-abbreviated" href="http://www.opensips-solutions.com" target="_blank" moz-do-not-send="true">www.opensips-solutions.com</a></pre>
<div>
<div class="m_3674191391486332738h5">
<div
class="m_3674191391486332738m_-6273127769234668906moz-cite-prefix">On
10/21/2017 01:40 AM, Dragomir
Haralambiev wrote:<br>
</div>
</div>
</div>
<blockquote type="cite">
<div>
<div class="m_3674191391486332738h5">
<div dir="ltr">
<div>Hello,<br>
<br>
<br>
</div>
<div>I have follow line in my
script:</div>
<div><span style="white-space:pre-wrap"> </span>if
(is_method("REGISTER")) {</div>
<div><span style="white-space:pre-wrap"> </span>fix_nated_register();</div>
<div><span style="white-space:pre-wrap"> </span>fix_nated_contact();</div>
<div><span style="white-space:pre-wrap"> </span>....</div>
<div><span style="white-space:pre-wrap"> </span>save("location","c1",
"$fu");</div>
<div><span style="white-space:pre-wrap"> </span>}</div>
<div><span style="white-space:pre-wrap"> </span></div>
<div>Opensips receive REGISTER with</div>
<div><br>
</div>
<div>"Contact: <<a
href="http://sip:516203@192.168.2.203:5060"
target="_blank"
moz-do-not-send="true">sip:516203@192.168.2.203:5060</a><wbr>>"</div>
<div><br>
</div>
<div><br>
</div>
<div>I try to see location table</div>
<div>opensipsctl ul show</div>
<div><br>
</div>
<div> AOR:: 516203</div>
<div> Contact:: <a
href="http://sip:516203@192.168.2.203:5060"
target="_blank"
moz-do-not-send="true">sip:516203@192.168.2.203:5060</a>
Q=</div>
<div>
ContactID:: 926418920300655256</div>
<div>
Expires:: 270</div>
<div>
Callid:: <a
href="mailto:509678716@192.168.2.203"
target="_blank"
moz-do-not-send="true">509678716@192.168.2.203</a></div>
<div> Cseq::
2</div>
<div>
User-agent:: Yealink SIP-T19P
31.72.0.75</div>
<div> State::
CS_SYNC</div>
<div> Flags::
0</div>
<div>
Cflags:: NAT_BFLAG</div>
<div>
Socket:: udp:<a
href="http://1.2.3.4:5566"
target="_blank"
moz-do-not-send="true">1.2.3.4:5566</a></div>
<div>
Methods:: 16383</div>
<div><br>
</div>
<div>Why after save("location")
Contact address in location table
is not fix?</div>
<div>How setup Opensips to write
into location table fixed Contact?<br>
<br>
Best regards,<br>
Dragomir</div>
</div>
<br>
<fieldset
class="m_3674191391486332738m_-6273127769234668906mimeAttachmentHeader"></fieldset>
<br>
</div>
</div>
<pre>______________________________<wbr>_________________
Users mailing list
<a class="m_3674191391486332738m_-6273127769234668906moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org" target="_blank" moz-do-not-send="true">Users@lists.opensips.org</a>
<a class="m_3674191391486332738m_-6273127769234668906moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank" moz-do-not-send="true">http://lists.opensips.org/cgi-<wbr>bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</div>
<br>
______________________________<wbr>_________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org"
target="_blank" moz-do-not-send="true">Users@lists.opensips.org</a><br>
<a
href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
rel="noreferrer" target="_blank"
moz-do-not-send="true">http://lists.opensips.org/cgi-<wbr>bin/mailman/listinfo/users</a><br>
<br>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset
class="m_3674191391486332738mimeAttachmentHeader"></fieldset>
<br>
<pre>______________________________<wbr>_________________
Users mailing list
<a class="m_3674191391486332738moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org" target="_blank" moz-do-not-send="true">Users@lists.opensips.org</a>
<a class="m_3674191391486332738moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank" moz-do-not-send="true">http://lists.opensips.org/cgi-<wbr>bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</div>
</div>
</div>
<br>
______________________________<wbr>_________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org"
moz-do-not-send="true">Users@lists.opensips.org</a><br>
<a
href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
rel="noreferrer" target="_blank" moz-do-not-send="true">http://lists.opensips.org/cgi-<wbr>bin/mailman/listinfo/users</a><br>
<br>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>