Description

On large switches, with nated phones, is pretty common to have maybe 1000~10000 phones which means that freeswitch sends out 1000~10000 sip options packets every 30 seconds, without any throttling mechanism.

This means that fs have to process many messages (responses) in short time).

Also if you have an sbc or proxy in front of fs, this means bombing the poor sbc/proxy (and the packets from fs can be dropped...)

The interval is "mean" because a random, uniformly distributed delay is computed to have a "mean" of ping-mean-interval seconds.

This allows to spread sip pings across the interval, avoiding the "bursts" that the current implementation does.

Side note: because of linux rand() not being thread safe and win lacking drand48_r functions, a separate implementation of the random generator is made for both platforms. Both works under linux, but I have not tested under a windows platform.