Description

event_callback for app_lua is not working

Troubleshooting

Reproduction

----- app_lua params ----

  1. load the htable and app_lua with following parameters
    modparam("app_lua", "reload", 1)
    modparam("app_lua", "load", "/usr/local/etc/kamailio/route.lua")
    modparam("htable", "event_callback", "ksr_htable_event")

-- event callback function implemented in Lua
function ksr_htable_event(evname)
KSR.info("===== htable module triggered event: " .. evname .. "\n");
return 1;
end

Debugging Data

May 3 12:15:19 ip-172-31-4-160 kamailio[9797]: ERROR: app_lua [app_lua_api.c:652]: app_lua_run_ex(): lua loading state not initialized (call: ksr_htable_event)

(paste your debugging data here)

Log Messages

May  3 12:15:19 ip-172-31-4-160 kamailio[9797]: ERROR: app_lua [app_lua_api.c:652]: app_lua_run_ex(): lua loading state not initialized (call: ksr_htable_event)

SIP Traffic

(paste your sip traffic here)

Possible Solutions

Additional Information

root@ip-172-31-4-160:/usr/local/etc/kamailio# kamailio -v
version: kamailio 5.1.3 (x86_64/linux) 
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown 
compiled on 15:16:50 Apr 24 2018 with gcc 4.8.4
root@ip-172-31-4-160:/usr/local/etc/kamailio# uname -a
Linux ip-172-31-4-160 3.13.0-143-generic #192-Ubuntu SMP Tue Feb 27 10:45:36 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.