Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
d5d6b298
提交
d5d6b298
authored
7月 12, 2012
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add outcall-templ
上级
03a21977
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
34 行增加
和
11 行删除
+34
-11
mod_conference.c
src/mod/applications/mod_conference/mod_conference.c
+34
-11
没有找到文件。
src/mod/applications/mod_conference/mod_conference.c
浏览文件 @
d5d6b298
...
@@ -291,6 +291,7 @@ typedef struct conference_obj {
...
@@ -291,6 +291,7 @@ typedef struct conference_obj {
char
*
special_announce
;
char
*
special_announce
;
char
*
auto_record
;
char
*
auto_record
;
char
*
record_filename
;
char
*
record_filename
;
char
*
outcall_templ
;
uint32_t
terminate_on_silence
;
uint32_t
terminate_on_silence
;
uint32_t
max_members
;
uint32_t
max_members
;
uint32_t
doc_version
;
uint32_t
doc_version
;
...
@@ -1311,10 +1312,10 @@ static switch_status_t conference_add_member(conference_obj_t *conference, confe
...
@@ -1311,10 +1312,10 @@ static switch_status_t conference_add_member(conference_obj_t *conference, confe
switch_channel_set_variable
(
channel
,
CONFERENCE_UUID_VARIABLE
,
conference
->
uuid_str
);
switch_channel_set_variable
(
channel
,
CONFERENCE_UUID_VARIABLE
,
conference
->
uuid_str
);
if
(
!
switch_channel_get_variable
(
channel
,
"conference_
dial_str
"
))
{
if
(
!
switch_channel_get_variable
(
channel
,
"conference_
call_key
"
))
{
char
*
key
=
switch_core_session_sprintf
(
member
->
session
,
"conf_%s_%s_%s"
,
char
*
key
=
switch_core_session_sprintf
(
member
->
session
,
"conf_%s_%s_%s"
,
conference
->
name
,
conference
->
domain
,
switch_channel_get_variable
(
channel
,
"caller_id_number"
));
conference
->
name
,
conference
->
domain
,
switch_channel_get_variable
(
channel
,
"caller_id_number"
));
switch_channel_set_variable
(
channel
,
"conference_
dial_str
"
,
key
);
switch_channel_set_variable
(
channel
,
"conference_
call_key
"
,
key
);
}
}
...
@@ -1532,7 +1533,7 @@ static switch_status_t conference_del_member(conference_obj_t *conference, confe
...
@@ -1532,7 +1533,7 @@ static switch_status_t conference_del_member(conference_obj_t *conference, confe
conference_send_presence
(
conference
);
conference_send_presence
(
conference
);
switch_channel_set_variable
(
channel
,
"conference_
dial_str
"
,
NULL
);
switch_channel_set_variable
(
channel
,
"conference_
call_key
"
,
NULL
);
if
((
conference
->
min
&&
switch_test_flag
(
conference
,
CFLAG_ENFORCE_MIN
)
&&
conference
->
count
<
conference
->
min
)
if
((
conference
->
min
&&
switch_test_flag
(
conference
,
CFLAG_ENFORCE_MIN
)
&&
conference
->
count
<
conference
->
min
)
||
(
switch_test_flag
(
conference
,
CFLAG_DYNAMIC
)
&&
conference
->
count
==
0
))
{
||
(
switch_test_flag
(
conference
,
CFLAG_DYNAMIC
)
&&
conference
->
count
==
0
))
{
...
@@ -7500,6 +7501,7 @@ static conference_obj_t *conference_new(char *name, conf_xml_cfg_t cfg, switch_c
...
@@ -7500,6 +7501,7 @@ static conference_obj_t *conference_new(char *name, conf_xml_cfg_t cfg, switch_c
char
*
conference_flags
=
NULL
;
char
*
conference_flags
=
NULL
;
char
*
perpetual_sound
=
NULL
;
char
*
perpetual_sound
=
NULL
;
char
*
moh_sound
=
NULL
;
char
*
moh_sound
=
NULL
;
char
*
outcall_templ
=
NULL
;
uint32_t
max_members
=
0
;
uint32_t
max_members
=
0
;
uint32_t
announce_count
=
0
;
uint32_t
announce_count
=
0
;
char
*
maxmember_sound
=
NULL
;
char
*
maxmember_sound
=
NULL
;
...
@@ -7618,6 +7620,8 @@ static conference_obj_t *conference_new(char *name, conf_xml_cfg_t cfg, switch_c
...
@@ -7618,6 +7620,8 @@ static conference_obj_t *conference_new(char *name, conf_xml_cfg_t cfg, switch_c
tts_voice
=
val
;
tts_voice
=
val
;
}
else
if
(
!
strcasecmp
(
var
,
"enter-sound"
)
&&
!
zstr
(
val
))
{
}
else
if
(
!
strcasecmp
(
var
,
"enter-sound"
)
&&
!
zstr
(
val
))
{
enter_sound
=
val
;
enter_sound
=
val
;
}
else
if
(
!
strcasecmp
(
var
,
"outcall-templ"
)
&&
!
zstr
(
val
))
{
outcall_templ
=
val
;
}
else
if
(
!
strcasecmp
(
var
,
"exit-sound"
)
&&
!
zstr
(
val
))
{
}
else
if
(
!
strcasecmp
(
var
,
"exit-sound"
)
&&
!
zstr
(
val
))
{
exit_sound
=
val
;
exit_sound
=
val
;
}
else
if
(
!
strcasecmp
(
var
,
"alone-sound"
)
&&
!
zstr
(
val
))
{
}
else
if
(
!
strcasecmp
(
var
,
"alone-sound"
)
&&
!
zstr
(
val
))
{
...
@@ -7784,6 +7788,9 @@ static conference_obj_t *conference_new(char *name, conf_xml_cfg_t cfg, switch_c
...
@@ -7784,6 +7788,9 @@ static conference_obj_t *conference_new(char *name, conf_xml_cfg_t cfg, switch_c
conference
->
caller_id_number
=
switch_core_strdup
(
conference
->
pool
,
caller_id_number
);
conference
->
caller_id_number
=
switch_core_strdup
(
conference
->
pool
,
caller_id_number
);
conference
->
caller_controls
=
switch_core_strdup
(
conference
->
pool
,
caller_controls
);
conference
->
caller_controls
=
switch_core_strdup
(
conference
->
pool
,
caller_controls
);
conference
->
moderator_controls
=
switch_core_strdup
(
conference
->
pool
,
moderator_controls
);
conference
->
moderator_controls
=
switch_core_strdup
(
conference
->
pool
,
moderator_controls
);
if
(
outcall_templ
)
{
conference
->
outcall_templ
=
switch_core_strdup
(
conference
->
pool
,
outcall_templ
);
}
conference
->
run_time
=
switch_epoch_time_now
(
NULL
);
conference
->
run_time
=
switch_epoch_time_now
(
NULL
);
if
(
!
zstr
(
conference_log_dir
))
{
if
(
!
zstr
(
conference_log_dir
))
{
...
@@ -8079,11 +8086,12 @@ static void call_setup_event_handler(switch_event_t *event)
...
@@ -8079,11 +8086,12 @@ static void call_setup_event_handler(switch_event_t *event)
if
(
!
zstr
(
conf
)
&&
!
zstr
(
dial_str
)
&&
!
zstr
(
action
)
&&
(
conference
=
conference_find
(
conf
,
domain
)))
{
if
(
!
zstr
(
conf
)
&&
!
zstr
(
dial_str
)
&&
!
zstr
(
action
)
&&
(
conference
=
conference_find
(
conf
,
domain
)))
{
switch_event_t
*
var_event
;
switch_event_t
*
var_event
;
switch_event_header_t
*
hp
;
switch_event_header_t
*
hp
;
char
*
key
=
NULL
;
key
=
switch_mprintf
(
"conf_%s_%s_%s"
,
conference
->
name
,
conference
->
domain
,
ext
);
if
(
switch_test_flag
(
conference
,
CFLAG_RFC4579
))
{
if
(
switch_test_flag
(
conference
,
CFLAG_RFC4579
))
{
char
*
key
=
switch_mprintf
(
"conf_%s_%s_%s"
,
conference
->
name
,
conference
->
domain
,
ext
);
char
*
expanded
=
NULL
,
*
ostr
=
dial_str
;;
if
(
!
strcasecmp
(
action
,
"call"
))
{
if
(
!
strcasecmp
(
action
,
"call"
))
{
if
(
switch_event_create_plain
(
&
var_event
,
SWITCH_EVENT_CHANNEL_DATA
)
!=
SWITCH_STATUS_SUCCESS
)
{
if
(
switch_event_create_plain
(
&
var_event
,
SWITCH_EVENT_CHANNEL_DATA
)
!=
SWITCH_STATUS_SUCCESS
)
{
...
@@ -8096,17 +8104,32 @@ static void call_setup_event_handler(switch_event_t *event)
...
@@ -8096,17 +8104,32 @@ static void call_setup_event_handler(switch_event_t *event)
}
}
}
}
switch_event_add_header_string
(
var_event
,
SWITCH_STACK_BOTTOM
,
"conference_dial_str"
,
key
);
switch_event_add_header_string
(
var_event
,
SWITCH_STACK_BOTTOM
,
"conference_call_key"
,
key
);
switch_event_add_header_string
(
var_event
,
SWITCH_STACK_BOTTOM
,
"conference_destination_number"
,
ext
);
if
(
!
strncasecmp
(
ostr
,
"url+"
,
4
))
{
ostr
+=
4
;
}
else
if
(
conference
->
outcall_templ
)
{
if
((
expanded
=
switch_event_expand_headers
(
var_event
,
conference
->
outcall_templ
)))
{
ostr
=
expanded
;
}
}
conference_outcall_bg
(
conference
,
NULL
,
NULL
,
dial_
str
,
60
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
&
var_event
);
conference_outcall_bg
(
conference
,
NULL
,
NULL
,
o
str
,
60
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
&
var_event
);
if
(
expanded
&&
expanded
!=
conference
->
outcall_templ
)
{
switch_safe_free
(
expanded
);
}
}
else
if
(
!
strcasecmp
(
action
,
"end"
))
{
}
else
if
(
!
strcasecmp
(
action
,
"end"
))
{
//switch_core_session_hupall_matching_var("conference_
dial_str
", key, SWITCH_CAUSE_NORMAL_CLEARING);
//switch_core_session_hupall_matching_var("conference_
call_key
", key, SWITCH_CAUSE_NORMAL_CLEARING);
kickall_matching_var
(
conference
,
"conference_
dial_str
"
,
key
);
kickall_matching_var
(
conference
,
"conference_
call_key
"
,
key
);
}
}
switch_safe_free
(
key
);
}
}
switch_safe_free
(
key
);
switch_thread_rwlock_unlock
(
conference
->
rwlock
);
switch_thread_rwlock_unlock
(
conference
->
rwlock
);
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论