#!KAMAILIO # # $Id$ # # simple quick-start config script # # ----------- global configuration parameters ------------------------ /* Uncomment these lines to enter debugging mode */ debug=2 fork=yes log_stderror=no check_via=no # (cmd. line: -v) dns=no # (cmd. line: -r) rev_dns=no # (cmd. line: -R) alias=presence.domain.tld listen=udp:SERVERIP:5060 children=16 # uncomment the following lines for TLS support #disable_tls = 0 #listen = tls:your_IP:5061 #tls_verify_server = 1 #tls_verify_client = 1 #tls_require_client_certificate = 0 #tls_method = TLSv1 #tls_certificate = "/usr/local/etc/openser/tls/user/user-cert.pem" #tls_private_key = "/usr/local/etc/openser/tls/user/user-privkey.pem" #tls_ca_list = "/usr/local/etc/openser/tls/user/user-calist.pem" # ------------------ 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 "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://user:pass@dbip/kamailio") modparam("presence", "server_address", "sip:SERVERIP:5060") # Damn linksys needs this value #modparam("presence", "max_expires", 2147483647 ) modparam("presence", "max_expires",3600 ) modparam("presence", "expires_offset", 300) #modparam("presence_xml", "force_active", 1) modparam("presence", "fallback2db" ,1 ) modparam("presence", "db_update_period", 5); modparam("presence_dialoginfo", "force_single_dialog", 1) #modparam("mi_fifo", "fifo_name", "/tmp/") # The following are corrections for performance on GXP phones # RFC value 32000 modparam("tm", "wt_timer", 32000) # ------------------------- request routing logic ------------------- # 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"); exit; }; if (msg:len >= 2048 ) { sl_send_reply("513", "Message too big"); 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; }