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


_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to