Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
606e197a
提交
606e197a
authored
5月 23, 2013
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-5042 --resolve
上级
1b1bdf68
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
64 行增加
和
16 行删除
+64
-16
conference.conf.xml
.../mod_conference/conf/autoload_configs/conference.conf.xml
+6
-0
mod_conference.c
src/mod/applications/mod_conference/mod_conference.c
+58
-16
没有找到文件。
src/mod/applications/mod_conference/conf/autoload_configs/conference.conf.xml
浏览文件 @
606e197a
...
...
@@ -35,6 +35,12 @@
absolute path means <value>/<confernece_uuid>.cdr.xml
-->
<!-- <param name="cdr-log-dir" value="auto"/> -->
<!-- How to create a CDR event
'content' means event body will contain CDR as XML
'file' means 'CDR-Path' header will contain a path to file created in 'cdr-log-dir'
'none' for no event
-->
<!-- <param name="cdr-event-mode" value="content"/> -->
<!-- Domain (for presence) -->
<param
name=
"domain"
value=
"$${domain}"
/>
...
...
src/mod/applications/mod_conference/mod_conference.c
浏览文件 @
606e197a
...
...
@@ -58,6 +58,7 @@ static int EC = 0;
/* Size to allocate for audio buffers */
#define CONF_BUFFER_SIZE 1024 * 128
#define CONF_EVENT_MAINT "conference::maintenance"
#define CONF_EVENT_CDR "conference::cdr"
#define CONF_DEFAULT_LEADIN 20
#define CONF_DBLOCK_SIZE CONF_BUFFER_SIZE
...
...
@@ -129,7 +130,11 @@ typedef struct conference_cdr_reject_s {
struct
conference_cdr_reject_s
*
next
;
}
conference_cdr_reject_t
;
typedef
enum
{
CDRE_NONE
,
CDRE_AS_CONTENT
,
CDRE_AS_FILE
}
cdr_event_mode_t
;
struct
call_list
{
...
...
@@ -373,6 +378,7 @@ typedef struct conference_obj {
switch_time_t
start_time
;
switch_time_t
end_time
;
char
*
log_dir
;
cdr_event_mode_t
cdr_event_mode
;
struct
vid_helper
vh
[
2
];
struct
vid_helper
mh
;
}
conference_obj_t
;
...
...
@@ -872,10 +878,10 @@ static void conference_cdr_render(conference_obj_t *conference)
conference_cdr_reject_t
*
rp
;
int
cdr_off
=
0
,
conf_off
=
0
;
char
str
[
512
];
char
*
path
,
*
xml_text
;
char
*
path
=
NULL
,
*
xml_text
;
int
fd
;
if
(
zstr
(
conference
->
log_dir
))
return
;
if
(
zstr
(
conference
->
log_dir
)
&&
(
conference
->
cdr_event_mode
==
CDRE_NONE
)
)
return
;
if
(
!
conference
->
cdr_nodes
&&
!
conference
->
cdr_rejected
)
return
;
...
...
@@ -1023,6 +1029,7 @@ static void conference_cdr_render(conference_obj_t *conference)
xml_text
=
switch_xml_toxml
(
cdr
,
SWITCH_TRUE
);
if
(
!
zstr
(
conference
->
log_dir
))
{
path
=
switch_mprintf
(
"%s%s%s.cdr.xml"
,
conference
->
log_dir
,
SWITCH_PATH_SEPARATOR
,
conference
->
uuid_str
);
...
...
@@ -1043,6 +1050,24 @@ static void conference_cdr_render(conference_obj_t *conference)
path
,
switch_strerror_r
(
errno
,
ebuf
,
sizeof
(
ebuf
)));
}
if
(
conference
->
cdr_event_mode
!=
CDRE_NONE
)
{
switch_event_t
*
event
;
if
(
switch_event_create_subclass
(
&
event
,
SWITCH_EVENT_CUSTOM
,
CONF_EVENT_CDR
)
==
SWITCH_STATUS_SUCCESS
)
// if (switch_event_create(&event, SWITCH_EVENT_CDR) == SWITCH_STATUS_SUCCESS)
{
switch_event_add_header_string
(
event
,
SWITCH_STACK_BOTTOM
,
"CDR-Source"
,
CONF_EVENT_CDR
);
if
(
conference
->
cdr_event_mode
==
CDRE_AS_CONTENT
)
{
switch_event_add_body
(
event
,
xml_text
);
}
else
{
switch_event_add_header_string
(
event
,
SWITCH_STACK_BOTTOM
,
"CDR-Path"
,
path
);
}
switch_event_fire
(
&
event
);
}
else
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"Could not create CDR event"
);
}
}
}
switch_safe_free
(
path
);
switch_safe_free
(
xml_text
);
...
...
@@ -8117,6 +8142,7 @@ static conference_obj_t *conference_new(char *name, conf_xml_cfg_t cfg, switch_c
char
*
verbose_events
=
NULL
;
char
*
auto_record
=
NULL
;
char
*
conference_log_dir
=
NULL
;
char
*
cdr_event_mode
=
NULL
;
char
*
terminate_on_silence
=
NULL
;
char
*
endconf_grace_time
=
NULL
;
char
uuid_str
[
SWITCH_UUID_FORMATTED_LENGTH
+
1
];
...
...
@@ -8255,6 +8281,8 @@ static conference_obj_t *conference_new(char *name, conf_xml_cfg_t cfg, switch_c
conference_flags
=
val
;
}
else
if
(
!
strcasecmp
(
var
,
"cdr-log-dir"
)
&&
!
zstr
(
val
))
{
conference_log_dir
=
val
;
}
else
if
(
!
strcasecmp
(
var
,
"cdr-event-mode"
)
&&
!
zstr
(
val
))
{
cdr_event_mode
=
val
;
}
else
if
(
!
strcasecmp
(
var
,
"kicked-sound"
)
&&
!
zstr
(
val
))
{
kicked_sound
=
val
;
}
else
if
(
!
strcasecmp
(
var
,
"pin"
)
&&
!
zstr
(
val
))
{
...
...
@@ -8416,6 +8444,20 @@ static conference_obj_t *conference_new(char *name, conf_xml_cfg_t cfg, switch_c
}
if
(
!
zstr
(
cdr_event_mode
))
{
if
(
!
strcmp
(
cdr_event_mode
,
"content"
))
{
conference
->
cdr_event_mode
=
CDRE_AS_CONTENT
;
}
else
if
(
!
strcmp
(
cdr_event_mode
,
"file"
))
{
if
(
!
zstr
(
conference
->
log_dir
))
{
conference
->
cdr_event_mode
=
CDRE_AS_FILE
;
}
else
{
conference
->
cdr_event_mode
=
CDRE_NONE
;
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_WARNING
,
"'cdr-log-dir' parameter not set; CDR event mode 'file' ignored"
);
}
}
else
{
conference
->
cdr_event_mode
=
CDRE_NONE
;
}
}
if
(
!
zstr
(
perpetual_sound
))
{
conference
->
perpetual_sound
=
switch_core_strdup
(
conference
->
pool
,
perpetual_sound
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论