Commit Graph

168 Commits

Author SHA1 Message Date
Italo Rossi 8ea3e3c7bc Merge pull request #1313 in FS/freeswitch from ~ANTONIO/freeswitch:bugfix/FS-10368-mod_callcenter-lock-database-errors to master
* commit '04854fddaa1548e5d57a90fad74a433bee7a0750':
  Revert "FS-10299 [mod_callcenter] Removing global lock on all cc_execute_sql functions when executing database queries"
2017-07-06 20:52:51 +00:00
Italo Rossi 38ff0f79e9 Merge pull request #1273 in FS/freeswitch from ~EDUARDO/freeswitch:FS-10304-prevent-infinite-logging-when-a to master
* commit 'be741eab2ce34122755198c31894941f6e7da7d2':
  FS-10304: [mod_callcenter] Prevent infinite logging when a stale queue member in found in the database
2017-07-05 18:51:03 +00:00
Italo Rossi 3fef65b7c2 FS-10432 [mod_callcenter] Increase agent contact field up to 1024. 2017-06-28 16:43:16 -03:00
Antonio 04854fddaa Revert "FS-10299 [mod_callcenter] Removing global lock on all cc_execute_sql functions when executing database queries"
This reverts commit faf87febdb.
2017-06-23 19:02:39 +02:00
Italo Rossi b4ada1b849 FS-10237 [mod_callcenter] Do not kick member out on timeout if originating to an agent
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.
2017-06-13 00:12:15 -03:00
Eduardo Marinho be741eab2c FS-10304: [mod_callcenter] Prevent infinite logging when a stale queue member in found in the database
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
2017-05-11 09:43:58 -03:00
Italo Rossi faf87febdb FS-10299 [mod_callcenter] Removing global lock on all cc_execute_sql functions when executing database queries 2017-05-09 11:44:30 -03:00
Italo Rossi 97cece8968 FS-10298 [mod_callcenter] Firing bridge-agent-end if we failed to bridge answered agent with member. 2017-05-09 11:20:04 -03:00
Italo Rossi 13d5dff27d Merge pull request #1203 in FS/freeswitch from ~F93/freeswitch:bugfix/FS-10085-incorrect-no_answer_delay_time-behavoir to master
* commit '051cf19c93224bdab37fbfda68f9caaa0813aefa':
  FS-10085 [mod_callcenter] fix no_answer_delay_time behavoir in ring-all strategy
2017-04-29 00:56:43 +00:00
Italo Rossi b8af27863d Merge pull request #1202 in FS/freeswitch from ~PECHEN/freeswitch:feature/FS-10082-full-list-members-by-api to master
* commit 'f411dd49c5f951992345dcd810c5a70d8a235839':
  FS-10082 [mod_callcenter] full list members by api
2017-03-12 13:12:00 -05:00
Italo Rossi 9bb7a7d8cd Merge pull request #1074 in FS/freeswitch from ~WHENRY/freeswitch:feature/FS-9757_multi_box_patch to master
* commit '404c69698ed7a4ff215cf2d430b6a1721c693eb1':
  FS-9757 Store real system uuid in members system col and compare
2017-03-12 13:08:37 -05:00
Alexandr Popov f411dd49c5 FS-10082 [mod_callcenter] full list members by api 2017-03-06 17:53:48 +02:00
Roman Sukhov 051cf19c93 FS-10085 [mod_callcenter] fix no_answer_delay_time behavoir in ring-all strategy 2017-03-03 14:23:57 +03:00
Italo Rossi 59da3cc493 FS-10012 [mod_callcenter] Enabling bypass media if agents leg have bypass_media_after_bridge=true #resolve 2017-02-05 14:57:51 -03:00
William Henry 404c69698e FS-9757 Store real system uuid in members system col and compare 2017-01-27 16:38:13 -05:00
Italo Rossi 72927b994c [mod_callcenter] FS-9891: Checking if we got a valid pointer for a queue 2016-12-29 12:59:24 -03:00
Italo Rossi 50714ec5e4 [mod_callcenter] FS-9891: Get queue again to increase calls answered and abandoned 2016-12-27 21:35:17 -03:00
Italo Rossi 717dea47fb [mod_callcenter] FS-9347: Do not log as error when the member is gone just before we assigned an agent, now logging as DEBUG 2016-12-27 21:19:57 -03:00
Italo Rossi e614f8da24 [mod_callcenter] FS-9689 Fixed issue when agent rejects the call while hearing cc_outbound_announce making member (caller) waiting on queue forever 2016-12-27 21:14:57 -03:00
Italo Rossi 5ac10aaf32 [mod_callcenter] FS-9723: Fixing cc_warning_tone, using switch_ivr_play_file instead of queue private event 2016-12-27 20:49:59 -03:00
Italo Rossi b02df24504 FS-9869 [mod_callcenter] Exporting cc_queue_joined_epoch when originating agent outbound leg 2016-12-21 12:14:04 -03:00
Mike Jerris 1e0b827c08 Merge pull request #1067 in FS/freeswitch from ~WHENRY/freeswitch:improvement/FS-9760_remove_whitespace to master
* commit '46b63a4bb6f67d8066a354e55ea6bbd10d7d53fa':
  FS-9760 Removed the un-needed whitespace from the file
