Browse Source

include presence modules

3.12
karl anderson 13 years ago
parent
commit
fa567d8054
1 changed files with 44 additions and 0 deletions
  1. +44
    -0
      kamailio/kamailio.cfg

+ 44
- 0
kamailio/kamailio.cfg View File

@ -113,6 +113,16 @@ flags
#!define FLB_NATB 6 #!define FLB_NATB 6
#!define FLB_NATSIPPING 7 #!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"
######## Kamailio core extensions module ######## ######## Kamailio core extensions module ########
loadmodule "kex.so" loadmodule "kex.so"
@ -161,6 +171,9 @@ loadmodule "htable.so"
modparam("htable", "htable", "associations=>size=10;") modparam("htable", "htable", "associations=>size=10;")
modparam("htable", "htable", "auth_cache=>size=10;") modparam("htable", "htable", "auth_cache=>size=10;")
# TODO: IS THIS NECESSARY
modparam("htable", "htable", "dbkp=>size=4;autoexpire=7200")
######## Pseudo-Variables module ######## ######## Pseudo-Variables module ########
loadmodule "pv.so" loadmodule "pv.so"
@ -230,6 +243,12 @@ modparam("nathelper", "sipping_bflag", FLB_NATSIPPING)
modparam("nathelper", "sipping_from", "sip:sipcheck@127.0.0.1") 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 -----
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")
####### Common Module Parameters ########## ####### Common Module Parameters ##########
modparam("auth_db|usrloc", "db_url", "kazoo://guest:guest@127.0.0.1:5672/callmgr") modparam("auth_db|usrloc", "db_url", "kazoo://guest:guest@127.0.0.1:5672/callmgr")
@ -251,6 +270,8 @@ route
route(HANDLE_IN_DIALOG_REQUESTS); route(HANDLE_IN_DIALOG_REQUESTS);
route(HANDLE_PRESENCE);
route(PREPARE_INITIAL_REQUESTS); route(PREPARE_INITIAL_REQUESTS);
if (isflagset(FLAG_INTERNALLY_SOURCED)) { if (isflagset(FLAG_INTERNALLY_SOURCED)) {
@ -303,6 +324,29 @@ route[HANDLE_OPTIONS]
} }
} }
route[HANDLE_PRESENCE]
{
if (is_method("SUBSCRIBE")) {
if (!t_newtran()) {
sl_reply_error();
exit;
}
handle_subscribe();
t_release();
exit;
}
if (is_method("PUBLISH")) {
if (!t_newtran()) {
sl_reply_error();
exit;
}
handle_publish();
t_release();
exit;
}
}
route[HANDLE_IN_DIALOG_REQUESTS] route[HANDLE_IN_DIALOG_REQUESTS]
{ {
if (has_totag()) { if (has_totag()) {


Loading…
Cancel
Save