[SR-Users] collecting stats per subscriber
Daniel-Constantin Mierla
miconda at gmail.com
Fri Sep 14 10:04:59 CEST 2012
Hello,
On 9/13/12 10:44 PM, Krishna Kurapati wrote:
> Hi,
>
> Is there a module that can be used to collect number of MESSAGEs sent
> or received by a subscriber;
> number of registrations by a subscriber? These will be per subscriber
> as oppose to statistics collected for
> entire system.
there is no dedicated module for such functionality, but you can achieve
it using htable module
Define a hash table where to store the statistics, then you can
increment the values using variables:
modparam("htable", "htable", "stats=>size=8;initval=0;")
...
if(is_method("REGISTER")) {
$var(x) = $shtinc(stats=>regs:$tU);
}
You can dump the content of hash table via MI/RPC commands (using
kamctl/sercmd).
Cheers,
Daniel
--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Berlin, Nov 5-8, 2012 - http://asipto.com/u/kat
Kamailio Advanced Training, Miami, USA, Nov 12-14, 2012 - http://asipto.com/u/katu
More information about the sr-users
mailing list