[OpenSIPS-Devel] [opensips] Dialog module crash when making 2 calls to async function -- 2.1 Branch (#780)

Minh PHAN notifications at github.com
Tue Feb 2 12:57:46 CET 2016


I am having problem enabling the dialog module If I load dialogso, opensips crashes when it receives an INVITE message My configuration is bellow I think it is because I call async function twice

-------------------------------------------------------   opensipscfg  ----------------------------------------------------

route{  #main
      
      if (is_method("INVITE")) {
            route("authenticate");
      }
      
}


route[authenticate] {
    async(rest_get("http://localhost:8090/ws/callrouter/authenticate?fU=$fU&aU=$aU&fd=$fd&si=$si", "$avp(routing_result)", "$avp(routing_retcode)"), resume_auth);
}

route[resume_auth] {
    if ($rc < 0) {
        xlog("Error code $var(rcode) in HTTP GET!\n");
        send_reply("501", "Internal server error");
        exit;
    }
    else {
        $json(routing_result) := $avp(routing_result);
        xlog("HTTP Request success with result: $json(routing_result) $json(msg_data) \n");
        if ($rm == 'INVITE') {
            async(rest_get("http://localhost:8090/ws/callrouter/route_invite?fU=$fU&rU=$rU&si=$si", "$avp(routing_result)", "$avp(routing_retcode)"), resume_invite);
        }
    }
    exit;
}

route [resume_invite] {
    if ($rc < 0) {
        xlog("Error code $var(rcode) in HTTP GET!\n");
        send_reply("403", "GET Forbidden");
        exit;
     }
     xlog("resumed_invite got called");
}

-------------------------------------------------------   Back Trace  ----------------------------------------------------

> Program terminated with signal SIGSEGV, Segmentation fault
> #0  0x00000000004269e5 in context_get_ptr (pos=0, ctx=0x0, type=CONTEXT_GLOBAL) at contextc:251
> 251     contextc: No such file or directory
> (gdb) bt
> #0  0x00000000004269e5 in context_get_ptr (pos=0, ctx=0x0, type=CONTEXT_GLOBAL) at contextc:251
> #1  context_destroy (ctxtype=ctxtype at entry=CONTEXT_GLOBAL, ctx=0x0) at contextc:115
> #2  0x00007efce275d951 in t_resume_async (fd=<optimized out>, param=<optimized out>) at asyncc:155
> #3  0x000000000058c965 in handle_io (fm=0x7efce2e09ed8, fm=0x7efce2e09ed8, fm=0x7efce2e09ed8, idx=<optimized out>, event_type=2) at net/net_udpc:268
> #4  io_wait_loop_epoll (h=<optimized out>, t=<optimized out>, repeat=<optimized out>) at net//io_wait_looph:215
> #5  udp_rcv_loop (si=si at entry=0x7efce2db5f68) at net/net_udpc:308
> #6  0x000000000058e1e8 in udp_start_nofork () at net/net_udpc:387
> #7  0x000000000041af9c in main_loop () at mainc:671
> #8  main (argc=<optimized out>, argv=<optimized out>) at mainc:1261

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/issues/780
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/devel/attachments/20160202/a436f626/attachment.htm>


More information about the Devel mailing list