Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
3c7e7c75
提交
3c7e7c75
authored
9月 08, 2014
作者:
Nathan Neulinger
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
mod_skinny: more logging during transfer operations
上级
61a3997b
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
36 行增加
和
2 行删除
+36
-2
skinny_server.c
src/mod/endpoints/mod_skinny/skinny_server.c
+36
-2
没有找到文件。
src/mod/endpoints/mod_skinny/skinny_server.c
浏览文件 @
3c7e7c75
...
@@ -896,7 +896,11 @@ switch_status_t skinny_session_transfer(switch_core_session_t *session, listener
...
@@ -896,7 +896,11 @@ switch_status_t skinny_session_transfer(switch_core_session_t *session, listener
switch_status_t
status
=
SWITCH_STATUS_SUCCESS
;
switch_status_t
status
=
SWITCH_STATUS_SUCCESS
;
private_t
*
tech_pvt
=
NULL
;
private_t
*
tech_pvt
=
NULL
;
switch_channel_t
*
channel
=
NULL
;
switch_channel_t
*
channel
=
NULL
;
switch_channel_t
*
channel2
=
NULL
;
const
char
*
local_uuid
=
NULL
;
const
char
*
local_uuid2
=
NULL
;
const
char
*
remote_uuid
=
NULL
;
const
char
*
remote_uuid
=
NULL
;
const
char
*
remote_uuid2
=
NULL
;
switch_core_session_t
*
session2
=
NULL
;
switch_core_session_t
*
session2
=
NULL
;
private_t
*
tech_pvt2
=
NULL
;
private_t
*
tech_pvt2
=
NULL
;
...
@@ -906,30 +910,60 @@ switch_status_t skinny_session_transfer(switch_core_session_t *session, listener
...
@@ -906,30 +910,60 @@ switch_status_t skinny_session_transfer(switch_core_session_t *session, listener
tech_pvt
=
switch_core_session_get_private
(
session
);
tech_pvt
=
switch_core_session_get_private
(
session
);
channel
=
switch_core_session_get_channel
(
session
);
channel
=
switch_core_session_get_channel
(
session
);
local_uuid
=
switch_channel_get_uuid
(
channel
);
remote_uuid
=
switch_channel_get_partner_uuid
(
channel
);
remote_uuid
=
switch_channel_get_partner_uuid
(
channel
);
skinny_log_l
(
listener
,
SWITCH_LOG_INFO
,
"SST: local_uuid=%s remote_uuid=%s
\n
"
,
local_uuid
,
remote_uuid
);
if
(
tech_pvt
->
transfer_from_call_id
)
{
if
(
tech_pvt
->
transfer_from_call_id
)
{
skinny_log_l_msg
(
listener
,
SWITCH_LOG_INFO
,
"SST: transfer_from_call_id
\n
"
);
if
((
session2
=
skinny_profile_find_session
(
listener
->
profile
,
listener
,
&
line_instance
,
tech_pvt
->
transfer_from_call_id
)))
{
if
((
session2
=
skinny_profile_find_session
(
listener
->
profile
,
listener
,
&
line_instance
,
tech_pvt
->
transfer_from_call_id
)))
{
switch_channel_t
*
channel2
=
switch_core_session_get_channel
(
session2
);
channel2
=
switch_core_session_get_channel
(
session2
);
const
char
*
remote_uuid2
=
switch_channel_get_partner_uuid
(
channel2
);
local_uuid2
=
switch_channel_get_uuid
(
channel2
);
remote_uuid2
=
switch_channel_get_partner_uuid
(
channel2
);
skinny_log_ls
(
listener
,
session2
,
SWITCH_LOG_INFO
,
"SST: tx from session - local_uuid=%s remote_uuid=%s local_uuid2=%s remote_uuid2=%s
\n
"
,
local_uuid
,
remote_uuid
,
local_uuid2
,
remote_uuid2
);
skinny_log_ls
(
listener
,
session2
,
SWITCH_LOG_INFO
,
"SST: attempting ivr bridge from (%s) to (%s)
\n
"
,
remote_uuid
,
remote_uuid2
);
if
(
switch_ivr_uuid_bridge
(
remote_uuid
,
remote_uuid2
)
==
SWITCH_STATUS_SUCCESS
)
{
if
(
switch_ivr_uuid_bridge
(
remote_uuid
,
remote_uuid2
)
==
SWITCH_STATUS_SUCCESS
)
{
skinny_log_ls_msg
(
listener
,
session2
,
SWITCH_LOG_INFO
,
"SST: success on uuid bridge
\n
"
);
switch_channel_hangup
(
channel
,
SWITCH_CAUSE_NORMAL_CLEARING
);
switch_channel_hangup
(
channel
,
SWITCH_CAUSE_NORMAL_CLEARING
);
switch_channel_hangup
(
channel2
,
SWITCH_CAUSE_NORMAL_CLEARING
);
switch_channel_hangup
(
channel2
,
SWITCH_CAUSE_NORMAL_CLEARING
);
}
else
{
}
else
{
skinny_log_ls_msg
(
listener
,
session2
,
SWITCH_LOG_INFO
,
"SST: failure on uuid bridge
\n
"
);
/* TODO: How to inform the user that the bridge is not possible? */
/* TODO: How to inform the user that the bridge is not possible? */
}
}
switch_core_session_rwunlock
(
session2
);
switch_core_session_rwunlock
(
session2
);
}
}
}
else
{
}
else
{
skinny_log_l_msg
(
listener
,
SWITCH_LOG_INFO
,
"SST: !transfer_from_call_id
\n
"
);
if
(
remote_uuid
)
{
if
(
remote_uuid
)
{
skinny_log_ls_msg
(
listener
,
session2
,
SWITCH_LOG_INFO
,
"SST: found remote_uuid
\n
"
);
/* TODO CallSelectStat */
/* TODO CallSelectStat */
skinny_log_ls_msg
(
listener
,
session2
,
SWITCH_LOG_INFO
,
"SST: creating incoming session
\n
"
);
status
=
skinny_create_incoming_session
(
listener
,
&
line_instance
,
&
session2
);
status
=
skinny_create_incoming_session
(
listener
,
&
line_instance
,
&
session2
);
tech_pvt2
=
switch_core_session_get_private
(
session2
);
tech_pvt2
=
switch_core_session_get_private
(
session2
);
tech_pvt2
->
transfer_from_call_id
=
tech_pvt
->
call_id
;
tech_pvt2
->
transfer_from_call_id
=
tech_pvt
->
call_id
;
tech_pvt
->
transfer_to_call_id
=
tech_pvt2
->
call_id
;
tech_pvt
->
transfer_to_call_id
=
tech_pvt2
->
call_id
;
skinny_log_ls
(
listener
,
session2
,
SWITCH_LOG_INFO
,
"SST: transfer_to_call_id=%d transfer_from_call_id=%d
\n
"
,
tech_pvt2
->
call_id
,
tech_pvt
->
call_id
);
skinny_log_ls_msg
(
listener
,
session2
,
SWITCH_LOG_INFO
,
"SST: triggering dial on incoming session
\n
"
);
skinny_session_process_dest
(
session2
,
listener
,
line_instance
,
NULL
,
'\0'
,
0
);
skinny_session_process_dest
(
session2
,
listener
,
line_instance
,
NULL
,
'\0'
,
0
);
channel2
=
switch_core_session_get_channel
(
session2
);
local_uuid2
=
switch_channel_get_uuid
(
channel2
);
remote_uuid2
=
switch_channel_get_partner_uuid
(
channel2
);
skinny_log_ls
(
listener
,
session2
,
SWITCH_LOG_INFO
,
"SST: new session - local_uuid2=%s remote_uuid2=%s
\n
"
,
local_uuid2
,
remote_uuid2
);
switch_core_session_rwunlock
(
session2
);
switch_core_session_rwunlock
(
session2
);
}
else
{
}
else
{
skinny_log_ls_msg
(
listener
,
session2
,
SWITCH_LOG_INFO
,
"SST: could not find remote_uuid
\n
"
);
/* TODO: How to inform the user that the bridge is not possible? */
/* TODO: How to inform the user that the bridge is not possible? */
}
}
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论