Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
1944f9a5
提交
1944f9a5
authored
11月 07, 2014
作者:
Aaron Paolozzi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-6968 Changes to mod_fifo.c to add outbound_per_cycle_min
上级
75815877
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
39 行增加
和
1 行删除
+39
-1
mod_fifo.c
src/mod/applications/mod_fifo/mod_fifo.c
+39
-1
没有找到文件。
src/mod/applications/mod_fifo/mod_fifo.c
浏览文件 @
1944f9a5
...
@@ -79,6 +79,15 @@ SWITCH_MODULE_DEFINITION(mod_fifo, mod_fifo_load, mod_fifo_shutdown, NULL);
...
@@ -79,6 +79,15 @@ SWITCH_MODULE_DEFINITION(mod_fifo, mod_fifo_load, mod_fifo_shutdown, NULL);
* The /enterprise/ outbound strategy does not preserve the caller ID
* The /enterprise/ outbound strategy does not preserve the caller ID
* of the caller thereby allowing deliver of callers to agents at the
* of the caller thereby allowing deliver of callers to agents at the
* fastest possible rate.
* fastest possible rate.
*
* outbound_per_cycle is used to define the maximum number of agents
* who will be available to answer a single caller. In ringall this
* maximum is the number who will be called, in enterprise the need defines
* how many agents will be called. outbound_per_cycle_min will define
* the minimum agents who will be called to answer a caller regardless of
* need, giving the enterprise strategy the ability to ring through more
* than one agent for one caller.
*
*
* ## Manual calls
* ## Manual calls
*
*
...
@@ -391,6 +400,7 @@ struct fifo_node {
...
@@ -391,6 +400,7 @@ struct fifo_node {
long
busy
;
long
busy
;
int
is_static
;
int
is_static
;
int
outbound_per_cycle
;
int
outbound_per_cycle
;
int
outbound_per_cycle_min
;
char
*
outbound_name
;
char
*
outbound_name
;
outbound_strategy_t
outbound_strategy
;
outbound_strategy_t
outbound_strategy
;
int
ring_timeout
;
int
ring_timeout
;
...
@@ -1985,6 +1995,21 @@ static int place_call_enterprise_callback(void *pArg, int argc, char **argv, cha
...
@@ -1985,6 +1995,21 @@ static int place_call_enterprise_callback(void *pArg, int argc, char **argv, cha
* the results. The enterprise strategy handler can simply take each
* the results. The enterprise strategy handler can simply take each
* member one at a time, so the `place_call_enterprise_callback` takes
* member one at a time, so the `place_call_enterprise_callback` takes
* care of invoking the handler.
* care of invoking the handler.
*
* Within the ringall call strategy outbound_per_cycle is used to define
* how many agents exactly are assigned to the caller. With ringall if
* multiple callers are calling in and one is answered, because the call
* is assigned to all agents the call to the agents that is not answered
* will be lose raced and the other agents will drop the call before the
* next one will begin to ring. When oubound_per_cycle is used in the
* enterprise strategy it acts as a maximum value for how many agents
* are rung at once on any call, the caller is not assigned to any agent
* until the call is answered. Enterprise only rings the number of phones
* that are needed, so outbound_per_cycle as a max does not give you the
* effect of ringall. outbound_per_cycle_min defines how many agents minimum
* will be rung by an incoming caller through fifo, which can give a ringall
* effect. outbound_per_cycle and outbound_per_cycle_min both default to 1.
*
*/
*/
static
void
find_consumers
(
fifo_node_t
*
node
)
static
void
find_consumers
(
fifo_node_t
*
node
)
{
{
...
@@ -2005,6 +2030,8 @@ static void find_consumers(fifo_node_t *node)
...
@@ -2005,6 +2030,8 @@ static void find_consumers(fifo_node_t *node)
if
(
node
->
outbound_per_cycle
&&
node
->
outbound_per_cycle
<
need
)
{
if
(
node
->
outbound_per_cycle
&&
node
->
outbound_per_cycle
<
need
)
{
need
=
node
->
outbound_per_cycle
;
need
=
node
->
outbound_per_cycle
;
}
else
if
(
node
->
outbound_per_cycle_min
&&
node
->
outbound_per_cycle_min
>
need
)
{
need
=
node
->
outbound_per_cycle_min
;
}
}
fifo_execute_sql_callback
(
globals
.
sql_mutex
,
sql
,
place_call_enterprise_callback
,
&
need
);
fifo_execute_sql_callback
(
globals
.
sql_mutex
,
sql
,
place_call_enterprise_callback
,
&
need
);
...
@@ -4045,6 +4072,9 @@ static void list_node(fifo_node_t *node, switch_xml_t x_report, int *off, int ve
...
@@ -4045,6 +4072,9 @@ static void list_node(fifo_node_t *node, switch_xml_t x_report, int *off, int ve
switch_snprintf
(
tmp
,
sizeof
(
buffer
),
"%u"
,
node
->
outbound_per_cycle
);
switch_snprintf
(
tmp
,
sizeof
(
buffer
),
"%u"
,
node
->
outbound_per_cycle
);
switch_xml_set_attr_d
(
x_fifo
,
"outbound_per_cycle"
,
tmp
);
switch_xml_set_attr_d
(
x_fifo
,
"outbound_per_cycle"
,
tmp
);
switch_snprintf
(
tmp
,
sizeof
(
buffer
),
"%u"
,
node
->
outbound_per_cycle_min
);
switch_xml_set_attr_d
(
x_fifo
,
"outbound_per_cycle_min"
,
tmp
);
switch_snprintf
(
tmp
,
sizeof
(
buffer
),
"%u"
,
node
->
ring_timeout
);
switch_snprintf
(
tmp
,
sizeof
(
buffer
),
"%u"
,
node
->
ring_timeout
);
switch_xml_set_attr_d
(
x_fifo
,
"ring_timeout"
,
tmp
);
switch_xml_set_attr_d
(
x_fifo
,
"ring_timeout"
,
tmp
);
...
@@ -4088,6 +4118,7 @@ void node_dump(switch_stream_handle_t *stream)
...
@@ -4088,6 +4118,7 @@ void node_dump(switch_stream_handle_t *stream)
stream
->
write_function
(
stream
,
"node: %s
\n
"
stream
->
write_function
(
stream
,
"node: %s
\n
"
" outbound_name: %s
\n
"
" outbound_name: %s
\n
"
" outbound_per_cycle: %d"
" outbound_per_cycle: %d"
" outbound_per_cycle_min: %d"
" outbound_priority: %d"
" outbound_priority: %d"
" outbound_strategy: %s
\n
"
" outbound_strategy: %s
\n
"
" has_outbound: %d
\n
"
" has_outbound: %d
\n
"
...
@@ -4096,7 +4127,7 @@ void node_dump(switch_stream_handle_t *stream)
...
@@ -4096,7 +4127,7 @@ void node_dump(switch_stream_handle_t *stream)
" ready: %d
\n
"
" ready: %d
\n
"
" waiting: %d
\n
"
" waiting: %d
\n
"
,
,
node
->
name
,
node
->
outbound_name
,
node
->
outbound_per_cycle
,
node
->
name
,
node
->
outbound_name
,
node
->
outbound_per_cycle
,
node
->
outbound_per_cycle_min
,
node
->
outbound_priority
,
print_strategy
(
node
->
outbound_strategy
),
node
->
outbound_priority
,
print_strategy
(
node
->
outbound_strategy
),
node
->
has_outbound
,
node
->
has_outbound
,
node
->
outbound_priority
,
node
->
outbound_priority
,
...
@@ -4508,6 +4539,13 @@ static switch_status_t load_config(int reload, int del_all)
...
@@ -4508,6 +4539,13 @@ static switch_status_t load_config(int reload, int del_all)
node
->
has_outbound
=
1
;
node
->
has_outbound
=
1
;
}
}
node
->
outbound_per_cycle_min
=
1
;
if
((
val
=
switch_xml_attr
(
fifo
,
"outbound_per_cycle_min"
)))
{
if
(
!
((
i
=
atoi
(
val
))
<
0
))
{
node
->
outbound_per_cycle_min
=
i
;
}
}
if
((
val
=
switch_xml_attr
(
fifo
,
"retry_delay"
)))
{
if
((
val
=
switch_xml_attr
(
fifo
,
"retry_delay"
)))
{
if
((
i
=
atoi
(
val
))
<
0
)
i
=
0
;
if
((
i
=
atoi
(
val
))
<
0
)
i
=
0
;
node
->
retry_delay
=
i
;
node
->
retry_delay
=
i
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论