Browse Source

Merge pull request #40 from 2600hz/KAZOO-3530

Kazoo 3530
3.20
bitbashing 11 years ago
parent
commit
23e068d66d
3 changed files with 19 additions and 1 deletions
  1. +3
    -0
      kamailio/default.cfg
  2. +2
    -1
      kamailio/local.cfg
  3. +14
    -0
      kamailio/nodes-role.cfg

+ 3
- 0
kamailio/default.cfg View File

@ -204,6 +204,9 @@ include_file "pusher-role.cfg"
#!ifdef RESPONDER-ROLE #!ifdef RESPONDER-ROLE
include_file "responder-role.cfg" include_file "responder-role.cfg"
#!endif #!endif
#!ifdef NODES-ROLE
include_file "nodes-role.cfg"
#!endif
####### Permissions module ########## ####### Permissions module ##########
loadmodule "permissions.so" loadmodule "permissions.so"


+ 2
- 1
kamailio/local.cfg View File

@ -12,6 +12,7 @@ debug = L_INFO
#!trydef REGISTRAR-ROLE #!trydef REGISTRAR-ROLE
#!trydef PRESENCE-ROLE #!trydef PRESENCE-ROLE
#!trydef RESPONDER-ROLE #!trydef RESPONDER-ROLE
#!trydef NODES-ROLE
## Disabled Roles - remove all but the last '#' to enable ## Disabled Roles - remove all but the last '#' to enable
# # #!trydef TRAFFIC-FILTER-ROLE # # #!trydef TRAFFIC-FILTER-ROLE
@ -20,7 +21,7 @@ debug = L_INFO
# # #!trydef ANTIFLOOD-ROLE # # #!trydef ANTIFLOOD-ROLE
# # #!trydef MESSAGE-ROLE # # #!trydef MESSAGE-ROLE
# # #!trydef PUSHER-ROLE # # #!trydef PUSHER-ROLE
################################################################################ ################################################################################
## SERVER INFORMATION ## SERVER INFORMATION
################################################################################ ################################################################################


+ 14
- 0
kamailio/nodes-role.cfg View File

@ -0,0 +1,14 @@
######## Nodes role - pushes info to kazoo ########
#!ifndef TIMER-LOADED
loadmodule "timer.so"
#!endif
modparam("timer", "declare_timer", "NODES_TIMER=NODES_TIMER_ROUTE,5000,slow,enable");
####### NODES Logic ########
route[NODES_TIMER_ROUTE]
{
$var(Payload) = '{"Event-Category" : "nodes", "Event-Name" : "advertise", "Expires" : 5000, "Used-Memory" : $(stat(real_used_size){s.int}), "Registrations" : $(stat(registered_users){s.int}), "WhApps" : {"kamailio" : {"Startup" : $Tb }} }';
kazoo_publish("nodes", "", $var(Payload));
}
# vim: tabstop=4 softtabstop=4 shiftwidth=4 expandtab

Loading…
Cancel
Save