You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

14 lines
596 B

######## 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