<div dir="ltr"><div><div><div>Dear list<br><br></div>Im quite new to Kamailio and i found something while trying to see the failover behaviour in Kamailio. I have a kamailio v4.3.5 load balancing two Asterisk boxes.<br><br></div>This happens just when i stop one of the asterisk and make a call that is being load balanced to the same asterisk box that i stopped before, when trying to go to failure_route and dispatch it to the other box then Kamailio just crashes. I have debug=4 in the config file and it really doesnt say much about the error. This is the relative logging i could found:<br><i><br>Jul 18 16:30:13 kam2 /usr/sbin/kamailio[69548]: INFO: <script>: UBICAR: Forwarding non-registrar requests to Asterisk<br>Jul 18 16:30:13 kam2 /usr/sbin/kamailio[69548]: INFO: <script>: UBICAR: Dispatching to Asterisk Box sip:<a href="http://10.0.1.201:5060">10.0.1.201:5060</a><br>Jul 18 16:30:13 kam2 /usr/sbin/kamailio[69550]: INFO: <script>: UBICAR: requestm=INVITE reply=<null> SIP packet comes from the Asterisk Box duid=PBX2;my=pbx2;maxload=10000 callid=<a href="http://4d52095c6f2ed1ab2de2d6c70340a126@10.0.1.201:5060">4d52095c6f2ed1ab2de2d6c70340a126@10.0.1.201:5060</a><br>Jul 18 16:30:13 kam2 /usr/sbin/kamailio[69550]: INFO: <script>: UBICAR: requestm=INVITE reply=<null> SIP packet comes from the Asterisk Box duid=PBX2;my=pbx2;maxload=10000 callid=<a href="http://4d52095c6f2ed1ab2de2d6c70340a126@10.0.1.201:5060">4d52095c6f2ed1ab2de2d6c70340a126@10.0.1.201:5060</a><br>Jul 18 16:30:18 kam2 /usr/sbin/kamailio[69547]: INFO: <script>: UBICAR: setting call load requesturi=<null> callid=<a href="mailto:896175650@192.168.14.76">896175650@192.168.14.76</a><br>Jul 18 16:30:20 kam2 /usr/sbin/kamailio[69550]: INFO: <script>: UBICAR: delete call load requesturi=<a href="http://sip:10005@10.0.1.201:5060">sip:10005@10.0.1.201:5060</a> callid=<a href="mailto:896175650@192.168.14.76">896175650@192.168.14.76</a><br>Jul 18 16:30:38 kam2 /usr/sbin/kamailio[69548]: INFO: <script>: UBICAR: Forwarding non-registrar requests to Asterisk<br>Jul 18 16:30:38 kam2 /usr/sbin/kamailio[69548]: INFO: <script>: UBICAR: Dispatching to Asterisk Box sip:<a href="http://10.0.1.201:5060">10.0.1.201:5060</a><br>Jul 18 16:30:42 kam2 /usr/sbin/kamailio[69559]: ALERT: <script>: UBICAR: Asterisk sip:<a href="http://10.0.1.201:5060">10.0.1.201:5060</a> failed to answer, selecting other one!<br>Jul 18 16:30:42 kam2 /usr/sbin/kamailio[69559]: INFO: <script>: UBICAR: Dispatching to Asterisk Box sip:<a href="http://10.0.1.200:5060">10.0.1.200:5060</a><br>Jul 18 16:30:43 kam2 /usr/sbin/kamailio[69546]: ALERT: <core> [main.c:728]: handle_sigs(): child process 69559 exited by a signal 11<br>Jul 18 16:30:43 kam2 /usr/sbin/kamailio[69546]: ALERT: <core> [main.c:731]: handle_sigs(): core was generated<br>Jul 18 16:30:43 kam2 /usr/sbin/kamailio[69546]: INFO: <core> [main.c:743]: handle_sigs(): terminating due to SIGCHLD<br>Jul 18 16:30:43 kam2 /usr/sbin/kamailio[69563]: INFO: <core> [main.c:798]: sig_usr(): signal 15 received<br>Jul 18 16:30:43 kam2 /usr/sbin/kamailio[69562]: INFO: <core> [main.c:798]: sig_usr(): signal 15 received<br>Jul 18 16:30:43 kam2 /usr/sbin/kamailio[69561]: INFO: <core> [main.c:798]: sig_usr(): signal 15 received<br>Jul 18 16:30:43 kam2 /usr/sbin/kamailio[69558]: INFO: <core> [main.c:798]: sig_usr(): signal 15 received<br>Jul 18 16:30:43 kam2 /usr/sbin/kamailio[69557]: INFO: <core> [main.c:798]: sig_usr(): signal 15 received<br>Jul 18 16:30:43 kam2 /usr/sbin/kamailio[69556]: INFO: <core> [main.c:798]: sig_usr(): signal 15 received<br>Jul 18 16:30:43 kam2 /usr/sbin/kamailio[69555]: INFO: <core> [main.c:798]: sig_usr(): signal 15 received<br>Jul 18 16:30:43 kam2 /usr/sbin/kamailio[69554]: INFO: <core> [main.c:798]: sig_usr(): signal 15 received<br>Jul 18 16:30:43 kam2 /usr/sbin/kamailio[69553]: INFO: <core> [main.c:798]: sig_usr(): signal 15 received<br>Jul 18 16:30:43 kam2 /usr/sbin/kamailio[69552]: INFO: <core> [main.c:798]: sig_usr(): signal 15 received<br>Jul 18 16:30:43 kam2 /usr/sbin/kamailio[69551]: INFO: <core> [main.c:798]: sig_usr(): signal 15 received<br>Jul 18 16:30:43 kam2 /usr/sbin/kamailio[69548]: INFO: <core> [main.c:798]: sig_usr(): signal 15 received<br>Jul 18 16:30:43 kam2 /usr/sbin/kamailio[69547]: INFO: <core> [main.c:798]: sig_usr(): signal 15 received<br>Jul 18 16:30:43 kam2 /usr/sbin/kamailio[69549]: INFO: <core> [main.c:798]: sig_usr(): signal 15 received<br>Jul 18 16:30:43 kam2 /usr/sbin/kamailio[69550]: INFO: <core> [main.c:798]: sig_usr(): signal 15 received<br>Jul 18 16:30:43 kam2 /usr/sbin/kamailio[69560]: INFO: <core> [main.c:798]: sig_usr(): signal 15 received<br>Jul 18 16:30:43 kam2 /usr/sbin/kamailio[69546]: INFO: <core> [sctp_core.c:53]: sctp_core_destroy(): SCTP API not initialized<br><br></i></div>My configuration when applying load balancing and failover is detailed here:<br><br><i># Send to Asterisk<br>route[TOASTERISK] {<br>#!ifdef WITH_LOADBALANCE<br>        xlog("L_INFO","UBICAR: Forwarding non-registrar requests to Asterisk \n");<br>        if(!ds_select_dst("0", "10")) {<br>                sl_send_reply("500", "Service Unavailable");<br>                xlog("L_ERROR","UBICAR: No destinations available for $rd \n");<br>                exit;<br>        }<br>        xlog("L_INFO","UBICAR: Dispatching to Asterisk Box $du\n");<br>        t_set_fr(0,4000);<br>        t_on_failure("MANAGE_FAILURE");<br>        route(RELAY);<br>        exit;<br>#!endif<br></i><br><i># manage failure routing cases<br>failure_route[MANAGE_FAILURE] {<br> #xlog("L_ALERT","UBICAR: failure requestm=$rm requesturi=$ru callid=$ci\n");<br> if (t_is_canceled()) {<br>  exit;<br> }<br><br>#!ifdef WITH_LOADBALANCE<br>        xlog("L_ALERT","UBICAR: Asterisk $du failed to answer, selecting other one!");<br>        # next DST - only for 500 reply or local timeout (set by t_set_fr())<br>        if (t_check_status("500") || t_branch_timeout() || !t_branch_replied())<br>        {<br>                #we mark the destination Inactive and Probing<br>                ds_mark_dst("ip");<br>                #select the new destination<br>                if(ds_next_dst())<br>                {<br>                        t_set_fr(0,4000);<br>                        t_on_failure("MANAGE_FAILURE");<br>                        xlog("L_INFO","UBICAR: Dispatching to Asterisk Box $du\n");<br>                        route(RELAY);<br>                        exit;<br>                }else{<br>                        #last available node failed to reply, no other destinations available<br>                        send_reply("404", "No destination");<br>                        exit;<br>                }<br>#!endif<br>        }<br>}<br></i><div><div><br></div><div>It may be a bug in that Kamailio version because i used Kamailio v4.2 before and i didnt have that inconvenient, still i had to upgrade to v4.3 because i needed the default_socket modparam that wasnt implemented in Kamailio v4.2<br><br></div><div>Any hint about this issue would be appreciate it<br><br></div><div>Best Regards<br><br></div><div>Alejandro<br clear="all"></div><div><div><div><div><div><br></div></div></div></div></div></div></div>