Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
9bacb04d
提交
9bacb04d
authored
3月 21, 2007
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
cleanup
git-svn-id:
http://svn.freeswitch.org/svn/freeswitch/trunk@4720
d0543943-73ff-0310-b7d9-9358b9ac24b2
上级
dc205ae2
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
16 行增加
和
16 行删除
+16
-16
mod_iax.c
src/mod/endpoints/mod_iax/mod_iax.c
+8
-7
switch_channel.c
src/switch_channel.c
+6
-6
switch_ivr.c
src/switch_ivr.c
+2
-3
没有找到文件。
src/mod/endpoints/mod_iax/mod_iax.c
浏览文件 @
9bacb04d
...
...
@@ -587,9 +587,7 @@ static switch_status_t channel_kill_channel(switch_core_session_t *session, int
default:
break
;
}
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"%s CHANNEL KILL
\n
"
,
switch_channel_get_name
(
channel
));
return
SWITCH_STATUS_SUCCESS
;
}
...
...
@@ -649,7 +647,8 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
private_t
*
tech_pvt
=
NULL
;
switch_time_t
started
=
switch_time_now
();
unsigned
int
elapsed
;
switch_byte_t
*
data
;
channel
=
switch_core_session_get_channel
(
session
);
assert
(
channel
!=
NULL
);
...
...
@@ -703,12 +702,14 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
return
SWITCH_STATUS_FALSE
;
cng:
tech_pvt
->
read_frame
.
datalen
=
13
;
memset
(
tech_pvt
->
read_frame
.
data
,
0
,
13
);
data
=
(
switch_byte_t
*
)
tech_pvt
->
read_frame
.
data
;
data
[
0
]
=
65
;
data
[
1
]
=
0
;
tech_pvt
->
read_frame
.
datalen
=
2
;
tech_pvt
->
read_frame
.
flags
=
SFF_CNG
;
*
frame
=
&
tech_pvt
->
read_frame
;
return
SWITCH_STATUS_SUCCESS
;
}
static
switch_status_t
channel_write_frame
(
switch_core_session_t
*
session
,
switch_frame_t
*
frame
,
int
timeout
,
...
...
src/switch_channel.c
浏览文件 @
9bacb04d
...
...
@@ -1036,10 +1036,10 @@ SWITCH_DECLARE(switch_status_t) switch_channel_perform_mark_pre_answered(switch_
switch_event_fire
(
&
event
);
}
/* if we're
in a bridge
and the other channel is in a blocking read they will never realize we have answered so send
/* if we're
the child of another channel
and the other channel is in a blocking read they will never realize we have answered so send
a SWITCH_SIG_BREAK to interrupt any blocking reads on that channel
*/
if
((
uuid
=
switch_channel_get_variable
(
channel
,
SWITCH_
BRIDGE
_VARIABLE
))
&&
(
other_session
=
switch_core_session_locate
(
uuid
)))
{
if
((
uuid
=
switch_channel_get_variable
(
channel
,
SWITCH_
ORIGINATOR
_VARIABLE
))
&&
(
other_session
=
switch_core_session_locate
(
uuid
)))
{
switch_core_session_kill_channel
(
other_session
,
SWITCH_SIG_BREAK
);
switch_core_session_rwunlock
(
other_session
);
}
...
...
@@ -1075,7 +1075,7 @@ SWITCH_DECLARE(switch_status_t) switch_channel_perform_pre_answer(switch_channel
msg
.
message_id
=
SWITCH_MESSAGE_INDICATE_PROGRESS
;
msg
.
from
=
channel
->
name
;
status
=
switch_core_session_message_send
(
uuid
,
&
msg
);
if
(
status
==
SWITCH_STATUS_SUCCESS
)
{
status
=
switch_channel_perform_mark_pre_answered
(
channel
,
file
,
func
,
line
);
}
...
...
@@ -1148,11 +1148,11 @@ SWITCH_DECLARE(switch_status_t) switch_channel_perform_mark_answered(switch_chan
switch_channel_event_set_data
(
channel
,
event
);
switch_event_fire
(
&
event
);
}
/* if we're
in a bridge
and the other channel is in a blocking read they will never realize we have answered so send
/* if we're
the child of another channel
and the other channel is in a blocking read they will never realize we have answered so send
a SWITCH_SIG_BREAK to interrupt any blocking reads on that channel
*/
if
((
uuid
=
switch_channel_get_variable
(
channel
,
SWITCH_
BRIDGE
_VARIABLE
))
&&
(
other_session
=
switch_core_session_locate
(
uuid
)))
{
if
((
uuid
=
switch_channel_get_variable
(
channel
,
SWITCH_
ORIGINATOR
_VARIABLE
))
&&
(
other_session
=
switch_core_session_locate
(
uuid
)))
{
switch_core_session_kill_channel
(
other_session
,
SWITCH_SIG_BREAK
);
switch_core_session_rwunlock
(
other_session
);
}
...
...
src/switch_ivr.c
浏览文件 @
9bacb04d
...
...
@@ -2048,9 +2048,8 @@ static void *audio_bridge_thread(switch_thread_t *thread, void *obj)
switch_channel_answer
(
chan_a
);
ans_a
++
;
}
else
if
(
!
pre_b
&&
switch_channel_test_flag
(
chan_b
,
CF_EARLY_MEDIA
))
{
if
(
switch_channel_pre_answer
(
chan_a
)
==
SWITCH_STATUS_SUCCESS
)
{
pre_b
++
;
}
switch_channel_pre_answer
(
chan_a
);
pre_b
++
;
}
if
(
!
pre_b
)
{
switch_yield
(
10000
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论