Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
91945cb1
提交
91945cb1
authored
10月 27, 2016
作者:
Anthony Minessale
提交者:
Mike Jerris
11月 16, 2016
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-9680 #resolve [Add proxy-message param to sofia]
上级
aa3283e2
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
72 行增加
和
3 行删除
+72
-3
switch_channel.h
src/include/switch_channel.h
+4
-0
mod_sofia.h
src/mod/endpoints/mod_sofia/mod_sofia.h
+3
-1
sofia.c
src/mod/endpoints/mod_sofia/sofia.c
+64
-1
mcast.c
src/mod/endpoints/mod_verto/mcast/mcast.c
+1
-1
没有找到文件。
src/include/switch_channel.h
浏览文件 @
91945cb1
...
...
@@ -317,6 +317,10 @@ SWITCH_DECLARE(switch_status_t) switch_channel_get_variables(switch_channel_t *c
SWITCH_DECLARE
(
switch_status_t
)
switch_channel_pass_callee_id
(
switch_channel_t
*
channel
,
switch_channel_t
*
other_channel
);
static
inline
int
switch_channel_var_true
(
switch_channel_t
*
channel
,
const
char
*
variable
)
{
return
switch_true
(
switch_channel_get_variable_dup
(
channel
,
variable
,
SWITCH_FALSE
,
-
1
));
}
/*!
* \brief Start iterating over the entries in the channel variable list.
* \param channel the channel to iterate the variables for
...
...
src/mod/endpoints/mod_sofia/mod_sofia.h
浏览文件 @
91945cb1
...
...
@@ -295,6 +295,7 @@ typedef enum {
PFLAG_BLIND_AUTH_ENFORCE_RESULT
,
PFLAG_PROXY_HOLD
,
PFLAG_PROXY_INFO
,
PFLAG_PROXY_MESSAGE
,
/* No new flags below this line */
PFLAG_MAX
...
...
@@ -939,7 +940,8 @@ switch_status_t sofia_proxy_sip_i_info(nua_t *nua, sofia_profile_t *profile, nua
sofia_dispatch_event_t
*
de
,
tagi_t
tags
[]);
void
sofia_handle_sip_i_info
(
nua_t
*
nua
,
sofia_profile_t
*
profile
,
nua_handle_t
*
nh
,
switch_core_session_t
*
session
,
sip_t
const
*
sip
,
sofia_dispatch_event_t
*
de
,
tagi_t
tags
[]);
switch_status_t
sofia_proxy_sip_i_message
(
nua_t
*
nua
,
sofia_profile_t
*
profile
,
nua_handle_t
*
nh
,
switch_core_session_t
*
session
,
sip_t
const
*
sip
,
sofia_dispatch_event_t
*
de
,
tagi_t
tags
[]);
void
sofia_handle_sip_i_invite
(
switch_core_session_t
*
session
,
nua_t
*
nua
,
sofia_profile_t
*
profile
,
nua_handle_t
*
nh
,
sofia_private_t
*
sofia_private
,
sip_t
const
*
sip
,
sofia_dispatch_event_t
*
de
,
tagi_t
tags
[]);
...
...
src/mod/endpoints/mod_sofia/sofia.c
浏览文件 @
91945cb1
...
...
@@ -1710,7 +1710,25 @@ static void our_sofia_event_callback(nua_event_t event,
sofia_handle_sip_i_state
(
session
,
status
,
phrase
,
nua
,
profile
,
nh
,
sofia_private
,
sip
,
de
,
tags
);
break
;
case
nua_i_message
:
sofia_presence_handle_sip_i_message(status, phrase, nua, profile, nh, session, sofia_private, sip, de, tags);
{
int
handle_message
=
1
;
int
proxy_message
=
sofia_test_pflag
(
profile
,
PFLAG_PROXY_MESSAGE
);
if
(
!
proxy_message
&&
session
)
{
switch_channel_t
*
channel
=
switch_core_session_get_channel
(
session
);
proxy_message
=
switch_channel_var_true
(
channel
,
"sip_proxy_message"
);
}
if
(
proxy_message
)
{
if
(
sofia_proxy_sip_i_message
(
nua
,
profile
,
nh
,
session
,
sip
,
de
,
tags
)
==
SWITCH_STATUS_SUCCESS
)
{
handle_message
=
0
;
}
}
if
(
handle_message
)
{
sofia_presence_handle_sip_i_message
(
status
,
phrase
,
nua
,
profile
,
nh
,
session
,
sofia_private
,
sip
,
de
,
tags
);
}
}
break
;
case
nua_i_info
:
{
...
...
@@ -5663,6 +5681,12 @@ switch_status_t config_sofia(sofia_config_t reload, char *profile_name)
}
else
{
sofia_clear_pflag
(
profile
,
PFLAG_PROXY_INFO
);
}
}
else
if
(
!
strcasecmp
(
var
,
"proxy-message"
))
{
if
(
switch_true
(
val
))
{
sofia_set_pflag
(
profile
,
PFLAG_PROXY_MESSAGE
);
}
else
{
sofia_clear_pflag
(
profile
,
PFLAG_PROXY_MESSAGE
);
}
}
else
if
(
!
strcasecmp
(
var
,
"proxy-notify-events"
))
{
profile
->
proxy_notify_events
=
switch_core_strdup
(
profile
->
pool
,
val
);
}
else
if
(
!
strcasecmp
(
var
,
"proxy-info-content-types"
))
{
...
...
@@ -9117,6 +9141,45 @@ static switch_status_t create_info_event(sip_t const *sip,
return
SWITCH_STATUS_SUCCESS
;
}
switch_status_t
sofia_proxy_sip_i_message
(
nua_t
*
nua
,
sofia_profile_t
*
profile
,
nua_handle_t
*
nh
,
switch_core_session_t
*
session
,
sip_t
const
*
sip
,
sofia_dispatch_event_t
*
de
,
tagi_t
tags
[])
{
switch_core_session_t
*
other_session
=
NULL
;
if
(
session
&&
switch_core_session_get_partner
(
session
,
&
other_session
)
==
SWITCH_STATUS_SUCCESS
)
{
if
(
switch_core_session_compare
(
session
,
other_session
))
{
private_object_t
*
other_tech_pvt
=
NULL
;
const
char
*
ct
=
NULL
;
char
*
pl
=
NULL
;
if
(
sip
&&
sip
->
sip_payload
&&
sip
->
sip_payload
->
pl_data
)
{
pl
=
sip
->
sip_payload
->
pl_data
;
}
other_tech_pvt
=
(
private_object_t
*
)
switch_core_session_get_private
(
other_session
);
if
(
sip
->
sip_content_type
->
c_type
&&
sip
->
sip_content_type
->
c_subtype
)
{
ct
=
sip
->
sip_content_type
->
c_type
;
}
nua_message
(
other_tech_pvt
->
nh
,
TAG_IF
(
ct
,
SIPTAG_CONTENT_TYPE_STR
(
su_strdup
(
other_tech_pvt
->
nh
->
nh_home
,
ct
))),
TAG_IF
(
!
zstr
(
other_tech_pvt
->
user_via
),
SIPTAG_VIA_STR
(
other_tech_pvt
->
user_via
)),
TAG_IF
(
pl
,
SIPTAG_PAYLOAD_STR
(
su_strdup
(
other_tech_pvt
->
nh
->
nh_home
,
pl
))),
TAG_END
());
}
switch_core_session_rwunlock
(
other_session
);
nua_respond
(
nh
,
SIP_202_ACCEPTED
,
NUTAG_WITH_THIS_MSG
(
de
->
data
->
e_msg
),
TAG_END
());
return
SWITCH_STATUS_SUCCESS
;
}
return
SWITCH_STATUS_FALSE
;
}
switch_status_t
sofia_proxy_sip_i_info
(
nua_t
*
nua
,
sofia_profile_t
*
profile
,
nua_handle_t
*
nh
,
switch_core_session_t
*
session
,
sip_t
const
*
sip
,
sofia_dispatch_event_t
*
de
,
tagi_t
tags
[])
{
...
...
src/mod/endpoints/mod_verto/mcast/mcast.c
浏览文件 @
91945cb1
...
...
@@ -53,7 +53,7 @@
#include <poll.h>
#define closesocket(x) close(x)
#endif
#include <switch
_utils
.h>
#include <switch.h>
#include "mcast.h"
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论