#!KAMAILIO # # $Id$ # # simple quick-start config script # # ----------- global configuration parameters ------------------------ /* Uncomment these lines to enter debugging mode */ debug=1 fork=yes log_stderror=no disable_tcp=yes check_via=no # (cmd. line: -v) dns=no # (cmd. line: -r) rev_dns=no # (cmd. line: -R) children=16 # Extra stuff for Omnity server_header="Server: OmniVigil 5.2-rc1" user_agent_header="User-Agent: OmniVigil 5.2-rc1" server_signature=yes # ------------------ module loading ---------------------------------- mpath="/usr/lib/kamailio/modules_k/:/usr/lib/kamailio/modules/" loadmodule "kex.so" loadmodule "tm.so" loadmodule "tmx.so" loadmodule "db_mysql.so" loadmodule "sl.so" loadmodule "xlog.so" loadmodule "maxfwd.so" loadmodule "textops.so" loadmodule "rr.so" loadmodule "siputils.so" loadmodule "pv.so" loadmodule "presence.so" loadmodule "presence_dialoginfo.so" loadmodule "presence_mwi.so" #loadmodule "presence_xml.so" loadmodule "sanity.so" loadmodule "mi_fifo.so" loadmodule "avpops.so" loadmodule "regex.so" # ----------------- setting module-specific parameters --------------- # -- rr params -- # add value to ;lr param to make some broken UAs happy modparam("rr", "enable_full_lr", 1) # -- presence params -- modparam("presence", "db_url", "mysql://kamailio:secret@127.0.0.1/kamailio") modparam("presence", "server_address", "sip:myip:5060") modparam("presence", "timeout_rm_subs", 0) # failed NOTIFY doesn't cause subscription to be cancelled - Fixed BLF failing on aastra modparam("presence", "db_mode", 2) modparam("presence", "max_expires",3600 ) modparam("presence", "expires_offset", 30) # BLF fixes #45116 # Lots of space for tracking publishes, there are too many publishes in memory vs the space in the hash table modparam("presence", "pres_htable_size", 15 ) #modparam("presence", "fallback2db" ,1 ) modparam("presence", "db_update_period", 5); modparam("presence_dialoginfo", "force_single_dialog", 1) modparam("mi_fifo", "fifo_name", "/tmp/kamailio_fifo") # The following are corrections for performance on GXP phones # RFC value 32000 modparam("tm", "wt_timer", 32000) # ------------------------- request routing logic ------------------- # main routing logic route{ if(!sanity_check("1511", "7")) { xlog("L_INFO", "Rejected request, malformed - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n"); exit; } # 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"); exit; }; if (msg:len >= 2048 ) { sl_send_reply("513", "Message too big"); exit; }; if (is_method("OPTIONS")) { xlog("L_DEBUG", "Reply to OPTIONS - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n"); sl_send_reply('200', 'ok'); exit; } # we record-route all messages -- to make sure that # subsequent messages will go through our proxy; that's # particularly good if upstream and downstream entities # use different transport protocol if (!is_method("SUBSCRIBE|PUBLISH")) { sl_send_reply("488", "Not Acceptable Here"); exit; } # Block retransmissions if (! t_newtran()) { sl_reply_error(); exit; }; if(is_method("PUBLISH")) { handle_publish(); t_release(); } else if( is_method("SUBSCRIBE")) { handle_subscribe(); t_release(); }; exit; }