# # $Id: ser.cfg,v 1.21.4.1 2003/11/10 15:35:15 andrei Exp $ # # simple quick-start config script # Uses proxy registrar to route call, so won't work unless UA is registered. # # ----------- global configuration parameters ------------------------ debug=8 # debug level (cmd line: -dddddddddd) fork=yes log_stderror=yes # (cmd line: -E) /* Uncomment these lines to enter debugging mode */ fifo="/tmp/ser_fifo" sip_warning=yes check_via=yes # (cmd. line: -v) dns=yes # (cmd. line: -r) rev_dns=yes # (cmd. line: -R) listen=208.226.140.141 port=5060 listen=208.226.140.141 port=5000 listen=208.226.140.141 port=5061 listen=208.226.140.141 port=6000 children=4 fifo="/tmp/ser_fifo" # ------------------ module loading ---------------------------------- # Uncomment this if you want to use SQL database loadmodule "/usr/lib/ser/modules/mysql.so" loadmodule "/usr/lib/ser/modules/sl.so" loadmodule "/usr/lib/ser/modules/tm.so" loadmodule "/usr/lib/ser/modules/rr.so" loadmodule "/usr/lib/ser/modules/maxfwd.so" loadmodule "/usr/lib/ser/modules/usrloc.so" loadmodule "/usr/lib/ser/modules/registrar.so" # Uncomment this if you want digest authentication # mysql.so must be loaded ! loadmodule "/usr/lib/ser/modules/auth.so" loadmodule "/usr/lib/ser/modules/auth_db.so" # ----------------- setting module-specific parameters --------------- # -- usrloc params -- #modparam("usrloc", "db_mode", 0) # Uncomment this if you want to use SQL database # for persistent storage and comment the previous line modparam("usrloc", "db_mode", 2) # -- auth params -- # Uncomment if you are using auth module # modparam("auth_db", "calculate_ha1", yes) # # If you set "calculate_ha1" parameter to yes (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) modparam("registrar", "default_expires", 120) #sets default for expiry if registrant doesn't specify modparam("registrar", "default_q", 1000)# sets default q value in registration # ------------------------- request routing logic ------------------- alias=quintum.com alias=208.226.140.141 alias=208.226.140.41 alias=engweb@quintum.com alias=208.226.140.141@quintum.com alias=208.226.140.41@quintum.com # main routing logic route{ # initial sanity checks -- messages with # max_forwards==0, or excessively long requests if (!mf_process_maxfwd_header("10")) { sl_send_reply("483","Too Many Hops"); break; }; if ( msg:len > max_len ) { sl_send_reply("513", "Message too big"); break; }; ############################################ # store user location if a REGISTER appears if (method=="REGISTER") { save("location"); break; }; if (uri==myself) #where myself is defined by the aliases above { #look for the registered contact in the location table of database #and if find it, rewrite the uri and forward statefully to the destination if (lookup ("location"))##Lookup finds the contact info and rewrites the header { record_route();#send everything back through the proxy t_relay(); break; } else { sl_send_reply("404","user not found");#and if you really don't know what to do, send this back break; } }; }