2016-12-20 18:45:35 -06:00
Italo Rossi 2ab3b14c1f FS-9835 [mod_callcenter] Fix segfault when passing freed pointer to cc_send_presence due to queue unload/reload 2016-12-09 16:34:05 -03:00
William Henry 46b63a4bb6 FS-9760 Removed the un-needed whitespace from the file 2016-11-21 17:32:22 -05:00
Italo Rossi 35e38e28a1 Merge pull request #1056 in FS/freeswitch from ~FRANCOIS/freeswitch-fs-9514:master to master
* commit 'a8926317afc71f1889b95aca72e1301a19f078b2':
  FS-9514 add event on mod_callcenter when max-no-answer is triggered
2016-11-14 08:17:14 -06:00
Italo Rossi 741e257b69 Merge pull request #957 in FS/freeswitch from ~FRANCOIS/freeswitch-fs-9516:master to master
* commit 'b182a0ce34363399b7d7c88e0014769d7f168cc0':
  FS-9516 refactor loopback agent on mod_callcenter and fix multiple minor issues
2016-11-14 08:11:09 -06:00
François a8926317af FS-9514 add event on mod_callcenter when max-no-answer is triggered 2016-11-14 15:07:07 +01:00
François b182a0ce34 FS-9516 refactor loopback agent on mod_callcenter and fix multiple minor issues 2016-11-14 13:28:11 +01:00
Mike Jerris e1b3ee1efd FS-9652: improve sql sanitization 2016-11-11 11:27:35 -06:00
Italo Rossi d998325bca FS-9707 - [mod_callcenter] Fixing external_calls_count order in select for top-down and ring-all strategies, removing unneeded log on presence 2016-11-07 17:41:23 -03:00
Italo Rossi 15a232b5bb FS-9609 - [mod_callcenter] BLF for Queues, callcenter_track app, EXIT_WITH_KEY reason and xml_curl improvements
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).
2016-10-04 23:07:42 -03:00
Italo Rossi 1080016986 FS-7706 [mod_callcenter] Hangup agent channel if we failed to bridge it with member channel.
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
2016-08-24 00:03:16 -03:00
Italo Rossi 0f3204feb3 FS-9248 [mod_callcenter] Adding truncate-tiers-on-load and truncate-agents-on-load options. 2016-06-09 16:53:21 -03:00
Italo Rossi 8b6f40f967 FS-8584 - [mod_callcenter] Requesting agents and tiers when reloading queue
Before this callcenter_config queue reload [queuename] only reloads the queue
parameters and now it'll include a CC-Queue header with the queuename when using
mod_xml_curl and request a new config for updating agents and tiers related to the
queue.

If you are using mod_xml_curl please make sure to return the raw xml config file
with all the settings, queues, agents and tiers tags when we request the config
without a CC-Queue specified. If this header is present you can build the xml with
items only related to the queue requested.
2016-05-13 22:21:04 -03:00
Italo Rossi 8e112294bf Merge pull request #816 in FS/freeswitch from ~FLOKR/freeswitch:feature/FS-9079-adding-new-strategy-to-mod_callcenter to master
* commit '8b42c77c3b63abd0f75819cc183150663cc58a1d':
  FS-9079: [mod_callcenter] Add ring-progressively strategy
2016-05-02 12:42:10 -05:00
Florent Krieg 8b42c77c3b FS-9079: [mod_callcenter] Add ring-progressively strategy
A new strategy is now available through mod_callcenter, which aim
is to provide a mix between top-down and ring-all strategies.

If set to ring-progressively, the strategy will call an agent, and
then a second agent, and then a third agent, without cancelling
previous calls.

The delay between each call is 10 sec by default, but it can be
changed using the queue variable ring-progressively-delay.
2016-05-02 10:26:20 +02:00
Italo Rossi 96e963d3eb Merge pull request #691 in FS/freeswitch from ~RAJESH.VAYA/freeswitch:feature/mod_callcenter-json-api to master
* commit '23e53df7211aaaa8168b185411c85d0a35be2d33':
  FS-8799 [mod_callcenter] Add JSON API interface for mod_callcenter
