callcenter_break agent <uuid> can be called with an uuid that represents
an outbound session created to call an agent.
The current behavior of mod_callcenter is to keep watching this channel
until it is hangup, once the hangup happens the bridge-agent-end and
member-queue-end events are fired, agent is released on the database
so it can receive more calls and member is also updated on database.
If you do not want to the agent channel hangup to release the agent you can
call this app with the agent session uuid and the agent will be released and
available to receive more calls. This is useful when the agent is located on a
remote freeswitch box and transfer the call internally, the original leg between
the first FreeSWITCH and the remote box remains live and the agent will only be
Available when the original call hangup.
* commit '04854fddaa1548e5d57a90fad74a433bee7a0750':
Revert "FS-10299 [mod_callcenter] Removing global lock on all cc_execute_sql functions when executing database queries"
* commit 'be741eab2ce34122755198c31894941f6e7da7d2':
FS-10304: [mod_callcenter] Prevent infinite logging when a stale queue member in found in the database
Now we're passing member_session as session parameter to switch_ivr_originate, this will make
the cc_export_vars no longer needed in the future as now all the variables previously
exported will be seen by switch_ivr_originate because member_session is the ORIGINATOR.
cc_export_vars still works.
Having a member from a queue that is no longer found on the current system
causes infinite logging about skipping a member.
There is already cleanup code for abandoned calls in same function, but it can
never be reached for this case, because there is no queue.
If the queue is never found again in the system, the logging would continue
forever or until the stale record gets removed from the database.
FS-10304 #resolve
This change implements a few new features, there's no behavior change at all.
1 - BLF for queues
You can now use BLF for knowing when there are callers waiting on a queue,
the pattern to be subscribed is callcenter+queuename@default or @domain name.
2 - callcenter_track app
Now every agent has an external_calls_count column that will be read upon
selecting agent to offer new calls.
If you start an external call (inbound or outbound) and don't wan't
mod_callcenter to offer new calls for this agent just call this app
passing the agent name as argument:
<action application="callcenter_track" data="agent1"/>
This will increment the external calls count, and to make mod_callcenter look to this variable you need to set this queue parameter:
<param name="skip-agents-with-external-calls" value="true"/>
3 - EXIT_WITH_KEY reason
If the member press a key to exit the queue the cc_cancel_reason will be this now.
4 - xml_curl config loading improvements
Prior to this mod_callcenter query your web server a LOT of times,
this will make it only query once per queue, just watch for CC-Queue
request param and build your xml with everything related to that queue,
including tiers (tiers wasn't loaded before this).
The member can hangup the call while we are playing the outbound announce audio to the agent, this
patch detects this and properly hangup the agent channel to avoid keeping it up with
just a silence call since there's no active bridge.
The agent-bridge-end event now has CC-Agent-Bridged: true if the bridge successfully happens,
variable cc_agent_bridged was added so we can track this in the agent and member CDRs.
If you want to play an audio to the agent to indicate the member hangup the call before the bridge
set the variable cc_bridge_failed_outbound_announce, for example:
<action application="set" data="cc_bridge_failed_outbound_announce=tone_stream://%(250,250,425);loops=3"/>
or
<action application="set" data="cc_bridge_failed_outbound_announce=your-caller-has-gone-away-audio"/>
prior to calling callcenter application.
These variables are documented at https://freeswitch.org/confluence/display/FREESWITCH/mod_callcenter