# # $Id: openser.cfg 1676 2007-02-21 13:16:34Z bogdan_iancu $ # # 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=no # (cmd line: -E) children=8 # Uncomment these lines to enter debugging mode #fork=no #log_stderror=yes # listen=udp:192.168.2.102:5060 auto_aliases=no log_name="openser-1.2.0-ul" log_facility=LOG_LOCAL0 # ------------------ module loading ---------------------------------- #set module path mpath="/usr/local/openser-1.2.0-usrloc/lib64/openser/modules/" # Uncomment this if you want to use SQL database loadmodule "mysql.so" loadmodule "sl.so" loadmodule "usrloc.so" loadmodule "registrar.so" loadmodule "textops.so" # ----------------- setting module-specific parameters --------------- # -- usrloc params -- modparam("usrloc", "db_url", "mysql://openser:openserrw@localhost/openser_1_2_0") modparam("usrloc", "db_mode", 2) modparam("usrloc", "hash_size", 12) modparam("usrloc", "fetch_rows", 2500) # ------------------------- request routing logic ------------------- # main routing logic route{ if(is_method("REGISTER")) { set_time_stamp("before new ul save"); save("location"); diff_time_stamp(1,"after ul save"); exit; } set_time_stamp("before new ul lookup"); if(lookup("location")) { diff_time_stamp(1,"after ul lookup"); sl_send_reply("200", "ok"); } else { diff_time_stamp(1,"after ul lookup"); sl_send_reply("404", "not found"); } }