[Kamailio-Users] get warning when sip client is not online

Daniel-Constantin Mierla miconda at gmail.com
Tue Mar 30 11:19:02 CEST 2010


Hello,

On 3/30/10 11:06 AM, s.maertens at telenet.be wrote:
> Hello,
>
> I have a kamailio setup running for several SIP devices. I would like to be warned whenever one of those devices is not reacheable anymore. That means when they go offline or are not anymore registered to the kamailio server. (timeout, unregister, ...).
> I am using the location table so we would be able to write a script that just at specific times checks the difference between the subscriber table and the location table but maybe there is a much better and more realtime solution.
>
> So basically the question is : how to execute a script whenever a host gets removed fom the location table.
>
> I am running Kamailio 3.0.1
>
> All hints are very much appreciated :)
>
>    
one option is to use pua_usrloc that publishes online/offline when 
location cache record is updated in some way (offline when is removed). 
You can intercept that in config and do what you want there.

Another option could be triggers in mysql, when a record is deleted from 
location db table.

Easiest way, imo, is to add an event route to be executed when a record 
goes offline. Requires some c coding, but afterwards is clean -- this 
features was listed as to-be-done in the future when event route was 
introduced, but no time yet, should be there in 3.1.0:
http://lists.kamailio.org/pipermail/users/2009-May/023270.html

Cheers,
Daniel
-- 
Daniel-Constantin Mierla * http://www.asipto.com/ * 
http://twitter.com/miconda * 
http://www.linkedin.com/in/danielconstantinmierla



More information about the Users mailing list