On 06/19/2015 09:54 AM, Ali Taher wrote:
> Hello,
>  
> I want to define a counter  that increase in every invite.
> 
> I tried the below :
> 
> if (is_method("INVITE"))
> 
>                 {     
> 
> $var(u)=$var(u)+1;
> 
> xlog("L_INFO","Counter : $var(u) " );
> 
> }
> 
> 
> But the counter is reset to 1 randomly (even before restarting kamailio
> service)
> 
> 
> How can have a proper counter that count invite messages.
> 
> Thanks
> 
> Ali
> 

Have you considered using either Dialog module or HTABLE instead?

http://kamailio.org/docs/modules/stable/modules/dialog.html
http://kamailio.org/docs/modules/stable/modules/htable.html

I would start with htable...

--fred

_______________________________________________
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