Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
8da11c52
提交
8da11c52
authored
5月 07, 2008
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update
git-svn-id:
http://svn.freeswitch.org/svn/freeswitch/trunk@8290
d0543943-73ff-0310-b7d9-9358b9ac24b2
上级
9870eb87
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
6 行增加
和
23 行删除
+6
-23
mod_sofia.c
src/mod/endpoints/mod_sofia/mod_sofia.c
+1
-1
sofia.c
src/mod/endpoints/mod_sofia/sofia.c
+2
-19
sofia_presence.c
src/mod/endpoints/mod_sofia/sofia_presence.c
+1
-1
sofia_reg.c
src/mod/endpoints/mod_sofia/sofia_reg.c
+2
-2
没有找到文件。
src/mod/endpoints/mod_sofia/mod_sofia.c
浏览文件 @
8da11c52
...
@@ -1114,7 +1114,7 @@ static switch_status_t sofia_receive_event(switch_core_session_t *session, switc
...
@@ -1114,7 +1114,7 @@ static switch_status_t sofia_receive_event(switch_core_session_t *session, switc
msg_nh
=
nua_handle
(
tech_pvt
->
profile
->
nua
,
NULL
,
msg_nh
=
nua_handle
(
tech_pvt
->
profile
->
nua
,
NULL
,
SIPTAG_FROM_STR
(
tech_pvt
->
chat_from
),
SIPTAG_FROM_STR
(
tech_pvt
->
chat_from
),
NUTAG_URL
(
tech_pvt
->
chat_to
),
SIPTAG_TO_STR
(
tech_pvt
->
chat_to
),
SIPTAG_CONTACT_STR
(
tech_pvt
->
profile
->
url
),
TAG_END
());
NUTAG_URL
(
tech_pvt
->
chat_to
),
SIPTAG_TO_STR
(
tech_pvt
->
chat_to
),
SIPTAG_CONTACT_STR
(
tech_pvt
->
profile
->
url
),
TAG_END
());
nua_handle_bind
(
msg_nh
,
&
mod_sofia_globals
.
destroy_private
);
nua_message
(
msg_nh
,
SIPTAG_CONTENT_TYPE_STR
(
"text/html"
),
SIPTAG_PAYLOAD_STR
(
body
),
TAG_END
());
nua_message
(
msg_nh
,
SIPTAG_CONTENT_TYPE_STR
(
"text/html"
),
SIPTAG_PAYLOAD_STR
(
body
),
TAG_END
());
}
}
...
...
src/mod/endpoints/mod_sofia/sofia.c
浏览文件 @
8da11c52
...
@@ -71,7 +71,7 @@ void sofia_handle_sip_r_notify(switch_core_session_t *session, int status,
...
@@ -71,7 +71,7 @@ void sofia_handle_sip_r_notify(switch_core_session_t *session, int status,
{
{
if
(
status
>=
300
&&
sip
&&
sip
->
sip_call_id
)
{
if
(
status
>=
300
&&
sip
&&
sip
->
sip_call_id
)
{
char
*
sql
;
char
*
sql
;
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_WARNING
,
"delete subscriptions for failed notify
\n
"
);
sql
=
switch_mprintf
(
"delete from sip_subscriptions where call_id='%q'"
,
sip
->
sip_call_id
->
i_id
);
sql
=
switch_mprintf
(
"delete from sip_subscriptions where call_id='%q'"
,
sip
->
sip_call_id
->
i_id
);
switch_assert
(
sql
!=
NULL
);
switch_assert
(
sql
!=
NULL
);
sofia_glue_execute_sql
(
profile
,
&
sql
,
SWITCH_TRUE
);
sofia_glue_execute_sql
(
profile
,
&
sql
,
SWITCH_TRUE
);
...
@@ -159,21 +159,6 @@ void sofia_handle_sip_i_bye(switch_core_session_t *session, int status,
...
@@ -159,21 +159,6 @@ void sofia_handle_sip_i_bye(switch_core_session_t *session, int status,
void
sofia_handle_sip_r_message
(
int
status
,
sofia_profile_t
*
profile
,
nua_handle_t
*
nh
,
sip_t
const
*
sip
)
void
sofia_handle_sip_r_message
(
int
status
,
sofia_profile_t
*
profile
,
nua_handle_t
*
nh
,
sip_t
const
*
sip
)
{
{
if
(
status
==
503
)
{
const
char
*
user
=
NULL
,
*
host
=
NULL
;
char
*
sql
;
if
(
sip
->
sip_to
&&
sip
->
sip_to
->
a_url
)
{
user
=
sip
->
sip_to
->
a_url
->
url_user
;
host
=
sip
->
sip_to
->
a_url
->
url_host
;
sql
=
switch_mprintf
(
"delete from sip_registrations where sip_user='%q' and sip_host='%q'"
,
user
,
host
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_WARNING
,
"Deleting registration for %s@%s
\n
"
,
user
,
host
);
sofia_glue_execute_sql
(
profile
,
&
sql
,
SWITCH_TRUE
);
}
}
nua_handle_destroy
(
nh
);
}
}
void
sofia_event_callback
(
nua_event_t
event
,
void
sofia_event_callback
(
nua_event_t
event
,
...
@@ -354,7 +339,7 @@ void sofia_event_callback(nua_event_t event,
...
@@ -354,7 +339,7 @@ void sofia_event_callback(nua_event_t event,
done:
done:
if
(
sofia_private
&&
sofia_private
->
destroy_nh
)
{
if
(
(
sofia_private
&&
sofia_private
->
destroy_nh
)
||
!
nua_handle_magic
(
nh
)
)
{
//switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Destroy handle requested.\n");
//switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Destroy handle requested.\n");
nua_handle_destroy
(
nh
);
nua_handle_destroy
(
nh
);
}
}
...
@@ -1554,7 +1539,6 @@ static void sofia_handle_sip_r_options(switch_core_session_t *session, int statu
...
@@ -1554,7 +1539,6 @@ static void sofia_handle_sip_r_options(switch_core_session_t *session, int statu
);
);
sofia_glue_execute_sql
(
profile
,
&
sql
,
SWITCH_TRUE
);
sofia_glue_execute_sql
(
profile
,
&
sql
,
SWITCH_TRUE
);
}
}
nua_handle_destroy
(
nh
);
}
}
...
@@ -3139,7 +3123,6 @@ void sofia_handle_sip_i_options(int status,
...
@@ -3139,7 +3123,6 @@ void sofia_handle_sip_i_options(int status,
nua_respond
(
nh
,
SIP_200_OK
,
nua_respond
(
nh
,
SIP_200_OK
,
NUTAG_WITH_THIS
(
nua
),
NUTAG_WITH_THIS
(
nua
),
TAG_END
());
TAG_END
());
nua_handle_destroy
(
nh
);
}
}
static
void
sofia_info_send_sipfrag
(
switch_core_session_t
*
aleg
,
switch_core_session_t
*
bleg
)
static
void
sofia_info_send_sipfrag
(
switch_core_session_t
*
aleg
,
switch_core_session_t
*
bleg
)
...
...
src/mod/endpoints/mod_sofia/sofia_presence.c
浏览文件 @
8da11c52
...
@@ -107,7 +107,7 @@ switch_status_t sofia_presence_chat_send(char *proto, char *from, char *to, char
...
@@ -107,7 +107,7 @@ switch_status_t sofia_presence_chat_send(char *proto, char *from, char *to, char
SIPTAG_CONTACT_STR
(
profile
->
url
),
TAG_END
());
SIPTAG_CONTACT_STR
(
profile
->
url
),
TAG_END
());
switch_safe_free
(
contact
);
switch_safe_free
(
contact
);
nua_handle_bind
(
msg_nh
,
&
mod_sofia_globals
.
destroy_private
);
nua_message
(
msg_nh
,
SIPTAG_CONTENT_TYPE_STR
(
"text/html"
),
SIPTAG_PAYLOAD_STR
(
body
),
TAG_END
());
nua_message
(
msg_nh
,
SIPTAG_CONTENT_TYPE_STR
(
"text/html"
),
SIPTAG_PAYLOAD_STR
(
body
),
TAG_END
());
switch_safe_free
(
ffrom
);
switch_safe_free
(
ffrom
);
...
...
src/mod/endpoints/mod_sofia/sofia_reg.c
浏览文件 @
8da11c52
...
@@ -87,7 +87,7 @@ void sofia_reg_check_gateway(sofia_profile_t *profile, time_t now)
...
@@ -87,7 +87,7 @@ void sofia_reg_check_gateway(sofia_profile_t *profile, time_t now)
pvt
=
malloc
(
sizeof
(
*
pvt
));
pvt
=
malloc
(
sizeof
(
*
pvt
));
switch_assert
(
pvt
);
switch_assert
(
pvt
);
memset
(
pvt
,
0
,
sizeof
(
*
pvt
));
memset
(
pvt
,
0
,
sizeof
(
*
pvt
));
pvt
->
destroy_nh
=
1
;
switch_copy_string
(
pvt
->
gateway_name
,
gateway_ptr
->
name
,
sizeof
(
pvt
->
gateway_name
));
switch_copy_string
(
pvt
->
gateway_name
,
gateway_ptr
->
name
,
sizeof
(
pvt
->
gateway_name
));
nua_handle_bind
(
nh
,
pvt
);
nua_handle_bind
(
nh
,
pvt
);
...
@@ -196,7 +196,7 @@ int sofia_reg_nat_callback(void *pArg, int argc, char **argv, char **columnNames
...
@@ -196,7 +196,7 @@ int sofia_reg_nat_callback(void *pArg, int argc, char **argv, char **columnNames
contact
=
sofia_glue_get_url_from_contact
(
argv
[
3
],
1
);
contact
=
sofia_glue_get_url_from_contact
(
argv
[
3
],
1
);
nh
=
nua_handle
(
profile
->
nua
,
NULL
,
SIPTAG_FROM_STR
(
profile
->
url
),
SIPTAG_TO_STR
(
to
),
NUTAG_URL
(
contact
),
SIPTAG_CONTACT_STR
(
profile
->
url
),
TAG_END
());
nh
=
nua_handle
(
profile
->
nua
,
NULL
,
SIPTAG_FROM_STR
(
profile
->
url
),
SIPTAG_TO_STR
(
to
),
NUTAG_URL
(
contact
),
SIPTAG_CONTACT_STR
(
profile
->
url
),
TAG_END
());
nua_handle_bind
(
nh
,
&
mod_sofia_globals
.
destroy_private
);
nua_options
(
nh
,
TAG_END
());
nua_options
(
nh
,
TAG_END
());
switch_safe_free
(
contact
);
switch_safe_free
(
contact
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论