2016-05-01 20:40:35 -05:00
Italo Rossi 3f5af35fd3 FS-9025 - [mod_callcenter] bypass_media_after_bridge working for member channel 2016-04-07 17:54:28 -03:00
Italo Rossi e95da7a80f FS-8856 - [mod_callcenter] Inserting member as a new one when restoring action fails because our agent_dispatch_thread removed the members just before we tried to update him. 2016-02-22 09:54:53 -03:00
Rodrigo Ramírez Norambuena 1661fc6a51 FS-8822 - [mod_callcenter] Realtime counter for calls in a queue
Added counters for answered and abandoned calls for a queue.

Create two vars for cc_queue struct
    - calls_answered
    - calls_abandoned

These increases when the call is hangup.

This change also :
 - refactor long lines of header and body to  print the queue information.
 - Update year in copyright
2016-02-08 01:22:37 -03:00
Italo Rossi fe5fd7667a FS-8768 - [mod_callcenter] Releasing db handle after reserving agent 2016-01-30 22:35:32 -03:00
rajeshvaya 23e53df721 FS-8799 [mod_callcenter] Add JSON API interface for mod_callcenter
Adding a JSON API interface to fetch data in the JSON format. It abides with the JSON command and its implementations by other modules like mod_verto.
It outputs the exactly same column names as the data in CLI.
Various listing of mod_callcenter data such as agents, queues, members, tiers are as follows below.

- Listing of agents
Command: `json {"command": "callcenter_config", "format": "pretty", "data": {"arguments":"agent list"}}`

- Listing of queues
Command: `json {"command": "callcenter_config", "format": "pretty", "data": {"arguments":"queue list"}}`

- Listing of agents for a queue
Command: `json {"command": "callcenter_config", "data": {"arguments":"queue list agents", "queue_name":"support@default"}}`
(`queue_name` is a required)

- Listing of members(callers) for a queue
Command: `json {"command": "callcenter_config", "data": {"arguments":"queue list members", "queue_name":"support@default"}}`

- Listing of tiers for a queue
Command: `json {"command": "callcenter_config","data": {"arguments":"queue list tiers", "queue_name":"support@default"}}`

- Listing of members(callers)
Command: `json {"command": "callcenter_config","data": {"arguments":"member list"}}`

- Listing of tiers
Command: `json {"command": "callcenter_config","data": {"arguments":"tier list"}}`

It handles various errors and also returns back response in JSON as follow
E.g. Send a command without a required field (`queue_name`)
Command: `json {"command": "callcenter_config", "data": {"arguments":"queue list agents"}}`
Output: `{"command":"callcenter_config","data":{"arguments":"queue list agents"},"status":"error","message":"The command returned an error","response":{"error":"Missing data attribute: queue_name"}}`
2016-01-30 12:25:57 +04:00
Anthony Minessale f8b19b7485 FS-8190 #resolve [When using nixevent, freeswitch stops sending us certain custom event that were NOT part of the nixevent command] 2015-09-21 18:00:32 -05:00
Mike Jerris 5c59a0159d FS-7966: fix more msvc 2015 warnings. 2015-08-31 17:08:52 -04:00
Italo Rossi be3c868655 FS-7467: mod_callcenter - Fixing uuid-standby agents. 2015-06-22 17:51:08 -03:00
Italo Rossi bebd4c4e3e FS-7138 - new mod_callcenter param: reserve-agents
Sets the agent state to Reserved before calling him. In this case,
the Agent is first updated to state Reserved ONLY if his previous
state was Waiting and status was Available/Available (On Demand).
The purpose is to avoid possible race conditions when external
applications are manipulating `agents` table.

Disabled by default.
2015-06-08 14:38:51 -03:00
Ítalo Rossi 6f057b795e Merge pull request #249 in FS/freeswitch from ~SAFAROV/freeswitch-mod-radius-cdr_improvement:origin/FS-7524 to master
* commit '7e1f8bc4c7795451ee6140f65588e590cc4af024':
  FS-7524: mod_callcenter - Fixing tiers, level and position should default to 1 instead of 0
2015-06-05 13:08:58 -05:00
Sergey Safarov 7e1f8bc4c7 FS-7524: mod_callcenter - Fixing tiers, level and position should default to 1 instead of 0 2015-06-05 19:35:04 +03:00
Ítalo Rossi 0c45bee409 Merge pull request #257 in FS/freeswitch from ~ITALOROSSI/freeswitch:bugfix/FS-7569-mod_callcenter_strategy to master
* commit '890991cd28bb2b2860c988476f8641d7b32f02c8':
  FS-7569 mod_callcenter - Tracking queue strategy changes to avoid stuck members
2015-06-02 17:48:46 -05:00
Ítalo Rossi e6bb3ed434 Merge pull request #246 in FS/freeswitch from ~ITALOROSSI/freeswitch:bugfix/FS-7464-callcenter-cannot-play-us-ring-tone_stream to master
* commit '1bc241922e3136dda8067723a4d4c9ebdd51f101':
  FS-7464 mod_callcenter moh-sound needs to be expanded when containing variables.
2015-06-02 17:33:29 -05:00