diff --git a/Lua_RtpEngine_daisyChaining/README.md b/Lua_RtpEngine_daisyChaining/README.md index 176386f..d915714 100644 --- a/Lua_RtpEngine_daisyChaining/README.md +++ b/Lua_RtpEngine_daisyChaining/README.md @@ -1,4 +1,4 @@ -# Link Two RTP Engines by Daisyy +# Link Two RTP Engines by Daisy Chain Linking Ensure you have added two RTP engines in rtpengine list file @@ -31,7 +31,25 @@ The outout of this should be recheck_ticks: 0 } ``` -### debugging + +Test the system +```bash + sipp -sf sipp_uac_rtpecho.xml -s 300 :5066 -i -trace_err -m 1 +``` + +## Run + +Kamailio +```bash + kamailio -f kamailio_lua.cfg -Ee +``` + +RTPengine via config +```bash + +``` + +### Debugging **Issue1** ERROR: connect_unix_sock: connect(/var/run/kamailio//kamailio_ctl): No such file or directory [2] **Solution** ensure the ctl modules is used and connectred to correct ip of app server @@ -122,17 +140,11 @@ module 'cjson' not found: no file '/usr/local/lib/lua/5.1/cjson/init.lua' no file '/usr/share/lua/5.1/cjson.lua' no file '/usr/share/lua/5.1/cjson/init.lua' - no file '/home/ubuntu/zentrunk-app-server/zen-trunk/src/cjson.lua' - no file '/home/ubuntu/zentrunk-app-server/zen-trunk/src/utils/cjson.lua' - no file '/home/ubuntu/zentrunk-app-server/zen-trunk/src/core/cjson.lua' no file '/etc/kamailio/cjson.lua' no file '/etc/kamailio/utils/cjson.lua' no file '/etc/kamailio/cjson.lua' no file '/etc/kamailio/utils/cjson.lua' no file '/etc/kamailio/core/cjson.lua' - no file '../../zen-trunk/src/cjson.lua' - no file '../../zen-trunk/src/utils/cjson.lua' - no file '../../zen-trunk/src/core/cjson.lua' no file './cjson.so' no file '/usr/local/lib/lua/5.1/cjson.so' no file '/usr/lib/x86_64-linux-gnu/lua/5.1/cjson.so' @@ -154,4 +166,24 @@ which will create even more issues later Also you can use the modules directly instead of installing via luarocks ```bash sudo apt get install lua-cjson -``` \ No newline at end of file +``` + +**Issue 5** base58.lua lua module +```bash + 4(5541) ERROR: app_lua [app_lua_api.c:326]: lua_sr_init_child(): error from Lua: ...main.lua module 'base58' not found: + no field package.preload['base58'] + no file './base58.lua' + no file '/usr/local/share/lua/5.1/base58.lua' + no file '/usr/local/share/lua/5.1/base58/init.lua' + no file '/usr/local/lib/lua/5.1/base58.lua' + no file '/usr/local/lib/lua/5.1/base58/init.lua' + no file '/usr/share/lua/5.1/base58.lua' + no file '/usr/share/lua/5.1/base58/init.lua' +``` +\ +**solution** base58 is decoder and encoder for strings. +Just as explained in issue no 4 some dependencies are lua version specific such as this one +```bash +> luarocks install base58 +Error: base58 supports only Lua 5.1 but not Lua 5.2. +``` \ No newline at end of file diff --git a/Lua_RtpEngine_daisyChaining/kamailio_lua.cfg b/Lua_RtpEngine_daisyChaining/kamailio_lua.cfg index dffe82c..ad61aea 100644 --- a/Lua_RtpEngine_daisyChaining/kamailio_lua.cfg +++ b/Lua_RtpEngine_daisyChaining/kamailio_lua.cfg @@ -3,14 +3,15 @@ ####### Defined Values ######### -#!substdef "!MY_IP_ADDR!192.168.1.109!g" -#!substdef "!MY_EXTERNAL_IP!59.89.18.233!g" +#!substdef "!MY_IP_ADDR!172.20.10.8!g" +#!substdef "!MY_EXTERNAL_IP!172.20.10.8!g" + #!substdef "!MY_UDP_PORT!5066!g" #!substdef "!MY_TCP_PORT!8086!g" +#!substdef "!MY_CTL_PORT!2046!g" #!substdef "!MY_UDP_ADDR!udp:MY_IP_ADDR:MY_UDP_PORT!g" #!substdef "!MY_TCP_ADDR!tcp:MY_IP_ADDR:MY_TCP_PORT!g" - # Dispatcher File #!define DISPATCHER_FILE "/Users/altanaibisht/kamilioexamples/Lua_RtpEngine_daisyChaining/dbtext/dispatcher.list" @@ -18,6 +19,10 @@ #!define ROUTE_LUA "/Users/altanaibisht/kamilioexamples/Lua_RtpEngine_daisyChaining/main.lua" #!define WITH_DBTEXT +#!ifdef WITH_DBTEXT +# - database URL - used to connect to database server by rtpengine,dispatcher +#!define DBURL "text:///Users/altanaibisht/kamilioexamples/Lua_RtpEngine_daisyChaining/dbtext" +#!endif ####### Global Parameters ######### @@ -35,14 +40,11 @@ memlog = 5 # log setting log_facility=LOG_LOCAL0 -#!ifdef WITH_DBTEXT -# - database URL - used to connect to database server by rtpengine,dispatcher -#!define DBURL "text:///Users/altanaibisht/kamilioexamples/Lua_RtpEngine_daisyChaining/dbtext" -#!endif - children=4 async_workers=8 +#listen = MY_UDP_ADDR advertise MY_EXTERNAL_IP:MY_UDP_PORT +#listen = MY_TCP_ADDR advertise MY_EXTERNAL_IP:MY_TCP_PORT listen=MY_UDP_ADDR listen=MY_TCP_ADDR @@ -96,7 +98,7 @@ modparam("dispatcher", "ds_ping_interval", 10) modparam("nathelper", "received_avp", "$avp(s:rcv)") # ----- ctl ------ - modparam("ctl", "binrpc", "tcp:192.168.1.109:2046") +modparam("ctl", "binrpc","tcp:127.0.0.1:MY_CTL_PORT" ) # ----- app_lua params ---- modparam("app_lua", "reload", 1) diff --git a/Lua_RtpEngine_daisyChaining/main.lua b/Lua_RtpEngine_daisyChaining/main.lua index 3f42fc9..6b1d371 100644 --- a/Lua_RtpEngine_daisyChaining/main.lua +++ b/Lua_RtpEngine_daisyChaining/main.lua @@ -13,12 +13,12 @@ FLT_DIALOG = 4 local rtpengine_codecs_flag = " codec-strip-all codec-offer-PCMA codec-offer-pcma codec-offer-PCMU codec-offer-pcmu codec-offer-telephone-event codec-offer-TELEPHONE-EVENT" -- offer/answer for RTPengine1 -local rtpengine_offer_flag1 = "ICE=remove RTP/AVPF full-rtcp-attribute direction=external direction=external replace-origin replace-session-connection record-call=yes " .. rtpengine_codecs_flag -local rtpengine_answer_flag1 = "ICE=remove RTP/AVPF full-rtcp-attribute replace-origin replace-session-connection record-call=yes" +local rtpengine_offer_flag1 = "ICE=remove RTP/AVP full-rtcp-attribute direction=internal direction=internal replace-origin replace-session-connection record-call=yes " .. rtpengine_codecs_flag +local rtpengine_answer_flag1 = "ICE=remove RTP/AVP full-rtcp-attribute replace-origin replace-session-connection record-call=yes" -- offer/answer for RTPengine2 -local rtpengine_offer_flag2 = "ICE=remove RTP/AVPF full-rtcp-attribute direction=external direction=external replace-origin replace-session-connection" .. rtpengine_codecs_flag -local rtpengine_answer_flag2 = "ICE=remove RTP/AVPF full-rtcp-attribute replace-origin replace-session-connection" +local rtpengine_offer_flag2 = "ICE=remove RTP/AVP full-rtcp-attribute direction=inetrnal direction=external replace-origin replace-session-connection" +local rtpengine_answer_flag2 = "ICE=remove RTP/AVP full-rtcp-attribute replace-origin replace-session-connection" --[[-------------------------------------------------------------------------- ----------------------- Request Routing Logic --------------------------] @@ -76,11 +76,11 @@ function ksr_route_reqinit(user_agent) end -- sanity Check - local sanity_check = KSR.sanity.sanity_check(1511, 7) - if sanity_check < 0 then - KSR.log("err", "received invalid sip packet \n") - KSR.x.exit() - end +-- local sanity_check = KSR.sanity.sanity_check(1511, 7) +-- if sanity_check < 0 then +-- KSR.log("err", "received invalid sip packet \n") +-- KSR.x.exit() +-- end KSR.log("info", "initial request check is passed \n") return 1 @@ -144,7 +144,7 @@ function ksr_route_request_process(request_method) KSR.log("info", " --------------- going to call set_rtpengine_set on RTPnegine 1 \n"); KSR.rtpengine.set_rtpengine_set("1") - KSR.log("info", " rtpengine_offer_flag1 " .. rtpengine_offer_flag1); + KSR.log("info", " rtpengine_offer_flag1 " .. rtpengine_offer_flag1 .. "\n"); if KSR.rtpengine.rtpengine_offer(rtpengine_offer_flag1) > 0 then KSR.log("info", "received success reply for rtpengine offer 1 \n") else @@ -165,7 +165,7 @@ function ksr_route_request_process(request_method) KSR.log("info", " --------------- going to call set_rtpengine_set on RTPnegine 2 \n"); KSR.rtpengine.set_rtpengine_set("2") - KSR.log("info", " rtpengine_offer_flag2 " .. rtpengine_offer_flag2); + KSR.log("info", " rtpengine_offer_flag2 " .. rtpengine_offer_flag2 .. "\n"); if KSR.rtpengine.rtpengine_offer(rtpengine_offer_flag2) > 0 then KSR.log("info", "received success reply for rtpengine offer 2 \n") else @@ -295,13 +295,13 @@ function ksr_route_withindlg(request_method) -- Relay ACK if it matches with a transaction. Else ignore and discard KSR.log("info", "in-dialog request,not loose_route \n") if request_method == "ACK" then - if KSR.tm.t_check_trans() > 0 then - -- no loose-route, but stateful ACK; must be an ACK after a 487 or e.g. 404 from upstream server - KSR.log("info", "in-dialog request,not loose_route with transaction - relaying \n") - ksr_route_relay(request_method); - end - KSR.log("err", "in-dialog request,not loose_route without transaction, exit \n") - KSR.x.exit() + -- if KSR.tm.t_check_trans() > 0 then + -- no loose-route, but stateful ACK; must be an ACK after a 487 or e.g. 404 from upstream server + KSR.log("info", "in-dialog request,not loose_route with transaction - relaying \n") + ksr_route_relay(request_method); + -- end + -- KSR.log("err", "in-dialog request,not loose_route without transaction, exit \n") + -- KSR.x.exit() end KSR.log("err", "received invalid sip packet,sending 404 \n"); @@ -338,9 +338,47 @@ function ksr_route_relay(req_method) if KSR.tm.t_is_set("branch_route") < 0 then KSR.tm.t_on_branch("ksr_branch_manage"); end + KSR.log("info", "sending delete command to rtpengine \n") + + -- send delet command to rtpengine based on callid + KSR.log("info", "ksr_dialog_event end of failed : sending delete command to rtpengine \n") + KSR.rtpengine.set_rtpengine_set("2") + KSR.rtpengine.rtpengine_delete0() + + KSR.rtpengine.set_rtpengine_set("1") KSR.rtpengine.rtpengine_delete0() + -- call querry in attenmpt to populate mos scores + KSR.rtpengine.rtpengine_query0() + + KSR.log("info", " mos avg " .. KSR.pv.get("$avp(mos_average)") or 0) + KSR.log("info", " mos max " .. KSR.pv.get("$avp(mos_max)") or 0) + KSR.log("info", " mos min " .. KSR.pv.get("$avp(mos_min)") or 0) + + KSR.log("info", "mos_average_packetloss_pv" .. KSR.pv.get("$avp(mos_average_packetloss)") or 0) + KSR.log("info", "mos_average_jitter_pv" .. KSR.pv.get("$avp(mos_average_jitter)") or 0) + KSR.log("info", "mos_average_roundtrip_pv" .. KSR.pv.get("$avp(mos_average_roundtrip)") or 0) + KSR.log("info", "mos_average_samples_pv" .. KSR.pv.get("$avp(mos_average_samples)") or 0) + + KSR.log("info", "mos_min_pv" .. KSR.pv.get("$avp(mos_min)") or 0) + KSR.log("info", "mos_min_at_pv" .. KSR.pv.get("$avp(mos_min_at)")) + KSR.log("info", "mos_min_packetloss_pv" .. KSR.pv.get("$avp(mos_min_packetloss)") or 0) + KSR.log("info", "mos_min_jitter_pv" .. KSR.pv.get("$avp(mos_min_jitter)") or 0) + KSR.log("info", "mos_min_roundtrip_pv" .. KSR.pv.get("$avp(mos_min_roundtrip)") or 0) + + -- -- KSR.log("info", "mos_A_label_pv" .. KSR.pv.get("$avp(mos_A_label)") + -- KSR.log("info", "mos_average_packetloss_A_pv" .. KSR.pv.get("$avp(mos_average_packetloss_A)")) + -- KSR.log("info", "mos_average_jitter_A_pv" .. KSR.pv.get("$avp(mos_average_jitter_A)")) + -- KSR.log("info", "mos_average_roundtrip_A_pv" .. KSR.pv.get("$avp(mos_average_roundtrip_A)")) + -- KSR.log("info", "mos_average_A_pv" .. KSR.pv.get("$avp(mos_average_A)")) + -- + -- -- KSR.log("info", "mos_B_label_pv" .. KSR.pv.get("$avp(mos_B_label)")) + -- KSR.log("info", "mos_average_packetloss_B_pv" .. KSR.pv.get("$avp(mos_average_packetloss_B)")) + -- KSR.log("info", "mos_average_jitter_B_pv" .. KSR.pv.get("$avp(mos_average_jitter_B)")) + -- KSR.log("info", "mos_average_roundtrip_B_pv" .. KSR.pv.get("$avp(mos_average_roundtrip_B)")) + -- KSR.log("info", "mos_average_B_pv" .. KSR.pv.get("$avp(mos_average_B)")) + elseif req_method == "INVITE" or req_method == "UPDATE" then if KSR.tm.t_is_set("branch_route") < 0 then KSR.tm.t_on_branch("ksr_branch_manage") @@ -358,16 +396,17 @@ function ksr_route_relay(req_method) -- since rtp engine offer is set alreday just set the anser path KSR.tm.t_on_reply("ksr_onreply_manage_answer"); end - - elseif req_method == "ACK" then - if bye_rcvd ~= "true" and KSR.textops.has_body_type("application/sdp") > 0 then - KSR.log("info", "request contains sdp, sending answer command to rtpengine \n") - KSR.rtpengine.rtpengine_answer() - end end - KSR.log("info", " Relay to destination "); + KSR.log("info", " Relay to destination \n"); + + -- append any outgoung headers + local header = "X-PlivoGateways" + local carrierstr = "sip:34.237.124.37:5080;timeout=120;carrierid=1^" + KSR.hdr.append(header .. ": " .. carrierstr .. "\r\n") + KSR.tm.t_relay() + -- KSR.tm.t_relay("udp","13.126.163.153","5060") KSR.x.exit() end @@ -467,7 +506,7 @@ function ksr_onreply_manage_answer() local bye_rcvd = KSR.pv.get("$dlg_var(bye_rcvd)") or "false"; if bye_rcvd ~= "true" and KSR.textops.has_body_type("application/sdp") > 0 then - KSR.log("info", "-------------200 OK with SDP received --------------- do RTP engine SDP manipulation and then \n ") + KSR.log("info", "------------- 200 OK with SDP received --------------- do RTP engine SDP manipulation and then \n ") KSR.log("info", "response contains sdp, answer to rtpengine \n") -- local rtpengine_answer_flag = "ICE=remove RTP/AVPF full-rtcp-attribute direction=internal direction=internal replace-origin replace-session-connection record-call=no" @@ -485,7 +524,7 @@ function ksr_onreply_manage_answer() KSR.log("info", " Answer : --------------- going to call set_rtpengine_set on RTPnegine 2 \n"); KSR.rtpengine.set_rtpengine_set("2") - KSR.log("info", " rtpengine_answer_flag2 " .. rtpengine_answer_flag2); + KSR.log("info", " rtpengine_answer_flag2 " .. rtpengine_answer_flag2 .. "\n"); if KSR.rtpengine.rtpengine_answer(rtpengine_answer_flag2) > 0 then KSR.log("info", "Answer : received success reply for rtpengine answer 2 \n") else @@ -506,7 +545,7 @@ function ksr_onreply_manage_answer() KSR.log("info", " Answer : --------------- going to call set_rtpengine_set on RTPnegine 1 \n"); KSR.rtpengine.set_rtpengine_set("1") - KSR.log("info", " Answer : rtpengine_answer_flag1 " .. rtpengine_answer_flag1); + KSR.log("info", " Answer : rtpengine_answer_flag1 " .. rtpengine_answer_flag1 .. "\n"); if KSR.rtpengine.rtpengine_answer(rtpengine_answer_flag1) > 0 then KSR.log("info", "Answer : received success reply for rtpengine answer 1 \n") else @@ -559,6 +598,10 @@ function ksr_failure_manage() -- send delet command to rtpengine based on callid KSR.log("info", "failure route: sending delete command to rtpengine \n") + KSR.rtpengine.set_rtpengine_set("2") + KSR.rtpengine.rtpengine_delete0() + + KSR.rtpengine.set_rtpengine_set("1") KSR.rtpengine.rtpengine_delete0() -- check trsansaction state and drop if cancelled @@ -575,7 +618,6 @@ end Name: ksr_htable_event(evname) Desc: callback for the given htable event-name ------------------------------------------------------------------------------]] - function ksr_htable_event(evname) KSR.log("info", "htable module triggered event - " .. evname .. "\n"); return 1; @@ -594,36 +636,6 @@ function ksr_dialog_event(evname) if not call_id then KSR.log("info", "no callid for this call") end - - KSR.log("info", " delete RTPengine") - KSR.rtpengine.rtpengine_delete0() - - KSR.log("info", " mos avg " .. KSR.pv.get("$avp(mos_average)")) - KSR.log("info", " mos max " .. KSR.pv.get("$avp(mos_max)")) - KSR.log("info", " mos min " .. KSR.pv.get("$avp(mos_min)")) - - KSR.log("info", "mos_average_packetloss_pv" .. KSR.pv.get("$avp(mos_average_packetloss)")) - KSR.log("info", "mos_average_jitter_pv" .. KSR.pv.get("$avp(mos_average_jitter)")) - KSR.log("info", "mos_average_roundtrip_pv" .. KSR.pv.get("$avp(mos_average_roundtrip)")) - KSR.log("info", "mos_average_samples_pv" .. KSR.pv.get("$avp(mos_average_samples)")) - - KSR.log("info", "mos_min_pv" .. KSR.pv.get("$avp(mos_min)")) - KSR.log("info", "mos_min_at_pv" .. KSR.pv.get("$avp(mos_min_at)")) - KSR.log("info", "mos_min_packetloss_pv" .. KSR.pv.get("$avp(mos_min_packetloss)")) - KSR.log("info", "mos_min_jitter_pv" .. KSR.pv.get("$avp(mos_min_jitter)")) - KSR.log("info", "mos_min_roundtrip_pv" .. KSR.pv.get("$avp(mos_min_roundtrip)")) - - -- KSR.log("info", "mos_A_label_pv" .. KSR.pv.get("$avp(mos_A_label)") - KSR.log("info", "mos_average_packetloss_A_pv" .. KSR.pv.get("$avp(mos_average_packetloss_A)")) - KSR.log("info", "mos_average_jitter_A_pv" .. KSR.pv.get("$avp(mos_average_jitter_A)")) - KSR.log("info", "mos_average_roundtrip_A_pv" .. KSR.pv.get("$avp(mos_average_roundtrip_A)")) - KSR.log("info", "mos_average_A_pv" .. KSR.pv.get("$avp(mos_average_A)")) - - -- KSR.log("info", "mos_B_label_pv" .. KSR.pv.get("$avp(mos_B_label)")) - KSR.log("info", "mos_average_packetloss_B_pv" .. KSR.pv.get("$avp(mos_average_packetloss_B)")) - KSR.log("info", "mos_average_jitter_B_pv" .. KSR.pv.get("$avp(mos_average_jitter_B)")) - KSR.log("info", "mos_average_roundtrip_B_pv" .. KSR.pv.get("$avp(mos_average_roundtrip_B)")) - KSR.log("info", "mos_average_B_pv" .. KSR.pv.get("$avp(mos_average_B)")) end end @@ -644,6 +656,9 @@ function ksr_xhttp_event(evname) end function service_callback() + -- KSR.log("info", "request-uri - " .. tostring(KSR.pv.get("$ru")) .. "\n") + -- local request_method = KSR.pv.get("$rm") or ""; + -- ksr_route_relay(request_method); local dispatch_set = 1 local routing_policy = "8" diff --git a/Lua_RtpEngine_daisyChaining/main_2.lua b/Lua_RtpEngine_daisyChaining/main_2.lua index 38746d7..52826cc 100644 --- a/Lua_RtpEngine_daisyChaining/main_2.lua +++ b/Lua_RtpEngine_daisyChaining/main_2.lua @@ -9,6 +9,9 @@ FLT_NATS = 1 -- the UAC is behind a NAT , transaction flag FLB_NATB = 2 -- the UAS is behind a NAT , branch flag FLT_DIALOG = 4 +local rtpengine_offer_flag = "ICE=remove RTP/AVPF full-rtcp-attribute direction=internal direction=internal replace-origin replace-session-connection record-call=no" +local rtpengine_answer_flag = "ICE=remove RTP/AVPF full-rtcp-attribute direction=internal direction=internal replace-origin replace-session-connection record-call=no" + --[[-------------------------------------------------------------------------- ------------------------- Request Routing Logic --------------------------]] function ksr_request_route() @@ -280,7 +283,6 @@ function ksr_route_relay(req_method) if bye_rcvd ~= "true" and KSR.textops.has_body_type("application/sdp") > 0 then KSR.log("info", "method contains sdp, creating offer to rtpengine \n") - local rtpengine_offer_flag = "ICE=remove RTP/AVPF full-rtcp-attribute direction=internal direction=internal replace-origin replace-session-connection record-call=no" KSR.rtpengine.set_rtpengine_set2("1","2") @@ -398,7 +400,6 @@ function ksr_onreply_manage_answer() local bye_rcvd = KSR.pv.get("$dlg_var(bye_rcvd)") or "false"; if bye_rcvd ~= "true" and KSR.textops.has_body_type("application/sdp") > 0 then KSR.log("info", "response contains sdp, answer to rtpengine \n") - local rtpengine_answer_flag = "ICE=remove RTP/AVPF full-rtcp-attribute direction=internal direction=internal replace-origin replace-session-connection record-call=no" if KSR.rtpengine.rtpengine_answer(rtpengine_answer_flag) > 0 then KSR.log("info", "received success reply for rtpengine answer from instance \n") else diff --git a/Lua_RtpEngine_daisyChaining/rtpengine.conf b/Lua_RtpEngine_daisyChaining/rtpengine.conf new file mode 100644 index 0000000..e69de29 diff --git a/Lua_RtpEngine_daisyChaining/sipp_uac_rtpecho.xml b/Lua_RtpEngine_daisyChaining/sipp_uac_rtpecho.xml new file mode 100644 index 0000000..e69de29 diff --git a/Lua_RtpEngine_daisyChaining/uas_31867_errors.log b/Lua_RtpEngine_daisyChaining/uas_31867_errors.log deleted file mode 100644 index c31e42e..0000000 --- a/Lua_RtpEngine_daisyChaining/uas_31867_errors.log +++ /dev/null @@ -1,12 +0,0 @@ -sipp: The following events occured: -2020-05-13 10:42:38.917068 1589346758.917068: Aborting call on unexpected message for Call-Id '617c5ca02ba53e96-31301@192.168.1.109': while expecting 'INVITE' (index 0), received 'OPTIONS sip:127.0.0.1:8001 SIP/2.0 -Via: SIP/2.0/UDP 192.168.1.109:5066;branch=z9hG4bK249c.82716ea2000000000000000000000000.0 -To: -From: ;tag=086aca3f7c46c3defbc3be93ba62146e-6f61bcc4 -CSeq: 10 OPTIONS -Call-ID: 617c5ca02ba53e96-31301@192.168.1.109 -Max-Forwards: 70 -Content-Length: 0 -User-Agent: kamailio (5.3.2 (x86_64/darwin)) - -'. diff --git a/Lua_dbsqlite/README.md b/Lua_dbsqlite/README.md index c140bad..6f30dcc 100644 --- a/Lua_dbsqlite/README.md +++ b/Lua_dbsqlite/README.md @@ -41,6 +41,12 @@ ERROR: database engine not specified, please setup one in the config script ``` Update kamctlrc withe engine such as BENGINE=SQLITE + +find kamctlrc +```bash +sudo find / -name kamctlrc +``` + My kamctlrc is at location /usr/local/etc/kamailio/kamctlrc ```bash ## the SIP domain @@ -99,6 +105,7 @@ Then give the location of create DB to kamailio config such as /usr/local/sbin/kamailio.db ``` +## Debugging **Issue1** db not opened ```bash @@ -107,4 +114,10 @@ Then give the location of create DB to kamailio config such as **Solution** ensure that sqlite is installed ```bash apt install sqlite3 +``` + +**Issue 2** could not load the script kamdbctl.sqlite +```bash +-e \E[37;31mERROR: could not load the script in /usr/local/lib64/kamailio//kamctl/kamdbctl.sqlite for database engine SQLITE +-e \E[37;31mERROR: database engine not loaded - tried 'SQLITE' ``` \ No newline at end of file