Hi Kirill,

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]).

Regards,

[1]: https://github.com/OpenSIPS/opensips/commit/ed5b3900878

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com

OpenSIPS Summit May 2017 Amsterdam
  http://www.opensips.org/events/Summit-2017Amsterdam.html

On 26.04.2017 12:39, Kirill Galinurov wrote:
Hi I also have the same problem. Our config is:

loadmodule "mid_registrar.so"
modparam("mid_registrar", "mode", 1) /* 0 = mirror / 1 = ct / 2 = AoR */
modparam("mid_registrar", "outgoing_expires", 3600)
modparam("mid_registrar", "insertion_mode", 0) /* 0 = contact; 1 = path */
modparam("mid_registrar", "max_contacts", 1)
modparam("mid_registrar", "retry_after", 30)
modparam("mid_registrar", "contact_match_param", "rid")

####### Routing Logic ########

# main request routing logic

route{

if (method=="OPTIONS")
            {
    sl_send_reply("200", "OK");
                exit;
            };
            if (method=="PUBLISH")
            {
                exit;
            };
            if (method=="SUBSCRIBE")
            {
    sl_send_reply("404", "Not Found");
                exit;
            };

    if (!mf_process_maxfwd_header("40")) {
    sl_send_reply("483","Too Many Hops");
    exit;
  }


if (is_method("REGISTER")) {
  mid_registrar_save("location");
  switch ($retcode) {
  case 1:
    xlog("L_INFO", "forwarding REGISTER to main registrar...\n");
    $ru = "sip:192.168.10.201:5070 <http://192.168.10.201:5070>";
    if (!t_relay()) {
      send_reply("500", "Server Internal Error 1");
    }

    break;
  case 2:
    xlog("L_INFO", "REGISTER has been absorbed!\n");
    break;
  default:
    xlog("L_ERR", "mid-registrar error!\n");
    send_reply("500", "Server Internal Error 2");
  }

  exit;
}






if (is_method("INVITE|MESSAGE") && $si == "192.168.10.201" && $sp == 5070) {
       xlog("looking up $ru!\n");
      if (!mid_registrar_lookup("location")) {
            t_reply("404", "Not Found");
            exit;
        }

       t_relay();

        exit;
    }

}

Apr 26 12:58:11 [7524] DBG:core:parse_msg:  method:  <REGISTER>
Apr 26 12:58:11 [7524] DBG:core:parse_msg: uri: <sip:192.168.10.200;transport=UDP>
Apr 26 12:58:11 [7524] DBG:core:parse_msg:  version: <SIP/2.0>
Apr 26 12:58:11 [7524] DBG:core:parse_headers: flags=2
Apr 26 12:58:11 [7524] DBG:core:parse_via_param: found param type 232, <branch> = <z9hG4bK-524287-1---d9e41954d085f056>; state=16
Apr 26 12:58:11 [7524] DBG:core:parse_via: end of header reached, state=5
Apr 26 12:58:11 [7524] DBG:core:parse_headers: via found, flags=2
Apr 26 12:58:11 [7524] DBG:core:parse_headers: this is the first via
Apr 26 12:58:11 [7524] DBG:core:receive_msg: After parse_msg...
Apr 26 12:58:11 [7524] DBG:core:receive_msg: preparing to run routing scripts...
Apr 26 12:58:11 [7524] DBG:core:parse_headers: flags=100
Apr 26 12:58:11 [7524] DBG:maxfwd:is_maxfwd_present: value = 70
Apr 26 12:58:11 [7524] DBG:mid_registrar:mid_reg_save: saving to location...
Apr 26 12:58:11 [7517] DBG:core:handle_sigs: status = 139
Apr 26 12:58:11 [7517] INFO:core:handle_sigs: child process 7524 exited by a signal 11
Apr 26 12:58:11 [7517] INFO:core:handle_sigs: core was generated
Apr 26 12:58:11 [7517] INFO:core:handle_sigs: terminating due to SIGCHLD
Apr 26 12:58:11 [7518] INFO:core:sig_usr: signal 15 received
Apr 26 12:58:11 [7519] INFO:core:sig_usr: signal 15 received
Apr 26 12:58:11 [7520] INFO:core:sig_usr: signal 15 received
Apr 26 12:58:11 [7521] INFO:core:sig_usr: signal 15 received
Apr 26 12:58:11 [7522] INFO:core:sig_usr: signal 15 received
Apr 26 12:58:11 [7523] INFO:core:sig_usr: signal 15 received
Apr 26 12:58:11 [7525] INFO:core:sig_usr: signal 15 received
Apr 26 12:58:11 [7517] INFO:core:cleanup: cleanup
Apr 26 12:58:11 [7517] DBG:core:pool_remove: removing connection from the pool Apr 26 12:58:11 [7517] DBG:db_postgres:db_postgres_free_connection: PQfinish(0x1bd8980) Apr 26 12:58:11 [7517] DBG:db_postgres:db_postgres_free_connection: pkg_free(0x7fbfc037fb68)
Apr 26 12:58:11 [7517] DBG:uac_auth:mod_destroy: done
Apr 26 12:58:11 [7517] DBG:tm:tm_shutdown: tm_shutdown : start
Apr 26 12:58:11 [7517] DBG:tm:unlink_timer_lists: emptying DELETE list for set 0
Apr 26 12:58:11 [7517] DBG:tm:tm_shutdown: emptying hash table
Apr 26 12:58:11 [7517] DBG:tm:tm_shutdown: releasing timers
Apr 26 12:58:11 [7517] DBG:tm:tm_shutdown: removing semaphores
Apr 26 12:58:11 [7517] DBG:tm:tm_shutdown: destroying callback lists
Apr 26 12:58:11 [7517] DBG:tm:tm_shutdown: tm_shutdown : done
Apr 26 12:58:11 [7517] DBG:core:shm_mem_destroy: destroying the shared memory lock
Apr 26 12:58:11 [7517] DBG:core:handle_sigs: terminating due to SIGCHLD

gdb dump file:
https://gist.github.com/anonymous/351c2feb6907c697554ede46f18b0f55


_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to