Hi there,

After below even route is triggered, Kamailio crashes with the following in logs:

Feb 12 08:03:59 kamailio[24671]: INFO: <script>: Received HTTP/RPC request from IP=127.0.0.1
Feb 12 08:03:59 kamailio[24671]: WARNING: <script>: Contact myusername@sip.mydomain.net has expired
Feb 12 08:03:59 kamailio[24671]: INFO: drouting [drouting.c:483]: rpc_reload(): RPC command received!
Feb 12 08:03:59 kamailio[24675]: CRITICAL: <core> [core/pass_fd.c:277]: receive_fd(): EOF on 59
Feb 12 08:03:59 kamailio[24614]: ALERT: <core> [main.c:745]: handle_sigs(): child process 24671 exited by a signal 11
Feb 12 08:03:59 kamailio[24614]: ALERT: <core> [main.c:748]: handle_sigs(): core was not generated
Feb 12 08:03:59 kamailio[24614]: INFO: <core> [main.c:770]: handle_sigs(): terminating due to SIGCHLD
Feb 12 08:03:59 kamailio[24675]: INFO: <core> [main.c:825]: sig_usr(): signal 15 received

event_route[usrloc:contact-expired] {
   xlog("L_WARN", "Contact $ulc(exp=>aor) has expired\n");

   # Remove the sip: from the front of the Received URI
   $var(exp_received) = $(ulc(exp=>received){s.substr,4,0});

  sql_query("db", "UPDATE `dr_gateways` SET address = '127.0.0.1' WHERE address = '$var(exp_received)'", "rz");
  sql_result_free("rz");

  jsonrpc_exec('{"jsonrpc": "2.0", "method": "drouting.reload", "id": 1}');
}

If I comment out the sql and jsonrpc_exec lines above - crash does not happen.

Let me know if core dump is needed.

Thanks,
--Sergiu