Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
5478d187
提交
5478d187
authored
1月 21, 2008
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update
git-svn-id:
http://svn.freeswitch.org/svn/freeswitch/trunk@7313
d0543943-73ff-0310-b7d9-9358b9ac24b2
上级
61414b66
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
13 行增加
和
3 行删除
+13
-3
mod_sofia.c
src/mod/endpoints/mod_sofia/mod_sofia.c
+4
-3
mod_sofia.h
src/mod/endpoints/mod_sofia/mod_sofia.h
+1
-0
sofia.c
src/mod/endpoints/mod_sofia/sofia.c
+8
-0
没有找到文件。
src/mod/endpoints/mod_sofia/mod_sofia.c
浏览文件 @
5478d187
...
@@ -1198,6 +1198,7 @@ static switch_status_t cmd_status(char **argv, int argc, switch_stream_handle_t
...
@@ -1198,6 +1198,7 @@ static switch_status_t cmd_status(char **argv, int argc, switch_stream_handle_t
if
((
profile
=
sofia_glue_find_profile
(
argv
[
1
])))
{
if
((
profile
=
sofia_glue_find_profile
(
argv
[
1
])))
{
stream
->
write_function
(
stream
,
"%s
\n
"
,
line
);
stream
->
write_function
(
stream
,
"%s
\n
"
,
line
);
stream
->
write_function
(
stream
,
"Name
\t
%s
\n
"
,
switch_str_nil
(
argv
[
1
]));
stream
->
write_function
(
stream
,
"Name
\t
%s
\n
"
,
switch_str_nil
(
argv
[
1
]));
stream
->
write_function
(
stream
,
"Domain Name
\t
%s
\n
"
,
switch_str_nil
(
profile
->
domain_name
));
if
(
strcasecmp
(
argv
[
1
],
profile
->
name
))
{
if
(
strcasecmp
(
argv
[
1
],
profile
->
name
))
{
stream
->
write_function
(
stream
,
"Alias Of
\t
%s
\n
"
,
switch_str_nil
(
profile
->
name
));
stream
->
write_function
(
stream
,
"Alias Of
\t
%s
\n
"
,
switch_str_nil
(
profile
->
name
));
}
}
...
@@ -1748,11 +1749,11 @@ static switch_call_cause_t sofia_outgoing_channel(switch_core_session_t *session
...
@@ -1748,11 +1749,11 @@ static switch_call_cause_t sofia_outgoing_channel(switch_core_session_t *session
}
else
if
(
!
strchr
(
dest
,
'@'
))
{
}
else
if
(
!
strchr
(
dest
,
'@'
))
{
char
buf
[
128
];
char
buf
[
128
];
tech_pvt
->
e_dest
=
switch_core_session_strdup
(
nsession
,
dest
);
tech_pvt
->
e_dest
=
switch_core_session_strdup
(
nsession
,
dest
);
if
(
sofia_reg_find_reg_url
(
profile
,
dest
,
profile
->
name
,
buf
,
sizeof
(
buf
)))
{
if
(
sofia_reg_find_reg_url
(
profile
,
dest
,
profile
->
domain_
name
,
buf
,
sizeof
(
buf
)))
{
tech_pvt
->
dest
=
switch_core_session_strdup
(
nsession
,
buf
);
tech_pvt
->
dest
=
switch_core_session_strdup
(
nsession
,
buf
);
tech_pvt
->
local_url
=
switch_core_session_sprintf
(
nsession
,
"%s@%s"
,
dest
,
profile
->
name
);
tech_pvt
->
local_url
=
switch_core_session_sprintf
(
nsession
,
"%s@%s"
,
dest
,
profile
->
domain_
name
);
}
else
{
}
else
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_WARNING
,
"Cannot locate registered user %s@%s
\n
"
,
dest
,
profile
->
name
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_WARNING
,
"Cannot locate registered user %s@%s
\n
"
,
dest
,
profile
->
domain_
name
);
cause
=
SWITCH_CAUSE_NO_ROUTE_DESTINATION
;
cause
=
SWITCH_CAUSE_NO_ROUTE_DESTINATION
;
goto
error
;
goto
error
;
}
}
...
...
src/mod/endpoints/mod_sofia/mod_sofia.h
浏览文件 @
5478d187
...
@@ -234,6 +234,7 @@ struct sofia_gateway {
...
@@ -234,6 +234,7 @@ struct sofia_gateway {
struct
sofia_profile
{
struct
sofia_profile
{
int
debug
;
int
debug
;
char
*
name
;
char
*
name
;
char
*
domain_name
;
char
*
dbname
;
char
*
dbname
;
char
*
dialplan
;
char
*
dialplan
;
char
*
context
;
char
*
context
;
...
...
src/mod/endpoints/mod_sofia/sofia.c
浏览文件 @
5478d187
...
@@ -871,6 +871,7 @@ switch_status_t config_sofia(int reload, char *profile_name)
...
@@ -871,6 +871,7 @@ switch_status_t config_sofia(int reload, char *profile_name)
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"No Settings, check the new config!
\n
"
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"No Settings, check the new config!
\n
"
);
}
else
{
}
else
{
char
*
xprofilename
=
(
char
*
)
switch_xml_attr_soft
(
xprofile
,
"name"
);
char
*
xprofilename
=
(
char
*
)
switch_xml_attr_soft
(
xprofile
,
"name"
);
char
*
xprofiledomain
=
(
char
*
)
switch_xml_attr
(
xprofile
,
"domain"
);
switch_memory_pool_t
*
pool
=
NULL
;
switch_memory_pool_t
*
pool
=
NULL
;
if
(
!
xprofilename
)
{
if
(
!
xprofilename
)
{
...
@@ -902,6 +903,12 @@ switch_status_t config_sofia(int reload, char *profile_name)
...
@@ -902,6 +903,12 @@ switch_status_t config_sofia(int reload, char *profile_name)
profile
->
name
=
switch_core_strdup
(
profile
->
pool
,
xprofilename
);
profile
->
name
=
switch_core_strdup
(
profile
->
pool
,
xprofilename
);
switch_snprintf
(
url
,
sizeof
(
url
),
"sofia_reg_%s"
,
xprofilename
);
switch_snprintf
(
url
,
sizeof
(
url
),
"sofia_reg_%s"
,
xprofilename
);
if
(
xprofiledomain
)
{
profile
->
domain_name
=
switch_core_strdup
(
profile
->
pool
,
xprofiledomain
);
}
else
{
profile
->
domain_name
=
profile
->
name
;
}
profile
->
dbname
=
switch_core_strdup
(
profile
->
pool
,
url
);
profile
->
dbname
=
switch_core_strdup
(
profile
->
pool
,
url
);
switch_core_hash_init
(
&
profile
->
chat_hash
,
profile
->
pool
);
switch_core_hash_init
(
&
profile
->
chat_hash
,
profile
->
pool
);
switch_core_hash_init
(
&
profile
->
sub_hash
,
profile
->
pool
);
switch_core_hash_init
(
&
profile
->
sub_hash
,
profile
->
pool
);
...
@@ -2374,6 +2381,7 @@ void sofia_handle_sip_i_invite(nua_t *nua, sofia_profile_t *profile, nua_handle_
...
@@ -2374,6 +2381,7 @@ void sofia_handle_sip_i_invite(nua_t *nua, sofia_profile_t *profile, nua_handle_
}
}
switch_channel_set_variable
(
channel
,
"sofia_profile_name"
,
profile
->
name
);
switch_channel_set_variable
(
channel
,
"sofia_profile_name"
,
profile
->
name
);
switch_channel_set_variable
(
channel
,
"sofia_profile_domain_name"
,
profile
->
domain_name
);
if
(
!
switch_strlen_zero
(
sip
->
sip_from
->
a_display
))
{
if
(
!
switch_strlen_zero
(
sip
->
sip_from
->
a_display
))
{
displayname
=
sip
->
sip_from
->
a_display
;
displayname
=
sip
->
sip_from
->
a_display
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论