|
@@ -0,0 +1,93 @@
|
|
|
+#
|
|
|
+# $Id: openser.cfg 2825 2007-09-27 09:05:52Z henningw $
|
|
|
+#
|
|
|
+# simple quick-start config script
|
|
|
+# Please refer to the Core CookBook at http://www.openser.org/dokuwiki/doku.php
|
|
|
+# for a explanation of possible statements, functions and parameters.
|
|
|
+#
|
|
|
+
|
|
|
+# ----------- global configuration parameters ------------------------
|
|
|
+
|
|
|
+debug=3 # debug level (cmd line: -dddddddddd)
|
|
|
+fork=yes
|
|
|
+log_stderror=yes # (cmd line: -E)
|
|
|
+children=4
|
|
|
+
|
|
|
+listen=127.0.0.1
|
|
|
+port=5059
|
|
|
+
|
|
|
+dns=no
|
|
|
+rev_dns=no
|
|
|
+
|
|
|
+# ------------------ module loading ----------------------------------
|
|
|
+
|
|
|
+#set module path
|
|
|
+mpath="../modules/"
|
|
|
+
|
|
|
+# Uncomment this if you want to use SQL database
|
|
|
+loadmodule "mysql/mysql.so"
|
|
|
+
|
|
|
+loadmodule "sl/sl.so"
|
|
|
+loadmodule "tm/tm.so"
|
|
|
+loadmodule "rr/rr.so"
|
|
|
+loadmodule "maxfwd/maxfwd.so"
|
|
|
+loadmodule "usrloc/usrloc.so"
|
|
|
+loadmodule "registrar/registrar.so"
|
|
|
+loadmodule "textops/textops.so"
|
|
|
+loadmodule "auth/auth.so"
|
|
|
+loadmodule "auth_db/auth_db.so"
|
|
|
+
|
|
|
+# ----------------- setting module-specific parameters ---------------
|
|
|
+# -- usrloc params --
|
|
|
+
|
|
|
+# Uncomment this if you want to use SQL database
|
|
|
+# for persistent storage and comment the previous line
|
|
|
+modparam("usrloc", "db_mode", 3)
|
|
|
+modparam("usrloc", "db_url", "mysql://openser:openserrw@localhost/openser")
|
|
|
+
|
|
|
+# -- auth params --
|
|
|
+# Uncomment if you are using auth module
|
|
|
+#
|
|
|
+modparam("auth_db", "calculate_ha1", 1)
|
|
|
+
|
|
|
+# If you set "calculate_ha1" parameter to 1 (which true in this config),
|
|
|
+# uncomment also the following parameter)
|
|
|
+#
|
|
|
+modparam("auth_db", "password_column", "password")
|
|
|
+
|
|
|
+# -- rr params --
|
|
|
+# add value to ;lr param to make some broken UAs happy
|
|
|
+modparam("rr", "enable_full_lr", 1)
|
|
|
+
|
|
|
+
|
|
|
+# ------------------------- request routing logic -------------------
|
|
|
+
|
|
|
+# main routing logic
|
|
|
+
|
|
|
+route{
|
|
|
+
|
|
|
+#--------Main sainity checks----------------
|
|
|
+
|
|
|
+#look if msg bounces
|
|
|
+if (!mf_process_maxfwd_header("10")) {
|
|
|
+sl_send_reply("483", "Too Many Hops");
|
|
|
+exit;
|
|
|
+};
|
|
|
+
|
|
|
+#-----------------------------------------
|
|
|
+
|
|
|
+if (uri == myself) {
|
|
|
+
|
|
|
+ if(method==REGISTER){
|
|
|
+ if (!proxy_authorize("localhost", "subscriber")) {
|
|
|
+ proxy_challenge("localhost", "0");
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ sl_send_reply("200","OK");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+exit();
|
|
|
+}
|
|
|
+}
|
|
|
+
|