Commits
Flavio Grossi committed 56535519043
FS-5106 fire an event when a sip client doesn't respond to option-ping When all-reg-options-ping is enabled, this adds a new custom event to mod_sofia (sofia::sip_user_state), which is fired when a client stops responding to such ping packets (or when it is reachable again). Add two needed new columns to the sip_registrations table: - ping_status, which is "Reachable" or "Unreachable" depending on the client status; - ping_count, which tracks the number of ping responses received and is used to provide some kind of hysteresis to avoid firing the event in case of transitory network failures. Then ping_count is checked against two threshold values, sip-user-ping-min and sip-user-ping-max in a similar fashion as the ping-{max,min} options for the gateways. These two values are configurable in the profile's xml configuration file. Also, if unregister-on-options-fail is enabled, the client is unregistered based on the number of OPTIONS failure which is also checked against the sip-user-ping-{min,max} values.