* [call_center] Stop uuid_broadcast on answer
* [mod_callcenter] Fix stale members in database
When a channel is originated to an agent but the
member fails to bridge to that agent, the database is
not updated with the member status and a stale entry
of 'Answered' persists until mod_callcenter is restarted.
Additionally, cc_agent_found is set before the bridge,
therefore ending the while loop on the member channel.
If there is a problem with the agent bridge, the call is
terminated prematurely.
In this commit, we:
* Move the SQL update of the member
to the 'Answered' state to the agent thread instead of
the member's thread, so that correct data is populated.
* Reset the members state accordingly to Abandoned or
Waiting if the channels fail to bridge.
* Use cc_agent_bridged to end the member loop,
so that a member is put back on queue if the agent
channel fails to bridge.
In mod_cidlookup and several other modules, config parameters
are read from external XML files using the SWITCH_CONFIG_ITEM_STRING_STRDUP
method. These items do not have string_options, and are not freed
with switch_xml_config_cleanup. We therefore need to call switch_safe_free
for config without string_options. We also add switch_xml_config_cleanup
to mod_cidlookup. There are other modules that may be affected but this
commit makes no attempt at fixing those.
Fixes#1752
* [mod_event_multicast] Fix crash / invalid pointer dereference
* [mod_event_multicast] Check current number of addresses before zeroing memory on init
* [mod_event_multicast] Fix condition checking number of addresses on init
* [mod_event_multicast] Fix addresses zeroing on init
* [mod_event_multicast] Reorder memset and assert after malloc
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