debug=3 children=4 fork=no log_stderror=yes listen=192.168.1.15 port=5060 mpath="/usr/local/lib/openser/modules/" loadmodule "mysql.so" loadmodule "sl.so" loadmodule "tm.so" loadmodule "rr.so" loadmodule "maxfwd.so" loadmodule "usrloc.so" loadmodule "registrar.so" loadmodule "textops.so" loadmodule "mi_fifo.so" loadmodule "xlog.so" loadmodule "auth.so" loadmodule "auth_db.so" modparam("mi_fifo", "fifo_name", "/tmp/openser_fifo") modparam("usrloc", "db_mode", 2) modparam("auth_db", "calculate_ha1", yes) modparam("auth_db", "password_column", "password") modparam("rr", "enable_full_lr", 1) route{ t_on_reply("1"); if (!mf_process_maxfwd_header("10")) { sl_send_reply("483","Too Many Hops"); exit; }; if (msg:len >= 2048 ) { sl_send_reply("513", "Message too big"); exit; }; # If REGISTER request and if it is its first arrival # then self-transmit without processing. # Such a looped request arrival path will result in looped replies # (thanks to Via fields). # Looped replies will perimt us to see the replies of the proxy. # I.e. we will be able to see the replies of our proxy to REGISTER requests. if(method=="REGISTER") { if(!search("P-hint: [Ss]elf-[Ll]ooped")) { append_hf("P-hint: Self-Looped\r\n"); t_relay("192.168.1.15"); # the IP address of this proxy exit; } } # Only the second arrival of REGISTER will be displayed. xlog("L_NOTICE","$rm\n$Cbg$mb$Cxx\n"); if (!method=="REGISTER") record_route(); if (loose_route()) { # mark routing logic in request append_hf("P-hint: rr-enforced\r\n"); route(1); }; if (!uri==myself) { append_hf("P-hint: outbound\r\n"); route(1); }; if (uri==myself) { if (method=="REGISTER") { if (!www_authorize("", "subscriber")) { xlog("L_NOTICE","Unable to verify the credentials\n"); www_challenge("", "0"); exit; }; save("location"); exit; }; if(method=="INVITE") { lookup("aliases"); if (!uri==myself) { append_hf("P-hint: outbound alias\r\n"); route(1); }; # native SIP destinations are handled using our USRLOC DB if (!lookup("location")) { xlog("L_NOTICE","$CrxUser is not found$Cxx\n"); sl_send_reply("404", "Not Found"); exit; }; append_hf("P-hint: usrloc applied\r\n"); } }; route(1); } route[1] { if (!t_relay()) { sl_reply_error(); }; exit; } onreply_route[1] { xlog("L_NOTICE","$rs ($rr) concerning $rm\n$Cbc$mb$Cxx\n"); }