Advertisement
Guest User

Kamailio config

a guest
Aug 21st, 2014
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.72 KB | None | 0 0
  1. root@work:/usr/local/kamailio/etc/kamailio# cat ./lua.cfg
  2.  
  3. ####### Global Parameters #########
  4.  
  5. ### LOG Levels: 3=DBG, 2=INFO, 1=NOTICE, 0=WARN, -1=ERR
  6. debug=0
  7. log_stderror=no
  8.  
  9. memdbg=5
  10. memlog=5
  11.  
  12. log_facility=LOG_LOCAL0
  13.  
  14. fork=no
  15. children=4
  16.  
  17. /* uncomment the next line to disable TCP (default on) */
  18. disable_tcp=yes
  19.  
  20. /* uncomment the next line to disable the auto discovery of local aliases
  21. based on reverse DNS on IPs (default on) */
  22. auto_aliases=no
  23.  
  24. /* add local domain aliases */
  25. #alias="sip.mydomain.com"
  26.  
  27. /* uncomment and configure the following line if you want Kamailio to
  28. bind on a specific interface/port/proto (default bind on all available) */
  29. listen=udp:0.0.0.0:5060
  30.  
  31. /* port to listen to
  32. * - can be specified more than once if needed to listen on many ports */
  33. port=5060
  34.  
  35.  
  36. ####### Modules Section ########
  37.  
  38. mpath="/usr/local/kamailio/lib64/kamailio/modules/"
  39.  
  40. loadmodule "tm.so"
  41. loadmodule "sl.so"
  42. loadmodule "textops.so"
  43. loadmodule "xlog.so"
  44. loadmodule "corex.so"
  45. loadmodule "pv.so"
  46.  
  47. loadmodule "db_mysql.so"
  48. loadmodule "sqlops.so"
  49. modparam("sqlops", "sqlcon", "a=>mysql://ser:ser@127.0.0.1/ser")
  50.  
  51. loadmodule "mi_fifo.so"
  52. modparam("mi_fifo", "fifo_name", "/tmp/kamailio_fifo")
  53.  
  54.  
  55. #!ifdef WITH_DEBUG
  56. loadmodule "debugger.so"
  57. modparam("debugger", "cfgtrace", 1)
  58. #!endif
  59.  
  60. loadmodule "app_lua.so"
  61. modparam("app_lua", "load", "/usr/local/kamailio/etc/kamailio/routing.lua")
  62. modparam("app_lua", "register", "sl")
  63. modparam("app_lua", "register", "tm")
  64. modparam("app_lua", "register", "sqlops")
  65.  
  66.  
  67. ####### Routing Logic ########
  68.  
  69. route {
  70.  
  71. if(!lua_runstring("route_request([[MAIN]])"))
  72. {
  73. xdbg("SCRIPT: failed to execute lua script!\n");
  74. }
  75. exit;
  76. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement