From tegamjg@gmail.com Mon Apr 4 08:07:42 2016 From: TEG AMJG To: sr-users@lists.kamailio.org Subject: [SR-Users] dispatcher [dispatch.c:1416]: ds_load_remove(): cannot find load for (from asterisk call-id) Date: Mon, 04 Apr 2016 03:07:36 -0300 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1783606555==" --===============1783606555== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi I am new to Kamailio and i am just trying to setup a kamailio (v4.2.3) dispatcher to distribute calls to 2 asterisk using the call load distribution algorithm (alg 10). I started to test and see how all it is working and in the logs appears that the call load record it cannot be found. - ERROR: dispatcher [dispatch.c:1416]: ds_load_remove(): cannot find load for (call id generated by asterisk) I am getting this error trying a 2 call leg conversation when asterisk is creating the BYE message destinated to the callee after receiving a BYE message from the caller, and the BYE message by Asterisk reach Kamailio to then apply the ds_load_update function >From what i understand about ds_load_update it is that it sets the load to an specific destination if Kamailio receives a 2xx reply of an INVITE message, and removes it if Kamailio receives a BYE message based from the Call-id received in that message, where it is actually failing in my implementation at the moment Here are the blocks of code of the dispatcher parameters and where the function ds_load_update() is being used: #!ifdef WITH_LOADBALANCE #Parameters using Dispatcher from DB # ---------- modparam("dispatcher", "db_url", DBURL) modparam("dispatcher", "table_name", "dispatcher") # ---------- #Enabling failover mechanism # ----------- modparam("dispatcher", "flags", 2) # ----------- #Setting dispatcher parameters in AVP # ----------- modparam("dispatcher", "dst_avp", "$avp(AVP_DST)") modparam("dispatcher", "grp_avp", "$avp(AVP_GRP)") modparam("dispatcher", "cnt_avp", "$avp(AVP_CNT)") modparam("dispatcher", "dstid_avp", "$avp(dsdstid)") # ----------- #Setting dispatcher result in PV variables # ----------- modparam("dispatcher", "attrs_pvname", "$var(attrs)") # ----------- #Enabling dispatcher algorithm according to call loads # ----------- modparam("dispatcher", "ds_hash_size",8) modparam("dispatcher", "ds_hash_expire", 3600) modparam("dispatcher", "ds_hash_initexpire", 60) # ----------- # Setting parameters for probing dispatcher destinations # ----------- modparam("dispatcher", "ds_ping_interval", 20) modparam("dispatcher", "ds_ping_from", "sip:kamailio1@") modparam("dispatcher", "ds_probing_mode", 1) modparam("dispatcher", "ds_probing_threshhold", 2) modparam("dispatcher", "ds_ping_reply_codes", "class=3D2;code=3D480;code=3D40= 4") # ----------- ... route[WITHINDLG] { if (has_totag()) { # sequential request withing a dialog should # take the path determined by record-routing #!ifdef WITH_LOADBALANCE if(is_method("BYE|CANCEL")){ xlog("L_ERROR","UBICAR BYE ds_load_update requesturi=3D$ru from=3D$fu method=3D$rm callid=3D$ci to=3D$tu reply=3D$mt rrcode=3D$rr rcode= =3D$rs\n"); ds_load_update(); } #!endif ... } ... onreply_route[MANAGE_REPLY] { #!ifdef WITH_LOADBALANCE if(is_method("INVITE")) { if(status=3D~"2[0-9][0-9]") { xlog("L_ERROR","UBICAR setting ds_load_update requesturi=3D$ru from=3D$fu method=3D$rm callid=3D$ci to=3D$tu reply=3D$mt r= rcode=3D$rr rcode=3D$rs"); ds_load_update(); }else if(status=3D~"[3-7][0-9][0-9]") { ds_load_unset(); } } #!endif if(status=3D~"[12][0-9][0-9]"){ route(NATMANAGE); } } This is what i am getting from logs after the 2 call legs conversation completes: kam1 /usr/sbin/kamailio[4082]: ERROR: