Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
7b1ea2c8
提交
7b1ea2c8
authored
1月 17, 2013
作者:
Raymond Chandler
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of fs-git:freeswitch
上级
591c62ee
8ae4114d
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
16 行增加
和
16 行删除
+16
-16
mod_fifo.c
src/mod/applications/mod_fifo/mod_fifo.c
+16
-16
没有找到文件。
src/mod/applications/mod_fifo/mod_fifo.c
浏览文件 @
7b1ea2c8
...
...
@@ -1409,7 +1409,7 @@ static void *SWITCH_THREAD_FUNC ringall_thread_run(switch_thread_t *thread, void
struct
call_helper
*
h
=
cbh
->
rows
[
i
];
char
*
sql
=
switch_mprintf
(
"update fifo_outbound set ring_count=ring_count+1 where uuid='%s'"
,
h
->
uuid
);
fifo_execute_sql_queued
(
&
sql
,
SWITCH_TRUE
,
SWITCH_
TRU
E
);
fifo_execute_sql_queued
(
&
sql
,
SWITCH_TRUE
,
SWITCH_
FALS
E
);
}
...
...
@@ -1451,7 +1451,7 @@ static void *SWITCH_THREAD_FUNC ringall_thread_run(switch_thread_t *thread, void
struct
call_helper
*
h
=
cbh
->
rows
[
i
];
char
*
sql
=
switch_mprintf
(
"update fifo_outbound set ring_count=ring_count-1 "
"where uuid='%q' and ring_count > 0"
,
h
->
uuid
);
fifo_execute_sql_queued
(
&
sql
,
SWITCH_TRUE
,
SWITCH_
TRU
E
);
fifo_execute_sql_queued
(
&
sql
,
SWITCH_TRUE
,
SWITCH_
FALS
E
);
}
}
...
...
@@ -1465,7 +1465,7 @@ static void *SWITCH_THREAD_FUNC ringall_thread_run(switch_thread_t *thread, void
"outbound_fail_total_count = outbound_fail_total_count+1, "
"next_avail=%ld + lag + 1 where uuid='%q' and ring_count > 0"
,
(
long
)
switch_epoch_time_now
(
NULL
),
h
->
uuid
);
fifo_execute_sql_queued
(
&
sql
,
SWITCH_TRUE
,
SWITCH_
TRU
E
);
fifo_execute_sql_queued
(
&
sql
,
SWITCH_TRUE
,
SWITCH_
FALS
E
);
}
}
...
...
@@ -1522,7 +1522,7 @@ static void *SWITCH_THREAD_FUNC ringall_thread_run(switch_thread_t *thread, void
for
(
i
=
0
;
i
<
cbh
->
rowcount
;
i
++
)
{
struct
call_helper
*
h
=
cbh
->
rows
[
i
];
char
*
sql
=
switch_mprintf
(
"update fifo_outbound set ring_count=ring_count-1 where uuid='%q' and ring_count > 0"
,
h
->
uuid
);
fifo_execute_sql_queued
(
&
sql
,
SWITCH_TRUE
,
SWITCH_
TRU
E
);
fifo_execute_sql_queued
(
&
sql
,
SWITCH_TRUE
,
SWITCH_
FALS
E
);
}
end:
...
...
@@ -1632,7 +1632,7 @@ static void *SWITCH_THREAD_FUNC o_thread_run(switch_thread_t *thread, void *obj)
sql
=
switch_mprintf
(
"update fifo_outbound set ring_count=ring_count+1 where uuid='%s'"
,
h
->
uuid
);
fifo_execute_sql_queued
(
&
sql
,
SWITCH_TRUE
,
SWITCH_
TRU
E
);
fifo_execute_sql_queued
(
&
sql
,
SWITCH_TRUE
,
SWITCH_
FALS
E
);
status
=
switch_ivr_originate
(
NULL
,
&
session
,
&
cause
,
originate_string
,
h
->
timeout
,
NULL
,
NULL
,
NULL
,
NULL
,
ovars
,
SOF_NONE
,
NULL
);
free
(
originate_string
);
...
...
@@ -1642,7 +1642,7 @@ static void *SWITCH_THREAD_FUNC o_thread_run(switch_thread_t *thread, void *obj)
sql
=
switch_mprintf
(
"update fifo_outbound set ring_count=ring_count-1, "
"outbound_fail_count=outbound_fail_count+1, next_avail=%ld + lag + 1 where uuid='%q'"
,
(
long
)
switch_epoch_time_now
(
NULL
),
h
->
uuid
);
fifo_execute_sql_queued
(
&
sql
,
SWITCH_TRUE
,
SWITCH_
TRU
E
);
fifo_execute_sql_queued
(
&
sql
,
SWITCH_TRUE
,
SWITCH_
FALS
E
);
if
(
switch_event_create_subclass
(
&
event
,
SWITCH_EVENT_CUSTOM
,
FIFO_EVENT
)
==
SWITCH_STATUS_SUCCESS
)
{
switch_event_add_header_string
(
event
,
SWITCH_STACK_BOTTOM
,
"FIFO-Name"
,
node
->
name
);
...
...
@@ -2150,7 +2150,7 @@ static void dec_use_count(switch_core_session_t *session, switch_bool_t send_eve
del_bridge_call
(
outbound_id
);
sql
=
switch_mprintf
(
"update fifo_outbound set use_count=use_count-1, stop_time=%ld, next_avail=%ld + lag + 1 where use_count > 0 and uuid='%q'"
,
now
,
now
,
outbound_id
);
fifo_execute_sql_queued
(
&
sql
,
SWITCH_TRUE
,
SWITCH_
TRU
E
);
fifo_execute_sql_queued
(
&
sql
,
SWITCH_TRUE
,
SWITCH_
FALS
E
);
}
if
(
send_event
)
{
...
...
@@ -2252,7 +2252,7 @@ static void fifo_caller_add(fifo_node_t *node, switch_core_session_t *session)
switch_str_nil
(
switch_channel_get_variable
(
channel
,
"caller_id_number"
)),
switch_epoch_time_now
(
NULL
));
fifo_execute_sql_queued
(
&
sql
,
SWITCH_TRUE
,
SWITCH_
TRU
E
);
fifo_execute_sql_queued
(
&
sql
,
SWITCH_TRUE
,
SWITCH_
FALS
E
);
}
static
void
fifo_caller_del
(
const
char
*
uuid
)
...
...
@@ -3038,7 +3038,7 @@ SWITCH_STANDARD_APP(fifo_function)
switch_epoch_time_now
(
NULL
),
outbound_id
);
fifo_execute_sql_queued
(
&
sql
,
SWITCH_TRUE
,
SWITCH_
TRU
E
);
fifo_execute_sql_queued
(
&
sql
,
SWITCH_TRUE
,
SWITCH_
FALS
E
);
}
add_bridge_call
(
switch_core_session_get_uuid
(
other_session
));
...
...
@@ -3073,7 +3073,7 @@ SWITCH_STANDARD_APP(fifo_function)
"outbound_call_count=outbound_call_count+1, next_avail=%ld + lag + 1 where uuid='%s' and use_count > 0"
,
now
,
now
,
outbound_id
);
fifo_execute_sql_queued
(
&
sql
,
SWITCH_TRUE
,
SWITCH_
TRU
E
);
fifo_execute_sql_queued
(
&
sql
,
SWITCH_TRUE
,
SWITCH_
FALS
E
);
del_bridge_call
(
outbound_id
);
...
...
@@ -4072,7 +4072,7 @@ static switch_status_t load_config(int reload, int del_all)
if
(
!
reload
)
{
char
*
sql
=
"update fifo_outbound set start_time=0,stop_time=0,ring_count=0,use_count=0,outbound_call_count=0,outbound_fail_count=0 where static=0"
;
fifo_execute_sql_queued
(
&
sql
,
SWITCH_FALSE
,
SWITCH_
TRU
E
);
fifo_execute_sql_queued
(
&
sql
,
SWITCH_FALSE
,
SWITCH_
FALS
E
);
}
if
(
reload
)
{
...
...
@@ -4095,7 +4095,7 @@ static switch_status_t load_config(int reload, int del_all)
sql
=
switch_mprintf
(
"delete from fifo_outbound where static=1 and hostname='%q'"
,
globals
.
hostname
);
}
fifo_execute_sql_queued
(
&
sql
,
SWITCH_TRUE
,
SWITCH_
TRU
E
);
fifo_execute_sql_queued
(
&
sql
,
SWITCH_TRUE
,
SWITCH_
FALS
E
);
if
(
!
(
node
=
switch_core_hash_find
(
globals
.
fifo_hash
,
MANUAL_QUEUE_NAME
)))
{
node
=
create_node
(
MANUAL_QUEUE_NAME
,
0
,
globals
.
sql_mutex
);
...
...
@@ -4248,7 +4248,7 @@ static switch_status_t load_config(int reload, int del_all)
(
long
)
switch_epoch_time_now
(
NULL
));
switch_assert
(
sql
);
fifo_execute_sql_queued
(
&
sql
,
SWITCH_TRUE
,
SWITCH_
TRU
E
);
fifo_execute_sql_queued
(
&
sql
,
SWITCH_TRUE
,
SWITCH_
FALS
E
);
free
(
name_dup
);
node
->
has_outbound
=
1
;
node
->
member_count
++
;
...
...
@@ -4303,7 +4303,7 @@ static void fifo_member_add(char *fifo_name, char *originate_string, int simo_co
sql
=
switch_mprintf
(
"delete from fifo_outbound where fifo_name='%q' and uuid = '%q'"
,
fifo_name
,
digest
);
switch_assert
(
sql
);
fifo_execute_sql_queued
(
&
sql
,
SWITCH_TRUE
,
SWITCH_
TRU
E
);
fifo_execute_sql_queued
(
&
sql
,
SWITCH_TRUE
,
SWITCH_
FALS
E
);
switch_mutex_lock
(
globals
.
mutex
);
...
...
@@ -4325,7 +4325,7 @@ static void fifo_member_add(char *fifo_name, char *originate_string, int simo_co
digest
,
fifo_name
,
originate_string
,
simo_count
,
0
,
timeout
,
lag
,
0
,
(
long
)
expires
,
globals
.
hostname
,
taking_calls
,
(
long
)
switch_epoch_time_now
(
NULL
));
switch_assert
(
sql
);
fifo_execute_sql_queued
(
&
sql
,
SWITCH_TRUE
,
SWITCH_
TRU
E
);
fifo_execute_sql_queued
(
&
sql
,
SWITCH_TRUE
,
SWITCH_
FALS
E
);
free
(
name_dup
);
cbt
.
buf
=
outbound_count
;
...
...
@@ -4360,7 +4360,7 @@ static void fifo_member_del(char *fifo_name, char *originate_string)
sql
=
switch_mprintf
(
"delete from fifo_outbound where fifo_name='%q' and uuid = '%q' and hostname='%q'"
,
fifo_name
,
digest
,
globals
.
hostname
);
switch_assert
(
sql
);
fifo_execute_sql_queued
(
&
sql
,
SWITCH_TRUE
,
SWITCH_
TRU
E
);
fifo_execute_sql_queued
(
&
sql
,
SWITCH_TRUE
,
SWITCH_
FALS
E
);
switch_mutex_lock
(
globals
.
mutex
);
if
(
!
(
node
=
switch_core_hash_find
(
globals
.
fifo_hash
,
fifo_name
)))
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论