<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p><tt>Hi Kirill,</tt></p>
    <p><tt>Are you running the latest 2.3 code? (verify with "opensips
        -V"). There have been lots of backported mid_registrar fixes over
        the last week (such as this one [1]).<br>
      </tt></p>
    <p><tt>Regards,</tt></p>
    <p><tt>[1]: <a class="moz-txt-link-freetext" href="https://github.com/OpenSIPS/opensips/commit/ed5b3900878">https://github.com/OpenSIPS/opensips/commit/ed5b3900878</a><br>
      </tt></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 26.04.2017 12:39, Kirill Galinurov
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAPDUut-TZcQPYmTeRbmdiS109x6-edzttKomKo+sm6fno_uXWA@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hi I also have the same problem. Our config is:
        <div>
          <div><br>
          </div>
          <div>loadmodule "mid_registrar.so"<br>
          </div>
          <div>modparam("mid_registrar", "mode", 1) /* 0 = mirror / 1 =
            ct / 2 = AoR */</div>
          <div>modparam("mid_registrar", "outgoing_expires", 3600)</div>
          <div>modparam("mid_registrar", "insertion_mode", 0) /* 0 =
            contact; 1 = path */</div>
          <div>modparam("mid_registrar", "max_contacts", 1)</div>
          <div>modparam("mid_registrar", "retry_after", 30)</div>
          <div>modparam("mid_registrar", "contact_match_param", "rid")</div>
          <div><br>
          </div>
          <div>####### Routing Logic ########</div>
          <div><br>
          </div>
          <div># main request routing logic</div>
          <div><br>
          </div>
          <div>route{</div>
          <div><br>
          </div>
          <div>if (method=="OPTIONS")</div>
          <div>            {</div>
          <div>    sl_send_reply("200", "OK");</div>
          <div>                exit;</div>
          <div>            };</div>
          <div>            if (method=="PUBLISH")</div>
          <div>            {</div>
          <div>                exit;</div>
          <div>            };</div>
          <div>            if (method=="SUBSCRIBE")</div>
          <div>            {</div>
          <div>    sl_send_reply("404", "Not Found");</div>
          <div>                exit;</div>
          <div>            };</div>
          <div><br>
          </div>
          <div>    if (!mf_process_maxfwd_header("40")) {<br>
          </div>
          <div>    sl_send_reply("483","Too Many Hops");</div>
          <div>    exit;</div>
          <div>  }</div>
          <div><br>
          </div>
          <div><br>
          </div>
          <div>if (is_method("REGISTER")) {</div>
          <div>  mid_registrar_save("location");</div>
          <div>  switch ($retcode) {</div>
          <div>  case 1:</div>
          <div>    xlog("L_INFO", "forwarding REGISTER to main
            registrar...\n");</div>
          <div>    $ru = "sip:<a moz-do-not-send="true"
              href="http://192.168.10.201:5070">192.168.10.201:5070</a>";</div>
          <div>    if (!t_relay()) {</div>
          <div>      send_reply("500", "Server Internal Error 1");</div>
          <div>    }</div>
          <div><br>
          </div>
          <div>    break;</div>
          <div>  case 2:</div>
          <div>    xlog("L_INFO", "REGISTER has been absorbed!\n");</div>
          <div>    break;</div>
          <div>  default:</div>
          <div>    xlog("L_ERR", "mid-registrar error!\n");</div>
          <div>    send_reply("500", "Server Internal Error 2");</div>
          <div>  }</div>
          <div><br>
          </div>
          <div>  exit;</div>
          <div>}</div>
          <div><br>
          </div>
          <div><br>
          </div>
          <div><br>
          </div>
          <div><br>
          </div>
          <div><br>
          </div>
          <div><br>
          </div>
          <div>if (is_method("INVITE|MESSAGE") && $si ==
            "192.168.10.201" && $sp == 5070) {</div>
          <div>       xlog("looking up $ru!\n");</div>
          <div>      if (!mid_registrar_lookup("location")) {</div>
          <div>            t_reply("404", "Not Found");</div>
          <div>            exit;</div>
          <div>        }</div>
          <div><br>
          </div>
          <div>       t_relay();</div>
          <div><br>
          </div>
          <div>        exit;</div>
          <div>    }</div>
          <div><br>
          </div>
          <div>}</div>
        </div>
        <div><br>
        </div>
        <div>
          <div>Apr 26 12:58:11 [7524] DBG:core:parse_msg:  method:
             <REGISTER></div>
          <div>Apr 26 12:58:11 [7524] DBG:core:parse_msg:  uri:    
            <sip:192.168.10.200;transport=UDP></div>
          <div>Apr 26 12:58:11 [7524] DBG:core:parse_msg:  version:
            <SIP/2.0></div>
          <div>Apr 26 12:58:11 [7524] DBG:core:parse_headers: flags=2</div>
          <div>Apr 26 12:58:11 [7524] DBG:core:parse_via_param: found
            param type 232, <branch> =
            <z9hG4bK-524287-1---d9e41954d085f056>; state=16</div>
          <div>Apr 26 12:58:11 [7524] DBG:core:parse_via: end of header
            reached, state=5</div>
          <div>Apr 26 12:58:11 [7524] DBG:core:parse_headers: via found,
            flags=2</div>
          <div>Apr 26 12:58:11 [7524] DBG:core:parse_headers: this is
            the first via</div>
          <div>Apr 26 12:58:11 [7524] DBG:core:receive_msg: After
            parse_msg...</div>
          <div>Apr 26 12:58:11 [7524] DBG:core:receive_msg: preparing to
            run routing scripts...</div>
          <div>Apr 26 12:58:11 [7524] DBG:core:parse_headers: flags=100</div>
          <div>Apr 26 12:58:11 [7524] DBG:maxfwd:is_maxfwd_present:
            value = 70 </div>
          <div>Apr 26 12:58:11 [7524] DBG:mid_registrar:mid_reg_save:
            saving to location...</div>
          <div>Apr 26 12:58:11 [7517] DBG:core:handle_sigs: status = 139</div>
          <div>Apr 26 12:58:11 [7517] <a class="moz-txt-link-freetext" href="INFO:core:handle_sigs">INFO:core:handle_sigs</a>: child
            process 7524 exited by a signal 11</div>
          <div>Apr 26 12:58:11 [7517] <a class="moz-txt-link-freetext" href="INFO:core:handle_sigs">INFO:core:handle_sigs</a>: core was
            generated</div>
          <div>Apr 26 12:58:11 [7517] <a class="moz-txt-link-freetext" href="INFO:core:handle_sigs">INFO:core:handle_sigs</a>: terminating
            due to SIGCHLD</div>
          <div>Apr 26 12:58:11 [7518] <a class="moz-txt-link-freetext" href="INFO:core:sig_usr">INFO:core:sig_usr</a>: signal 15
            received</div>
          <div>Apr 26 12:58:11 [7519] <a class="moz-txt-link-freetext" href="INFO:core:sig_usr">INFO:core:sig_usr</a>: signal 15
            received</div>
          <div>Apr 26 12:58:11 [7520] <a class="moz-txt-link-freetext" href="INFO:core:sig_usr">INFO:core:sig_usr</a>: signal 15
            received</div>
          <div>Apr 26 12:58:11 [7521] <a class="moz-txt-link-freetext" href="INFO:core:sig_usr">INFO:core:sig_usr</a>: signal 15
            received</div>
          <div>Apr 26 12:58:11 [7522] <a class="moz-txt-link-freetext" href="INFO:core:sig_usr">INFO:core:sig_usr</a>: signal 15
            received</div>
          <div>Apr 26 12:58:11 [7523] <a class="moz-txt-link-freetext" href="INFO:core:sig_usr">INFO:core:sig_usr</a>: signal 15
            received</div>
          <div>Apr 26 12:58:11 [7525] <a class="moz-txt-link-freetext" href="INFO:core:sig_usr">INFO:core:sig_usr</a>: signal 15
            received</div>
          <div>Apr 26 12:58:11 [7517] <a class="moz-txt-link-freetext" href="INFO:core:cleanup">INFO:core:cleanup</a>: cleanup</div>
          <div>Apr 26 12:58:11 [7517] DBG:core:pool_remove: removing
            connection from the pool</div>
          <div>Apr 26 12:58:11 [7517]
            DBG:db_postgres:db_postgres_free_connection:
            PQfinish(0x1bd8980)</div>
          <div>Apr 26 12:58:11 [7517]
            DBG:db_postgres:db_postgres_free_connection:
            pkg_free(0x7fbfc037fb68)</div>
          <div>Apr 26 12:58:11 [7517] DBG:uac_auth:mod_destroy: done</div>
          <div>Apr 26 12:58:11 [7517] DBG:tm:tm_shutdown: tm_shutdown :
            start</div>
          <div>Apr 26 12:58:11 [7517] DBG:tm:unlink_timer_lists:
            emptying DELETE list for set 0</div>
          <div>Apr 26 12:58:11 [7517] DBG:tm:tm_shutdown: emptying hash
            table</div>
          <div>Apr 26 12:58:11 [7517] DBG:tm:tm_shutdown: releasing
            timers</div>
          <div>Apr 26 12:58:11 [7517] DBG:tm:tm_shutdown: removing
            semaphores</div>
          <div>Apr 26 12:58:11 [7517] DBG:tm:tm_shutdown: destroying
            callback lists</div>
          <div>Apr 26 12:58:11 [7517] DBG:tm:tm_shutdown: tm_shutdown :
            done</div>
          <div>Apr 26 12:58:11 [7517] DBG:core:shm_mem_destroy:
            destroying the shared memory lock</div>
          <div>Apr 26 12:58:11 [7517] DBG:core:handle_sigs: terminating
            due to SIGCHLD</div>
        </div>
        <div><br>
        </div>
        <div>gdb dump file:</div>
        <div><a moz-do-not-send="true"
href="https://gist.github.com/anonymous/351c2feb6907c697554ede46f18b0f55">https://gist.github.com/anonymous/351c2feb6907c697554ede46f18b0f55</a><br>
        </div>
      </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>