Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
22abe48d
提交
22abe48d
authored
4月 01, 2008
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update
git-svn-id:
http://svn.freeswitch.org/svn/freeswitch/trunk@7999
d0543943-73ff-0310-b7d9-9358b9ac24b2
上级
c4731dbf
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
39 行增加
和
12 行删除
+39
-12
sofia.c
src/mod/endpoints/mod_sofia/sofia.c
+39
-12
没有找到文件。
src/mod/endpoints/mod_sofia/sofia.c
浏览文件 @
22abe48d
...
...
@@ -908,6 +908,30 @@ static void parse_gateways(sofia_profile_t *profile, switch_xml_t gateways_tag)
}
}
static
void
parse_domain_tag
(
sofia_profile_t
*
profile
,
switch_xml_t
x_domain_tag
,
const
char
*
dname
,
const
char
*
parse
,
const
char
*
alias
)
{
if
(
switch_true
(
alias
))
{
if
(
sofia_glue_add_profile
(
switch_core_strdup
(
profile
->
pool
,
dname
),
profile
)
==
SWITCH_STATUS_SUCCESS
)
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_NOTICE
,
"Adding Alias [%s] for profile [%s]
\n
"
,
dname
,
profile
->
name
);
}
else
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"Error Adding Alias [%s] for profile [%s] (name in use)
\n
"
,
dname
,
profile
->
name
);
}
}
if
(
switch_true
(
parse
))
{
switch_xml_t
ut
,
gateways_tag
;
for
(
ut
=
switch_xml_child
(
x_domain_tag
,
"user"
);
ut
;
ut
=
ut
->
next
)
{
if
(((
gateways_tag
=
switch_xml_child
(
ut
,
"gateways"
))))
{
parse_gateways
(
profile
,
gateways_tag
);
}
}
}
}
switch_status_t
config_sofia
(
int
reload
,
char
*
profile_name
)
{
char
*
cf
=
"sofia.conf"
;
...
...
@@ -1344,22 +1368,25 @@ switch_status_t config_sofia(int reload, char *profile_name)
if
((
domains_tag
=
switch_xml_child
(
xprofile
,
"domains"
)))
{
for
(
domain_tag
=
switch_xml_child
(
domains_tag
,
"domain"
);
domain_tag
;
domain_tag
=
domain_tag
->
next
)
{
switch_xml_t
droot
,
actual_domain_tag
,
ut
;
char
*
dname
=
(
char
*
)
switch_xml_attr_soft
(
domain_tag
,
"name"
);
char
*
parse
=
(
char
*
)
switch_xml_attr_soft
(
domain_tag
,
"parse"
);
switch_xml_t
droot
,
x_domain_tag
;
const
char
*
dname
=
switch_xml_attr_soft
(
domain_tag
,
"name"
);
const
char
*
parse
=
switch_xml_attr_soft
(
domain_tag
,
"parse"
);
const
char
*
alias
=
switch_xml_attr_soft
(
domain_tag
,
"alias"
);
if
(
!
switch_strlen_zero
(
dname
))
{
if
(
switch_true
(
parse
))
{
if
(
switch_xml_locate_domain
(
dname
,
NULL
,
&
droot
,
&
actual_domain_tag
)
==
SWITCH_STATUS_SUCCESS
)
{
for
(
ut
=
switch_xml_child
(
actual_domain_tag
,
"user"
);
ut
;
ut
=
ut
->
next
)
{
if
(((
gateways_tag
=
switch_xml_child
(
ut
,
"gateways"
)))
)
{
parse_gateways
(
profile
,
gateways_tag
);
}
if
(
!
strcasecmp
(
dname
,
"all"
))
{
switch_xml_t
xml_root
,
x_domains
;
if
(
switch_xml_locate
(
"directory"
,
NULL
,
NULL
,
NULL
,
&
xml_root
,
&
x_domains
,
NULL
)
==
SWITCH_STATUS_SUCCESS
)
{
for
(
x_domain_tag
=
switch_xml_child
(
x_domains
,
"domain"
);
x_domain_tag
;
x_domain_tag
=
x_domain_tag
->
next
)
{
dname
=
switch_xml_attr_soft
(
x_domain_tag
,
"name"
);
parse_domain_tag
(
profile
,
x_domain_tag
,
dname
,
parse
,
alias
);
}
switch_xml_free
(
d
root
);
switch_xml_free
(
xml_
root
);
}
}
else
if
(
switch_xml_locate_domain
(
dname
,
NULL
,
&
droot
,
&
x_domain_tag
)
==
SWITCH_STATUS_SUCCESS
)
{
parse_domain_tag
(
profile
,
x_domain_tag
,
dname
,
parse
,
alias
);
switch_xml_free
(
droot
);
}
sofia_glue_add_profile
(
switch_core_strdup
(
profile
->
pool
,
dname
),
profile
);
}
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论