Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
fd38a255
提交
fd38a255
authored
3月 04, 2014
作者:
William King
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-6167 --resolve
上级
3d461d7c
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
26 行增加
和
7 行删除
+26
-7
internal.xml
conf/vanilla/sip_profiles/internal.xml
+1
-0
mod_sofia.h
src/mod/endpoints/mod_sofia/mod_sofia.h
+1
-0
sofia.c
src/mod/endpoints/mod_sofia/sofia.c
+6
-0
sofia_presence.c
src/mod/endpoints/mod_sofia/sofia_presence.c
+18
-7
没有找到文件。
conf/vanilla/sip_profiles/internal.xml
浏览文件 @
fd38a255
...
@@ -185,6 +185,7 @@
...
@@ -185,6 +185,7 @@
<!--<param name="nat-options-ping" value="true"/>-->
<!--<param name="nat-options-ping" value="true"/>-->
<!--<param name="sip-options-respond-503-on-busy" value="true"/>-->
<!--<param name="sip-options-respond-503-on-busy" value="true"/>-->
<!--<param name="sip-messages-respond-200-ok" value="true"/>-->
<!--<param name="sip-messages-respond-200-ok" value="true"/>-->
<!--<param name="sip-subscribe-respond-200-ok" value="true"/>-->
<!-- TLS: disabled by default, set to "true" to enable -->
<!-- TLS: disabled by default, set to "true" to enable -->
<param
name=
"tls"
value=
"$${internal_ssl_enable}"
/>
<param
name=
"tls"
value=
"$${internal_ssl_enable}"
/>
...
...
src/mod/endpoints/mod_sofia/mod_sofia.h
浏览文件 @
fd38a255
...
@@ -271,6 +271,7 @@ typedef enum {
...
@@ -271,6 +271,7 @@ typedef enum {
PFLAG_TCP_PINGPONG
,
PFLAG_TCP_PINGPONG
,
PFLAG_TCP_PING2PONG
,
PFLAG_TCP_PING2PONG
,
PFLAG_MESSAGES_RESPOND_200_OK
,
PFLAG_MESSAGES_RESPOND_200_OK
,
PFLAG_SUBSCRIBE_RESPOND_200_OK
,
PFLAG_PARSE_ALL_INVITE_HEADERS
,
PFLAG_PARSE_ALL_INVITE_HEADERS
,
/* No new flags below this line */
/* No new flags below this line */
PFLAG_MAX
PFLAG_MAX
...
...
src/mod/endpoints/mod_sofia/sofia.c
浏览文件 @
fd38a255
...
@@ -4045,6 +4045,12 @@ switch_status_t config_sofia(sofia_config_t reload, char *profile_name)
...
@@ -4045,6 +4045,12 @@ switch_status_t config_sofia(sofia_config_t reload, char *profile_name)
} else {
} else {
sofia_clear_pflag(profile, PFLAG_MESSAGES_RESPOND_200_OK);
sofia_clear_pflag(profile, PFLAG_MESSAGES_RESPOND_200_OK);
}
}
} else if (!strcasecmp(var, "sip-subscribe-respond-200-ok") && !zstr(val)) {
if (switch_true(val)) {
sofia_set_pflag(profile, PFLAG_SUBSCRIBE_RESPOND_200_OK);
} else {
sofia_clear_pflag(profile, PFLAG_SUBSCRIBE_RESPOND_200_OK);
}
} else if (!strcasecmp(var, "odbc-dsn") && !zstr(val)) {
} else if (!strcasecmp(var, "odbc-dsn") && !zstr(val)) {
profile->odbc_dsn = switch_core_strdup(profile->pool, val);
profile->odbc_dsn = switch_core_strdup(profile->pool, val);
} else if (!strcasecmp(var, "db-pre-trans-execute") && !zstr(val)) {
} else if (!strcasecmp(var, "db-pre-trans-execute") && !zstr(val)) {
...
...
src/mod/endpoints/mod_sofia/sofia_presence.c
浏览文件 @
fd38a255
...
@@ -3875,8 +3875,11 @@ void sofia_presence_handle_sip_i_subscribe(int status,
...
@@ -3875,8 +3875,11 @@ void sofia_presence_handle_sip_i_subscribe(int status,
switch_event_t
*
params
=
NULL
;
switch_event_t
*
params
=
NULL
;
/* Grandstream REALLY uses a header called Message Body */
/* Grandstream REALLY uses a header called Message Body */
extra_headers
=
switch_mprintf
(
"MessageBody: %s
\r\n
"
,
profile
->
pnp_prov_url
);
extra_headers
=
switch_mprintf
(
"MessageBody: %s
\r\n
"
,
profile
->
pnp_prov_url
);
if
(
sofia_test_pflag
(
profile
,
PFLAG_SUBSCRIBE_RESPOND_200_OK
))
{
nua_respond
(
nh
,
SIP_202_ACCEPTED
,
NUTAG_WITH_THIS_MSG
(
de
->
data
->
e_msg
),
TAG_END
());
nua_respond
(
nh
,
SIP_200_OK
,
NUTAG_WITH_THIS_MSG
(
de
->
data
->
e_msg
),
TAG_END
());
}
else
{
nua_respond
(
nh
,
SIP_202_ACCEPTED
,
NUTAG_WITH_THIS_MSG
(
de
->
data
->
e_msg
),
TAG_END
());
}
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"sending pnp NOTIFY for %s to provision to %s
\n
"
,
uri
,
profile
->
pnp_prov_url
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"sending pnp NOTIFY for %s to provision to %s
\n
"
,
uri
,
profile
->
pnp_prov_url
);
...
@@ -3956,11 +3959,19 @@ void sofia_presence_handle_sip_i_subscribe(int status,
...
@@ -3956,11 +3959,19 @@ void sofia_presence_handle_sip_i_subscribe(int status,
if
(
mod_sofia_globals
.
debug_presence
>
0
)
{
if
(
mod_sofia_globals
.
debug_presence
>
0
)
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"Responding to SUBSCRIBE with 202 Accepted
\n
"
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"Responding to SUBSCRIBE with 202 Accepted
\n
"
);
}
}
nua_respond
(
nh
,
SIP_202_ACCEPTED
,
if
(
sofia_test_pflag
(
profile
,
PFLAG_SUBSCRIBE_RESPOND_200_OK
))
{
SIPTAG_TO
(
sip
->
sip_to
),
nua_respond
(
nh
,
SIP_200_OK
,
TAG_IF
(
new_contactstr
,
SIPTAG_CONTACT_STR
(
new_contactstr
)),
SIPTAG_TO
(
sip
->
sip_to
),
NUTAG_WITH_THIS_MSG
(
de
->
data
->
e_msg
),
TAG_IF
(
new_contactstr
,
SIPTAG_CONTACT_STR
(
new_contactstr
)),
SIPTAG_SUBSCRIPTION_STATE_STR
(
sstr
),
SIPTAG_EXPIRES_STR
(
exp_delta_str
),
TAG_IF
(
sticky
,
NUTAG_PROXY
(
sticky
)),
TAG_END
());
NUTAG_WITH_THIS_MSG
(
de
->
data
->
e_msg
),
SIPTAG_SUBSCRIPTION_STATE_STR
(
sstr
),
SIPTAG_EXPIRES_STR
(
exp_delta_str
),
TAG_IF
(
sticky
,
NUTAG_PROXY
(
sticky
)),
TAG_END
());
}
else
{
nua_respond
(
nh
,
SIP_202_ACCEPTED
,
SIPTAG_TO
(
sip
->
sip_to
),
TAG_IF
(
new_contactstr
,
SIPTAG_CONTACT_STR
(
new_contactstr
)),
NUTAG_WITH_THIS_MSG
(
de
->
data
->
e_msg
),
SIPTAG_SUBSCRIPTION_STATE_STR
(
sstr
),
SIPTAG_EXPIRES_STR
(
exp_delta_str
),
TAG_IF
(
sticky
,
NUTAG_PROXY
(
sticky
)),
TAG_END
());
}
switch_safe_free
(
new_contactstr
);
switch_safe_free
(
new_contactstr
);
switch_safe_free
(
sticky
);
switch_safe_free
(
sticky
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论