211 Commits

Author SHA1 Message Date
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
Michael Jerris
164c6111a1 FS-7966: remove some older versions of msvc build system as these will no longer work soon, please use 2015 instead 2015-08-31 10:19:10 -05:00
Michael Giagnocavo
5e456fe9a6 FS-7966. First pass at moving to Visual Studio 2015.
The new C compiler breaks a lot of things. snprintf and timespec now exist, and redefining causes an error.
Many more things are warnings, so warnings-as-errors will fail - remove it from some projects for now.
V8: don't pass VS version to build batch file.
mod_sofia: Config has too-long if/elseif chain. Break this up to avoid "parser stack overflow; program too complex".
Add mod_conference.h to project and dir to includes.
2015-08-21 18:28:32 -04:00
Italo Rossi
be3c868655 FS-7467: mod_callcenter - Fixing uuid-standby agents. 2015-06-22 17:51:08 -03:00
Michael Giagnocavo
f116387443 FS-7644. Change 2013.vcxproj references to 2013 2015-06-18 04:17:53 -06:00
Jeff Lenk
345e50d25a FS-7644 2015-06-11 15:29:28 -05:00
Michael Jerris
2cc0348422 FS-7635: remove msvc 2005 2008 and 2010 non working build systems. There are now multiple more recent (3 different ones) and some free versions of the compiler that can be used. 2015-06-10 16:33:14 -04: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
Italo Rossi
890991cd28 FS-7569 mod_callcenter - Tracking queue strategy changes to avoid stuck members 2015-05-25 15:00:14 -03:00
Italo Rossi
1bc241922e FS-7464 mod_callcenter moh-sound needs to be expanded when containing variables. 2015-05-03 20:25:42 -03:00
Victor Torres
69d5333bfc FS-7445 fixes cc_outbound_cid_name_prefix 2015-04-17 18:50:16 -03:00
Artur Zaprzała
0df4085c3d Fix race condition when callcenter member cancels the call. 2015-02-18 14:26:02 +01:00
Marc Olivier Chouinard
e1cb0e8632 Merge pull request #127 in FS/freeswitch from ~ITALOROSSI/freeswitch:mod_callcenter-queue-list-count-by-state to master
* commit 'f63f8686bc8da391b3c46b24e10571215c8b377f':
  FS-7049 - Documentation for state optional paramenter in callcenter_config queue list and count
  fix FS-7049 - Count and list agents based on their state
2014-12-11 21:01:03 -06:00
Italo Rossi
f63f8686bc FS-7049 - Documentation for state optional paramenter in callcenter_config queue list and count 2014-12-11 23:43:03 -03:00
Humberto Diógenes
1bcdb49bce Fix JIRA (FS-7018): mod_callcenter's longest-idle-agent strategy is unfair 2014-12-04 16:12:20 -03:00
Italo Rossi
80649df65c fix FS-7049 - Count and list agents based on their state 2014-12-02 22:57:43 -03:00
Italo Rossi
f87c335e8a Only waiting for agent channel to hangup.
If the member do an attended transfer this loop stops and
the agent is set to Available state again, when in fact he still
busy with other channel.

This was happening, for example, when a member calls support queue, then
the support operator do an attended transfer to sales queue, while the sales
operator is talking the member that was transferred, the sales queue will
send calls to the operator, which is not expected.
2014-11-03 12:02:03 -03:00
Brian West
07f4c6204e FS-6646 --resolve 2014-07-11 11:03:22 -05:00
Marc Olivier Chouinard
29e2263442 CID:1210789 Make return value of a function available from the another calling function. Also add a small status check. 2014-05-16 17:18:17 -04:00
Marc Olivier Chouinard
8fa7398760 CID:1025868 Simplified a function arguments never called. 2014-05-16 17:03:59 -04:00
Anthony Minessale
7151d6acea FS-6402 part 2 2014-04-02 03:21:37 +05:00