From 37327abbb8f76af9435ff8d4d24a8f347885b657 Mon Sep 17 00:00:00 2001 From: karl anderson Date: Tue, 23 Jul 2013 17:18:42 -0700 Subject: [PATCH] tweaks for presence --- kamailio/kamailio.cfg | 51 +++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 28 deletions(-) diff --git a/kamailio/kamailio.cfg b/kamailio/kamailio.cfg index 36d6f4f..718d499 100644 --- a/kamailio/kamailio.cfg +++ b/kamailio/kamailio.cfg @@ -18,8 +18,6 @@ ####### Global Parameters ######### fork = yes children = 25 -group = kamailio -user = kamailio server_signature = no server_header = "Server: Kazoo" user_agent_header = "User-Agent: Kazoo" @@ -110,18 +108,9 @@ flags FLAG_SKIP_NAT_CORRECTION: 3, FLAG_ASSOCIATE_USER: 4; -#!define FLB_NATB 6 -#!define FLB_NATSIPPING 7 - -# ----- presence -loadmodule "pua_dialoginfo.so" -modparam("pua_dialoginfo", "library_mode", 1) - -# TODO: ARE THESE NECESSARY -loadmodule "corex.so" -# loadmodule "ctl.so" -loadmodule "cfg_rpc.so" -loadmodule "mi_rpc.so" +#!define FLB_NATB 1 +#!define FLB_NATSIPPING 2 +#!define FLB_UAC_REDIRECT 3 ######## Kamailio core extensions module ######## loadmodule "kex.so" @@ -162,16 +151,10 @@ modparam("sanity", "autodrop", 0) loadmodule "textops.so" loadmodule "textopsx.so" -######## Path support for SIP loadbalancer ######## -loadmodule "path.so" -modparam("path", "use_received", 0) - ######## Generic Hash Table container in shared memory ######## loadmodule "htable.so" modparam("htable", "htable", "associations=>size=10;") modparam("htable", "htable", "auth_cache=>size=10;") - -# TODO: IS THIS NECESSARY modparam("htable", "htable", "dbkp=>size=4;autoexpire=7200") ######## Pseudo-Variables module ######## @@ -209,10 +192,10 @@ loadmodule "uac_redirect.so" ####### Kazoo Integration module ########## loadmodule "db_kazoo.so" -# FIXME: uncomment the next line and set the correct hostname that should be advertised to Kazoo +# FIXME: Set the correct hostname that should be advertised to Kazoo modparam("db_kazoo", "node_hostname", "kamailio.2600hz.com") # If you want a certain fs_path to be sent Kazoo, uncomment the next line and set the right value -#modparam("db_kazoo", "register_fs_path", "127.0.0.1:5060") +# modparam("db_kazoo", "register_fs_path", "127.0.0.1:5060") ####### Authentication Interface module ########## loadmodule "auth.so" @@ -241,17 +224,29 @@ modparam("nathelper", "ping_nated_only", 1) modparam("nathelper", "natping_processes", 5) modparam("nathelper", "sipping_bflag", FLB_NATSIPPING) modparam("nathelper", "sipping_from", "sip:sipcheck@127.0.0.1") -#modparam("nathelper", "natping_socket", "127.0.0.1:5060") +# modparam("nathelper", "natping_socket", "127.0.0.1:5060") -# ----- presence params ----- +######## Presence User Agent module ######## +loadmodule "pua_dialoginfo.so" +modparam("pua_dialoginfo", "library_mode", 1) + +######## Presence server module ######## loadmodule "presence.so" loadmodule "presence_dialoginfo.so" modparam("presence", "subs_db_mode", 1) -modparam("presence", "db_url", "kazoo://guest:guest@127.0.0.1:5672/dialoginfo") +modparam("presence", "expires_offset", 60) +modparam("presence", "publ_cache", 0) + +####### Kazoo Integration module ########## +loadmodule "db_kazoo.so" +# The hostname that should be advertised to Kazoo +modparam("db_kazoo", "node_hostname", "kamailio.2600hz.com") +# If you want a certain fs_path to be sent Kazoo, uncomment the next line and set the right value +# modparam("db_kazoo", "register_fs_path", "127.0.0.1:5060") ####### Common Module Parameters ########## modparam("auth_db|usrloc", "db_url", "kazoo://guest:guest@127.0.0.1:5672/callmgr") - +modparam("presence", "db_url", "kazoo://guest:guest@127.0.0.1:5672/dialoginfo") ####### Routing Logic ######## route @@ -268,10 +263,10 @@ route route(HANDLE_OPTIONS); - route(HANDLE_IN_DIALOG_REQUESTS); - route(HANDLE_PRESENCE); + route(HANDLE_IN_DIALOG_REQUESTS); + route(PREPARE_INITIAL_REQUESTS); if (isflagset(FLAG_INTERNALLY_SOURCED)) {