<div dir="ltr">Hello. We continue testing Opensips-2.3 with mid-registrar module. Opensips installed from <a href="http://yum.opensips.org/2.3/nightly/el/7/x86_64/opensips-yum-nightly">yum.opensips.org/2.3/nightly/el/7/x86_64/opensips-yum-nightly</a> repo.<div>Config file. </div><div><div>loadmodule "mid_registrar.so"</div><div>modparam("mid_registrar", "mode", 1) /* 0 = mirror / 1 = ct / 2 = AoR */</div><div>modparam("mid_registrar", "outgoing_expires", 7200)</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><div><br></div><div><br></div><div><div>if (is_method("REGISTER")) {</div><div> mid_registrar_save("location", "v");</div><div> switch ($retcode) {</div><div> case 1:</div><div>  xlog("L_INFO", "forwarding REGISTER to main registrar ($$ci=$ci)\n");</div><div>  $ru = "sip:<a href="http://192.168.10.201:5061">192.168.10.201:5061</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><div><br></div><div>And it crashed Opensips.</div><div><br></div><div><div>Apr 19 10:32:10 [23576] DBG:mid_registrar:mid_reg_ct_event: Contact callback (8): contact='sip:2102@192.168.76.96:52788;rinstance=1661374fc8fce109;transport=UDP' | param=(0x7ffff54c59c0 -> (nil)) | data[0]=((nil))</div><div><br></div><div>Program received signal SIGSEGV, Segmentation fault.</div><div>crcitt_string_array (dst=dst@entry=0x7ffff0e109e1 <from_tag+33> "", src=src@entry=0x90, size=size@entry=1) at crc.c:225</div><div>225    len=src[i].len;</div><div><br></div></div><div>gdb core file:</div><div><div>#0  crcitt_string_array (dst=dst@entry=0x7ffff0e109e1 <from_tag+33> "", src=src@entry=0x90, size=size@entry=1) at crc.c:225</div><div>    i = <optimized out></div><div>    ccitt = 65535</div><div>    c = <optimized out></div><div>    len = <optimized out></div><div>    str_len = 4</div><div>    __FUNCTION__ = "crcitt_string_array"</div><div>#1  0x00007ffff0ba38e5 in generate_fromtag (tag=tag@entry=0x7fffffffdf70, callid=callid@entry=0x90) at uac.c:118</div><div>No locals.</div><div>#2  0x00007ffff0b9da37 in new_auto_dlg_uac (_luri=0x80, _turi=0x70, _ruri=0x10, callid=0x90, _sock=0x0, _d=<optimized out>) at dlg.c:210</div><div>    fromtag = {s = 0x1 <Address 0x1 out of bounds>, len = -145797379}</div><div>    clid = {s = 0x7ffff77a31c0 <_IO_2_1_stderr_> "\207(\255", <incomplete sequence \373>, len = -146460574}</div><div>#3  0x00007fffef0666a9 in unregister_contact (mri=mri@entry=0x0) at ulcb.c:122</div><div>    dlg = 0x7fff00000020</div><div>    ret = <optimized out></div><div>    __FUNCTION__ = "unregister_contact"</div><div>#4  0x00007fffef066f30 in mid_reg_ct_event (binding=<optimized out>, type=<optimized out>, data=<optimized out>) at ulcb.c:173</div><div>    c = <optimized out></div><div>    mri = 0x0</div><div>    __FUNCTION__ = "mid_reg_ct_event"</div><div>#5  0x00007fffefb12a9b in run_ul_callbacks (binding=0x7ffff54c5890, type=8) at ul_callback.h:126</div><div>    cbp = 0x7ffff5223ab8Apr 19 10:32:10 [23576] DBG:mid_registrar:mid_reg_ct_event: Contact callback (8): contact='sip:2102@192.168.76.96:52788;rinstance=1661374fc8fce109;transport=UDP' | param=(0x7ffff54c59c0 -> (nil)) | data[0]=((nil))</div><div><br></div><div>Program received signal SIGSEGV, Segmentation fault.</div><div>crcitt_string_array (dst=dst@entry=0x7ffff0e109e1 <from_tag+33> "", src=src@entry=0x90, size=size@entry=1) at crc.c:225</div><div>225    len=src[i].len;</div><div>    ct_extra_idx = 0</div><div>    aor_extra_idx = 0</div><div>    ele = 0x7ffff5223ad0</div><div>#6  wb_timer (ins_list=0x7ffff54afda0, _r=0x7ffff54c5890) at urecord.c:320</div><div>    old_state = <optimized out></div><div>    ptr = 0x7ffff54c5890</div><div>    t = <optimized out></div><div>    op = <optimized out></div><div>    ins_done = 0</div><div>#7  timer_urecord (_r=_r@entry=0x7ffff54abee0, ins_list=ins_list@entry=0x7ffff54afda0) at urecord.c:396</div><div>No locals.</div><div>#8  0x00007fffefb04031 in mem_timer_udomain (_d=<optimized out>) at udomain.c:1147</div><div>    ptr = 0x7ffff54abee0</div><div>    dest = <optimized out></div><div>    i = 310</div><div>    ret = <optimized out></div><div>    flush = 0</div><div>    it = {node = 0x0, map = 0x7ffff54be350}</div><div>    prev = {node = 0x7ffff54c57f0, map = 0x7ffff54be350}</div><div>    __FUNCTION__ = "mem_timer_udomain"</div><div>#9  0x00007fffefb201a1 in synchronize_all_udomains () at dlist.c:803</div><div>    res = 0</div><div>    ptr = 0x7ffff54afc98</div><div>#10 0x00007fffefb20d87 in destroy () at ul_mod.c:492</div><div>    __FUNCTION__ = "destroy"</div><div>#11 0x00000000004a5d71 in destroy_modules () at sr_module.c:527</div><div>    t = 0x7ffff72245a0</div><div>    foo = 0x7ffff7224250</div><div>    __FUNCTION__ = "destroy_modules"</div><div>#12 0x00000000004a2057 in cleanup (show_status=show_status@entry=1) at main.c:319</div><div>    __FUNCTION__ = "cleanup"</div><div>#13 0x00000000004a2df2 in handle_sigs () at main.c:522</div><div>    chld = <optimized out></div><div>    chld_status = 139</div><div>    overall_status = 139</div><div>    i = <optimized out></div><div>    do_exit = 1</div><div>    __FUNCTION__ = "handle_sigs"</div><div>#14 0x000000000041c818 in main_loop () at main.c:722</div><div>    startup_done = <optimized out></div><div>    chd_rank = 5</div><div>#15 main (argc=<optimized out>, argv=<optimized out>) at main.c:1283</div><div>    cfg_stream = <optimized out></div><div>    c = <optimized out></div><div>    r = <optimized out></div><div>    tmp = 0xf0b2e4 <Address 0xf0b2e4 out of bounds></div><div>    tmp_len = <optimized out></div><div>    port = <optimized out></div><div>    proto = <optimized out></div><div>    protos_no = <optimized out></div><div>    options = 0x57c0f8 "f:cCm:M:b:l:n:N:rRvdDFETSVhw:t:u:g:P:G:W😨:"</div><div>    seed = 2690059408</div><div>    rfd = <optimized out></div><div>    __FUNCTION__ = "main"</div><div><br></div></div></div>