<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
Dispatcher crashes everytime guaranteed if there is a single dead host kamailio exits with a core dump (see below). If there are two dead hosts entire kamailio locks up (no core dump). Any ideas on this one? The invalid flag is never marked in the DB btw.<BR>
<BR>Crashes at ds_select_dst having never reached "COMPLETED FIRST DST LOOKUP"<BR>
<BR>
# ------------------------- request routing logic -------------------<BR>
# main routing logic<BR># ------------------<BR>route{<BR> # initial checks<BR> if (!mf_process_maxfwd_header("10")) {<BR> sl_send_reply("483","Too Many Hops");<BR> exit;<BR> };<BR> if (msg:len >= 2048 ) {<BR> sl_send_reply("513", "Message too big");<BR> exit;<BR> };<BR>
xlog("[$TF] VALID RECV $rm\n $fu ($si:$sp) to $ru\n");<BR> $avp(orig_du) = $du;<BR> if($(fU{s.select,1,-})){<BR> # from a user-formed message<BR> $avp(user) = $(fU{s.select,0,-});<BR> xlog(" USER $avp(user) DETECTED\n");<BR> }<BR> if(pv_isset("$avp(user)") && !ds_is_from_list()){<BR> # from client<BR> # route to client PBX<BR> if(method == "REGISTER"){<BR> route(3);<BR> } else {<BR> route(1);<BR> }<BR> }<BR> if(ds_is_from_list()){<BR> # from client, outbound from pbx<BR> xlog(" IS FROM PBX\n");<BR> if(is_e164($rU)){<BR> xlog(" IS E164");<BR> # all pbx-pbx traffic should be in user format<BR> # since this is pbx-non-pbx send it to gateway<BR> # gateway only takes E164<BR> route(2);<BR> }<BR> if($(rU{s.select,0,-})){<BR> # send directly from pbx to client<BR> route(4);<BR> }<BR> }<BR> if($si == "GATEWAY_IP_ADDRESS"){<BR> # lookup enum<BR> # route to appropriate pbx via DISPATCHER based on user returned<BR> xlog(" CALL FROM GATEWAY\n");<BR> }<BR>}<BR>
route[1]{<BR> route(3);<BR> xlog(" ROUTED to $avp(user) PBX\n");<BR> ds_select_dst($avp(user),"7");<BR> xlog(" COMPLETED FIRST DST LOOKUP\n");<BR> if($avp(orig_rd) == $rd){<BR> exec("kamctl dispatcher reload");<BR> ds_select_dst($avp(user),"9");<BR> }<BR> xlog(" host is now $rd; all is $ru || $du\n");<BR> if($avp(orig_du) != $du){<BR> t_on_failure("1");<BR> if(!t_relay()){<BR> xlog(" T_RELAY() FAILED\n");<BR> sl_reply_error();<BR> }<BR> } else {<BR> xlog(" RELOAD STILL YIELDED NOTHING\n");<BR> }<BR>}<BR>route[2]{<BR> xlog(" Sending to gateway...");<BR> #$rd = "GATEWAY";<BR>}<BR>route[3]{<BR> #register<BR> if(!www_authorize("domain.net","subscriber")){<BR> www_challenge("domain.net","0");<BR> return;<BR> } else {<BR> xlog(" AUTHENTICATED $avp(user)\n");<BR> save("location");<BR> return;<BR> }<BR>}<BR>route[4]{<BR> $rU = "2-1";<BR> #$rd = "10.1.40.7";<BR> #$rp = "16314";<BR> lookup("location");<BR> xlog(" ROUTING TO USER $rU\n");<BR> forward();<BR>}<BR>
failure_route[1]{<BR> xlog(" FAILED FAILURE_ROUTE[1]\n");<BR> if(t_any_timeout()){<BR> xlog(" MARKING DEAD HOST $du\n");<BR> ds_mark_dst();<BR> xlog(" TIMEOUT!\n");<BR> }<BR>}<BR><BR>
<BR>
0(2934) ERROR: <script>: [Thu Dec 2 20:15:34 2010] VALID RECV REGISTER<BR> sip:3-1@domain.com (10.1.40.7:43899) to sip:domain.com<BR> 0(2934) ERROR: <script>: USER 3 DETECTED<BR> 0(2934) ERROR: <script>: ROUTED to 3 PBX<BR> 0(2934) ERROR: <script>: mark#1<BR> 0(2934) ERROR: <script>: host is now domain.com; all is sip:domain.com || sip:xxx.xxx.xxx.166:5060<BR> 0(2934) ERROR: <script>: [Thu Dec 2 20:15:35 2010] VALID RECV REGISTER<BR> sip:3-1@domain.com (10.1.40.7:43899) to sip:domain.com<BR> 0(2934) ERROR: <script>: USER 3 DETECTED<BR> 0(2934) ERROR: <script>: ROUTED to 3 PBX<BR> 0(2934) ERROR: <script>: mark#1<BR> 0(2934) ERROR: <script>: host is now domain.com; all is sip:domain.com || sip:xxx.xxx.xxx.166:5060<BR> 1(2935) ERROR: <script>: FAILED FAILURE_ROUTE[1]<BR> 1(2935) ERROR: <script>: MARKING DEAD HOST sip:xxx.xxx.xxx.166:5060<BR> 1(2935) ERROR: <script>: TIMEOUT!<BR> 0(2934) ERROR: <script>: [Thu Dec 2 20:15:50 2010] VALID RECV REGISTER<BR> sip:3-1@domain.com (10.1.40.7:29372) to sip:domain.com<BR> 0(2934) ERROR: <script>: USER 3 DETECTED<BR> 0(2934) ERROR: <script>: ROUTED to 3 PBX<BR> 0(2934) ERROR: <script>: mark#1<BR> 0(2934) ERROR: <script>: host is now domain.com; all is sip:domain.com || sip:xxx.xxx.xxx.165:5060<BR> 0(2934) ERROR: <script>: [Thu Dec 2 20:15:50 2010] VALID RECV REGISTER<BR> sip:3-1@domain.com (10.1.40.7:29372) to sip:domain.com<BR> 0(2934) ERROR: <script>: USER 3 DETECTED<BR> 0(2934) ERROR: <script>: ROUTED to 3 PBX<BR> 0(2934) ERROR: <script>: mark#1<BR> 0(2934) ERROR: <script>: host is now domain.com; all is sip:domain.com || sip:xxx.xxx.xxx.165:5060<BR> 1(2935) ERROR: <script>: FAILED FAILURE_ROUTE[1]<BR> 1(2935) ERROR: <script>: MARKING DEAD HOST sip:xxx.xxx.xxx.165:5060<BR> 1(2935) ERROR: <script>: TIMEOUT!<BR> 0(2934) ERROR: <script>: [Thu Dec 2 20:15:55 2010] VALID RECV REGISTER<BR> sip:3-1@domain.com (10.1.40.7:29373) to sip:domain.com<BR> 0(2934) ERROR: <script>: USER 3 DETECTED<BR> 0(2934) ERROR: <script>: ROUTED to 3 PBX<BR>
<BR>
<BR>
:::::Core file from crash with 1 invalid host:::::<BR>Program terminated with signal 8, Arithmetic exception.<BR>#0 0x0069e92b in ds_select_dst (msg=0x82ffb00, set=2, alg=7, mode=0)<BR> at dispatch.c:1720<BR>1720 i = (i+1)%(idx->nr-1);<BR>
<BR>
<BR>
<BR>
Thanks for any help on this one!<BR>
-Eric<BR>                                            </body>
</html>