Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- root@work:/usr/local/kamailio/etc/kamailio# cat ./lua.cfg
- ####### Global Parameters #########
- ### LOG Levels: 3=DBG, 2=INFO, 1=NOTICE, 0=WARN, -1=ERR
- debug=0
- log_stderror=no
- memdbg=5
- memlog=5
- log_facility=LOG_LOCAL0
- fork=no
- children=4
- /* uncomment the next line to disable TCP (default on) */
- disable_tcp=yes
- /* uncomment the next line to disable the auto discovery of local aliases
- based on reverse DNS on IPs (default on) */
- auto_aliases=no
- /* add local domain aliases */
- #alias="sip.mydomain.com"
- /* uncomment and configure the following line if you want Kamailio to
- bind on a specific interface/port/proto (default bind on all available) */
- listen=udp:0.0.0.0:5060
- /* port to listen to
- * - can be specified more than once if needed to listen on many ports */
- port=5060
- ####### Modules Section ########
- mpath="/usr/local/kamailio/lib64/kamailio/modules/"
- loadmodule "tm.so"
- loadmodule "sl.so"
- loadmodule "textops.so"
- loadmodule "xlog.so"
- loadmodule "corex.so"
- loadmodule "pv.so"
- loadmodule "db_mysql.so"
- loadmodule "sqlops.so"
- modparam("sqlops", "sqlcon", "a=>mysql://ser:ser@127.0.0.1/ser")
- loadmodule "mi_fifo.so"
- modparam("mi_fifo", "fifo_name", "/tmp/kamailio_fifo")
- #!ifdef WITH_DEBUG
- loadmodule "debugger.so"
- modparam("debugger", "cfgtrace", 1)
- #!endif
- loadmodule "app_lua.so"
- modparam("app_lua", "load", "/usr/local/kamailio/etc/kamailio/routing.lua")
- modparam("app_lua", "register", "sl")
- modparam("app_lua", "register", "tm")
- modparam("app_lua", "register", "sqlops")
- ####### Routing Logic ########
- route {
- if(!lua_runstring("route_request([[MAIN]])"))
- {
- xdbg("SCRIPT: failed to execute lua script!\n");
- }
- exit;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement