This commit introduces a new channel variable that sets the channel endpoint used by the originate. This is particulary useful when using `execute_on_originate` that will execute multiple times when using fake endpoints as `user/` or `group/`. With this variable, a user can determine which endpoint is being used by the originate, and whether they want to process it.
Without these -- especially activate() -- stateful plugins will not be
set up correctly.
For example, the low-pass filter "lpf" in the CMT library may produce
a pop when starting since its state is not zeroed out.
In FS-6400, the attempt was made to randomize OPTIONS
packets to be sent at a random interval. The same random
interval is applied to all endpoints so this doesn't work.
Furthermore, rounding within the code, as well as
reseeding with srand() on each run will ultimately
make the ping times converge over time. Once the
times converge, they will not separate since the reseeding
will cause the same random number to apply to each
registration.
This commmit will apply the random interval only during
initial registration and update of registration.
All subsequent pings will be incremented with the
actual value of ping-mean-interval. (This parameter
name is no longer accurate, and would be better named
ping-max-interval).
srand() has been moved to the start of the worker
thread, and all repeat calls have been removed,
so that each call of rand(), even during the
same second, generates a different random number.
Fixes#1132, Fixes#1133
After rejecting the subscription for authentication the function calls goto end. In the end block freeswitch fires PRESENCE_PROBE events and releases the allocated memory
* when rejecting a call for auth PRESENCE_PROBE should not get fired
* This caused all other subscribers to the same entity to get flooded with NOTIFY's because `call_id` only gets set later in the function, so when firing the PRESENCE_PROBE without `call_id` being set all subscriptions will get a notify
* this can be considered a security flaw as any unauthorized user can send
SUBSCRIBES and trigger thousands of NOTIFY's to the SUBSCRIBED endpoints
This was fixed simply my moving down the end label after the code that
sends the PRESENCE_PROBE event