aboutsummaryrefslogtreecommitdiffstats
path: root/main/kamailio/kamailio.cfg
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-09-30 06:11:36 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-09-30 06:11:36 +0000
commit6ca9d7f656434f67c7409e408c980f824db897af (patch)
tree72edb8cc4390cf2e08548dd03ff7ff0294d68d49 /main/kamailio/kamailio.cfg
parente92cddc8802b50ba8d81819040bbc20b78a51715 (diff)
downloadaports-6ca9d7f656434f67c7409e408c980f824db897af.tar.bz2
aports-6ca9d7f656434f67c7409e408c980f824db897af.tar.xz
main/kamailio: moved from testing
Diffstat (limited to 'main/kamailio/kamailio.cfg')
-rw-r--r--main/kamailio/kamailio.cfg107
1 files changed, 107 insertions, 0 deletions
diff --git a/main/kamailio/kamailio.cfg b/main/kamailio/kamailio.cfg
new file mode 100644
index 0000000000..9c101a871f
--- /dev/null
+++ b/main/kamailio/kamailio.cfg
@@ -0,0 +1,107 @@
+# Demonstration Kamailio Configuration for AlpineLinux
+
+
+#--------------------------------------------------------
+# Section 1: Global Definitions
+#--------------------------------------------------------
+debug = 3
+fork = yes
+log_stderror = no
+listen = 0.0.0.0
+port = 5060
+children = 4
+
+dns = no
+rev_dns = no
+
+mpath = "/usr/lib/kamailio/modules/"
+#--------------------------------------------------------
+# Section 2: Modules
+#--------------------------------------------------------
+
+loadmodule "sl.so"
+loadmodule "tm.so"
+loadmodule "rr.so"
+loadmodule "maxfwd.so"
+loadmodule "usrloc.so"
+loadmodule "registrar.so"
+loadmodule "mi_fifo.so"
+
+#--------------------------------------------------------
+# Section 1: Module Configuration
+#--------------------------------------------------------
+
+modparam ( "usrloc", "db_mode", 0 )
+modparam ( "rr", "enable_full_lr", 1 )
+modparam ( "mi_fifo", "fifo_name", "/tmp/kamailio_fifo")
+
+#--------------------------------------------------------
+# Section 1: Main Route Block
+#--------------------------------------------------------
+
+route
+ {
+ if (!mf_process_maxfwd_header("10"))
+ {
+ sl_send_reply("483", "Too Many Hops");
+ return;
+ }
+
+ if (msg:len > max_len)
+ {
+ sl_send_reply("513", "Message Overflow");
+ return;
+ }
+
+ if (method == "REGISTER" )
+ {
+ route(2);
+ return;
+ }
+
+ loose_route();
+
+ if (!lookup("location")) {
+ sl_send_reply("404", "User Not Found");
+ return;
+ }
+
+ route(1);
+
+}
+#--------------------------------------------------------
+# Section 1: Secondary Route Blocks
+#--------------------------------------------------------
+
+# - Default message handler
+route[1] {
+ if (!t_relay()) {
+ sl_reply_error();
+ }
+}
+
+#- Registration Request
+route[2] {
+ if (!save("location")) {
+ sl_reply_error();
+ }
+}
+
+#--------------------------------------------------------
+# Section 1: Reply Route Block
+#--------------------------------------------------------
+
+
+#--------------------------------------------------------
+# Section 1: Failure Route Block
+#--------------------------------------------------------
+
+
+
+
+
+
+
+
+
+