<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p><tt>Hi volga,</tt></p>
<p><tt>Well, it looks like your "insertion_mode" is set to 0, not 1,
hence the Contact gets rewritten.<br>
</tt></p>
<p><tt>PS: Your other report (regarding "regid" in mirror mode) is
definitely valid, and I'll push a fix for it today.</tt></p>
<p><tt>Regards,</tt><br>
</p>
<pre class="moz-signature" cols="72">Liviu Chircu
OpenSIPS Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a>
OpenSIPS Summit May 2017 Amsterdam
<a class="moz-txt-link-freetext" href="http://www.opensips.org/events/Summit-2017Amsterdam.html">http://www.opensips.org/events/Summit-2017Amsterdam.html</a></pre>
<div class="moz-cite-prefix">On 27.04.2017 05:23,
<a class="moz-txt-link-abbreviated" href="mailto:volga629@networklab.ca">volga629@networklab.ca</a> wrote:<br>
</div>
<blockquote cite="mid:1493259790.4220.9@smtp.networklab.ca"
type="cite">Hello Liviu,
<div>Is contact header should be replaced with insert mode 1 ?</div>
<div>Configuration like this </div>
<div><br>
</div>
<div><br>
</div>
<div>#### REGISTRAR module</div>
<div>loadmodule "mid_registrar.so"</div>
<div>modparam("mid_registrar", "mode", 1)</div>
<div>modparam("mid_registrar", "insertion_mode", 0)</div>
<div>modparam("mid_registrar", "received_avp", "$avp(rcv)")</div>
<div>modparam("mid_registrar", "max_contacts", 4)</div>
<div>modparam("mid_registrar", "tcp_persistent_flag", 10)</div>
<div>modparam("mid_registrar", "outgoing_expires", 900)</div>
<div>modparam("mid_registrar", "contact_match_param", "regid")</div>
<div><br>
</div>
<div>Because I see Contact get rewritten complete with opensips
local ip and and port. Only parameters like transport are
preserved which break rest routing.</div>
<div><br>
</div>
<div>=================================================================================================</div>
<div>Call-ID:
141351_rel51MTBiMTgzN2NmYjBhZmFkMzAzNTNjNDI4Yzk3YThmYmU</div>
<div>User: <a class="moz-txt-link-abbreviated" href="mailto:4310@sip.company.tld">4310@sip.company.tld</a></div>
<div>Contact: "volga629"
<a class="moz-txt-link-rfc2396E" href="mailto:sip:4310@10.18.130.27:5060;rinstance=b236f661867df3aa;transport=tcp;regid=c2lwOjQzMTBAOTkuMjQ1LjE3Ni4xOTY6MzczMzU7cmluc3RhbmNlPWIyMzZmNjYxODY3ZGYzYWE7dHJhbnNwb3J0PXRjcA--;fs_path=sip%3A4310%4010.18.130.27%3A5060%3Btransport%3Dudp"><sip:4310@10.18.130.27:5060;rinstance=b236f661867df3aa;transport=tcp;regid=c2lwOjQzMTBAOTkuMjQ1LjE3Ni4xOTY6MzczMzU7cmluc3RhbmNlPWIyMzZmNjYxODY3ZGYzYWE7dHJhbnNwb3J0PXRjcA--;fs_path=sip%3A4310%4010.18.130.27%3A5060%3Btransport%3Dudp></a></div>
<div>Agent: Bria Android 3.9.2 build 96033</div>
<div>Status: Registered(TCP)(unknown) EXP(2017-04-26 22:31:32)
EXPSECS(592)</div>
<div>Ping-Status: Reachable</div>
<div>Ping-Time: 0.00</div>
<div>Host: prod.com</div>
<div>IP: 10.18.130.27</div>
<div>Port: 5060</div>
<div>Auth-User: unknown</div>
<div>Auth-Realm: sip.company.tld</div>
<div>MWI-Account: <a class="moz-txt-link-abbreviated" href="mailto:4310@sip.company.tld">4310@sip.company.tld</a></div>
<div><br>
</div>
<div> </div>
<div><br>
</div>
<div>volga629</div>
<div><br>
</div>
<div><br>
On Thu, 6 Apr, 2017 at 10:56 AM, <a class="moz-txt-link-abbreviated" href="mailto:volga629@networklab.ca">volga629@networklab.ca</a> wrote:<br>
<blockquote type="cite">
<blockquote type="cite">Hello Liviu,</blockquote>
Are planning open github issue about it ?
<div><br>
</div>
<div>volga629<br>
<br>
On Tue, 4 Apr, 2017 at 12:32 PM, <a class="moz-txt-link-abbreviated" href="mailto:volga629@networklab.ca">volga629@networklab.ca</a>
wrote:<br>
<blockquote type="cite">Hello Liviu,
<div>Here are mod params</div>
<div><br>
</div>
<div>#### REGISTRAR module</div>
<div>loadmodule "mid_registrar.so"</div>
<div>modparam("mid_registrar", "mode", 1)</div>
<div>modparam("mid_registrar", "insertion_mode", 0)</div>
<div>modparam("mid_registrar", "received_avp",
"$avp(rcv)")</div>
<div>modparam("mid_registrar", "max_contacts", 4)</div>
<div>modparam("mid_registrar", "tcp_persistent_flag", 10)</div>
<div>modparam("mid_registrar", "contact_match_param",
"regid")</div>
<div><br>
</div>
<div>volga629<br>
<br>
On Tue, 4 Apr, 2017 at 12:25 PM, Liviu Chircu
<a class="moz-txt-link-rfc2396E" href="mailto:liviu@opensips.org"><liviu@opensips.org></a> wrote:<br>
<blockquote type="cite">
<meta content="text/html; charset=utf-8"
http-equiv="Content-Type">
<p><tt>Speaking of help, could you also dump all your
mid_registrar modparams? This should speed up
debugging a bit.</tt><br>
</p>
<pre class="moz-signature" cols="72">Liviu Chircu
OpenSIPS Developer
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a>
OpenSIPS Summit May 2017 Amsterdam
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.opensips.org/events/Summit-2017Amsterdam.html">http://www.opensips.org/events/Summit-2017Amsterdam.html</a></pre>
<div class="moz-cite-prefix">On 04.04.2017 18:22, <a
moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:volga629@networklab.ca">volga629@networklab.ca</a>
wrote:<br>
</div>
<blockquote
cite="mid:1491319353.3728.4@smtp.networklab.ca"
type="cite">Hello Liviu,
<div>Thank you for all help.<br>
<br>
On Tue, 4 Apr, 2017 at 12:05 PM, Liviu Chircu <a
moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="mailto:liviu@opensips.org"><liviu@opensips.org></a>
wrote:<br>
<blockquote type="cite">
<meta content="text/html; charset=utf-8"
http-equiv="Content-Type">
<p><tt>Ok, so it looks like there is a bug with
Contact expirations, with some chunk of
memory being freed twice. I will reply as
soon as I have more info.</tt><br>
</p>
<pre class="moz-signature" cols="72">Liviu Chircu
OpenSIPS Developer
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a>
OpenSIPS Summit May 2017 Amsterdam
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.opensips.org/events/Summit-2017Amsterdam.html">http://www.opensips.org/events/Summit-2017Amsterdam.html</a></pre>
<div class="moz-cite-prefix">On 04.04.2017
17:40, <a moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:volga629@networklab.ca">volga629@networklab.ca</a>
wrote:<br>
</div>
<blockquote
cite="mid:1491316822.3728.2@smtp.networklab.ca"
type="cite">Hello Liviu,
<div><br>
</div>
<div>I modified script and I see regid, but
module crash again</div>
<div><br>
</div>
<div>Apr 4 10:35:57 casbc00 audit: ANOM_ABEND
auid=4294967295 uid=992 gid=992
ses=4294967295 pid=3154 comm="opensips"
exe="/usr/sbin/opensips" sig=11</div>
<div>Apr 4 10:35:57 casbc00 kernel:
opensips[3154]: segfault at 98 ip
0000556b953bcdb0 sp 00007ffe5dc47e40 error 4
in opensips[556b9538b000+219000]</div>
<div>Apr 4 10:35:57 casbc00 abrt-hook-ccpp:
Process 3154 (opensips) of user 992 killed
by SIGSEGV - dumping core</div>
<div>Apr 4 10:35:57 casbc00 audit: ANOM_ABEND
auid=4294967295 uid=992 gid=992
ses=4294967295 pid=3149 comm="opensips"
exe="/usr/sbin/opensips" sig=11</div>
<div>Apr 4 10:35:57 casbc00 kernel:
opensips[3149]: segfault at 98 ip
0000556b953bcdb0 sp 00007ffe5dc47e70 error 4
in opensips[556b9538b000+219000]</div>
<div>Apr 4 10:35:57 casbc00 abrt-hook-ccpp:
Process 3149 (opensips) of user 992 killed
by SIGSEGV - ignoring (repeated crash)</div>
<div>Apr 4 10:35:57 casbc00 systemd:
opensips.service: Main process exited,
code=dumped, status=11/SEGV</div>
<div><br>
</div>
<div><br>
</div>
<div><a moz-do-not-send="true"
href="https://paste.fedoraproject.org/paste/GGfquSgHeN0ezjXHPqQzk15M1UNdIGYhyRLivL9gydE=">https://paste.fedoraproject.org/paste/GGfquSgHeN0ezjXHPqQzk15M1UNdIGYhyRLivL9gydE=</a></div>
<div><br>
</div>
<div>volga629</div>
<div><br>
</div>
<div><br>
On Tue, 4 Apr, 2017 at 10:07 AM, Liviu
Chircu <a moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="mailto:liviu@opensips.org"><liviu@opensips.org></a>
wrote:<br>
<blockquote type="cite">
<meta content="text/html; charset=utf-8"
http-equiv="Content-Type">
<p><tt>Are you sure mid_registrar_save()
is called at all? Please either
provide some DBG logs of this
scenario, or relevant part of the
script.</tt></p>
<p><tt>Regards,</tt><br>
</p>
<pre class="moz-signature" cols="72">Liviu Chircu
OpenSIPS Developer
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a>
OpenSIPS Summit May 2017 Amsterdam
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.opensips.org/events/Summit-2017Amsterdam.html">http://www.opensips.org/events/Summit-2017Amsterdam.html</a></pre>
<div class="moz-cite-prefix">On 04.04.2017
15:37, <a moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:volga629@networklab.ca">volga629@networklab.ca</a>
wrote:<br>
</div>
<blockquote
cite="mid:1491309424.3728.1@smtp.networklab.ca"
type="cite">Hello Liviu,
<div>Here are full trace of RIGISTRAR,
but I don't see not in request not in
reply regid.</div>
<div><br>
</div>
<div><a moz-do-not-send="true"
href="https://paste.fedoraproject.org/paste/o2EcKdTbJcXTY9oX6lFfRV5M1UNdIGYhyRLivL9gydE=">https://paste.fedoraproject.org/paste/o2EcKdTbJcXTY9oX6lFfRV5M1UNdIGYhyRLivL9gydE=</a></div>
<div><br>
</div>
<div>Thank you.</div>
<div><br>
</div>
<div>volga629<br>
<br>
On Tue, 4 Apr, 2017 at 5:13 AM, Liviu
Chircu <a moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="mailto:liviu@opensips.org"><liviu@opensips.org></a>
wrote:<br>
<blockquote type="cite">
<meta content="text/html;
charset=utf-8"
http-equiv="Content-Type">
<p><tt>Hi, Volga!</tt></p>
<p><tt>The errors are pretty
straightforward, and suggest
that the "regid" Contact header
field parameter has been
stripped when the 200 OK reply
contact set was constructed. To
confirm or infirm this, however,
we need a full SIP packet trace.</tt></p>
<p><tt>Best regards,</tt><br>
</p>
<pre class="moz-signature" cols="72">Liviu Chircu
OpenSIPS Developer
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a>
OpenSIPS Summit May 2017 Amsterdam
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.opensips.org/events/Summit-2017Amsterdam.html">http://www.opensips.org/events/Summit-2017Amsterdam.html</a></pre>
<div class="moz-cite-prefix">On
04.04.2017 04:24, <a
moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:volga629@networklab.ca">volga629@networklab.ca</a> wrote:<br>
</div>
<blockquote
cite="mid:1491269079.3475.1@smtp.networklab.ca"
type="cite">Hello Everyone,
<div>Trying implement
mid_registrar but module
throwing error.</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div>Apr 3 20:55:47 casbc00
/usr/sbin/opensips[1770]:
ERROR:mid_registrar:fix_rpl_contact_by_ct:
failed to get match token</div>
<div>Apr 3 20:55:47 casbc00
/usr/sbin/opensips[1770]:
ERROR:mid_registrar:mid_reg_resp_in:
failed to overwrite Contact
header field domain</div>
</div>
<div>
<div>Apr 3 20:55:47 casbc00
/usr/sbin/opensips[1770]:
ERROR:mid_registrar:get_match_token:
a Contact from main registrar
(<a moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:sip:4310@99.245.176.196:46639;rinstance=cc4a62e9cf84e6cf;transport=udp">sip:4310@99.245.176.196:46639;rinstance=cc4a62e9cf84e6cf;transport=udp</a>)
is missing the 'regid' hf
parameter</div>
<div>Apr 3 20:55:47 casbc00
/usr/sbin/opensips[1770]:
ERROR:mid_registrar:fix_rpl_contact_by_ct:
failed to get match token</div>
<div>Apr 3 20:55:47 casbc00
/usr/sbin/opensips[1770]:
ERROR:mid_registrar:mid_reg_resp_in:
failed to overwrite Contact
header field domain</div>
<div>Apr 3 20:55:47 casbc00
/usr/sbin/opensips[1770]:
ERROR:mid_registrar:get_match_token:
a Contact from main registrar
(<a moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:sip:4310@99.245.176.196:46639;rinstance=cc4a62e9cf84e6cf;transport=udp">sip:4310@99.245.176.196:46639;rinstance=cc4a62e9cf84e6cf;transport=udp</a>)
is missing the 'regid' hf
parameter</div>
<div>Apr 3 20:55:47 casbc00
/usr/sbin/opensips[1770]:
ERROR:mid_registrar:match_contact:
failed to get match token</div>
<div>Apr 3 20:55:47 casbc00
/usr/sbin/opensips[1770]:
ERROR:mid_registrar:insert_rpl_contacts:
Contact '<a
moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:sip:4310@99.245.176.196:46639;rinstance=cc4a62e9cf84e6cf;transport=tcp">sip:4310@99.245.176.196:46639;rinstance=cc4a62e9cf84e6cf;transport=tcp</a>'
not found in reply from main
registrar!</div>
</div>
<div><br>
</div>
<div><br>
</div>
<div>My setup </div>
<div><br>
</div>
<div> UDP transport
| TCP
transport
</div>
<div> freeswitch---- ( LAN) ---
opensips --- (WAN) ---- UA
(soft client) </div>
<div><br>
</div>
<div>Any help thank you, volga629</div>
<div><br>
</div>
<div><br>
</div>
<br>
<fieldset
class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a moz-do-not-send="true" 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>
</blockquote>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a moz-do-not-send="true" 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>
</blockquote>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a moz-do-not-send="true" 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>
</blockquote>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a moz-do-not-send="true" 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>
</blockquote>
</div>
</blockquote>
</div>
</blockquote>
</div>
</blockquote>
<br>
</body>
</html>