Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
632e89f5
提交
632e89f5
authored
5月 21, 2010
作者:
Moises Silva
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
freetdm: handle loop requests
上级
edb2d582
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
36 行增加
和
26 行删除
+36
-26
ftmod_sangoma_boost.c
...eetdm/src/ftmod/ftmod_sangoma_boost/ftmod_sangoma_boost.c
+32
-24
ftmod_wanpipe.c
libs/freetdm/src/ftmod/ftmod_wanpipe/ftmod_wanpipe.c
+4
-2
没有找到文件。
libs/freetdm/src/ftmod/ftmod_sangoma_boost/ftmod_sangoma_boost.c
浏览文件 @
632e89f5
...
...
@@ -1088,6 +1088,7 @@ static void handle_call_loop_start(ftdm_span_t *span, sangomabc_connection_t *mc
ftdm_channel_done
(
ftdmchan
);
return
;
}
ftdm_log
(
FTDM_LOG_DEBUG
,
"%d:%d starting loop
\n
"
,
ftdmchan
->
span_id
,
ftdmchan
->
chan_id
);
ftdm_channel_command
(
ftdmchan
,
FTDM_COMMAND_ENABLE_LOOP
,
NULL
);
}
...
...
@@ -1100,13 +1101,16 @@ static void handle_call_loop_stop(ftdm_span_t *span, sangomabc_connection_t *mco
return
;
}
if
(
ftdmchan
->
state
!=
FTDM_CHANNEL_STATE_IN_LOOP
)
{
ftdm_log
(
FTDM_LOG_
ERROR
,
"Got stop loop request in a channel that is not in loop, ignoring ...
\n
"
);
ftdm_log
(
FTDM_LOG_
WARNING
,
"Got stop loop request in a channel that is not in loop, ignoring ...
\n
"
);
return
;
}
ftdm_channel_command
(
ftdmchan
,
FTDM_COMMAND_DISABLE_LOOP
,
NULL
);
/* even when we did not sent a msg we set this flag to avoid sending call stop in the DOWN state handler */
ftdm_set_flag
(
ftdmchan
,
SFLAG_SENT_FINAL_MSG
);
ftdm_set_state_r
(
ftdmchan
,
FTDM_CHANNEL_STATE_DOWN
,
res
);
if
(
res
!=
FTDM_SUCCESS
)
{
ftdm_log
(
FTDM_LOG_CRIT
,
"yay, could not set the state of the channel from IN_LOOP to DOWN
\n
"
);
}
}
/**
...
...
@@ -1355,33 +1359,37 @@ static __inline__ void state_advance(ftdm_channel_t *ftdmchan)
int
call_stopped_ack_sent
=
0
;
ftdm_sangoma_boost_data_t
*
sangoma_boost_data
=
ftdmchan
->
span
->
signal_data
;
release_request_id_span_chan
(
ftdmchan
->
physical_span_id
,
ftdmchan
->
physical_chan_id
);
if
(
!
ftdm_test_sflag
(
ftdmchan
,
SFLAG_SENT_FINAL_MSG
))
{
ftdm_set_sflag_locked
(
ftdmchan
,
SFLAG_SENT_FINAL_MSG
);
if
(
ftdmchan
->
call_data
&&
CALL_DATA
(
ftdmchan
)
->
last_event_id
==
SIGBOOST_EVENT_CALL_START_NACK
)
{
sangomabc_exec_command
(
mcon
,
BOOST_SPAN
(
ftdmchan
),
BOOST_CHAN
(
ftdmchan
),
CALL_DATA
(
ftdmchan
)
->
call_setup_id
,
SIGBOOST_EVENT_CALL_START_NACK_ACK
,
0
,
0
);
}
else
{
/* we got a call stop msg, time to reply with call stopped ack */
sangomabc_exec_command
(
mcon
,
BOOST_SPAN
(
ftdmchan
),
BOOST_CHAN
(
ftdmchan
),
0
,
SIGBOOST_EVENT_CALL_STOPPED_ACK
,
0
,
0
);
call_stopped_ack_sent
=
1
;
if
(
ftdmchan
->
last_state
==
FTDM_CHANNEL_STATE_IN_LOOP
)
{
ftdm_log
(
FTDM_LOG_DEBUG
,
"%d:%d terminating loop
\n
"
,
ftdmchan
->
span_id
,
ftdmchan
->
chan_id
);
}
else
{
release_request_id_span_chan
(
ftdmchan
->
physical_span_id
,
ftdmchan
->
physical_chan_id
);
if
(
!
ftdm_test_sflag
(
ftdmchan
,
SFLAG_SENT_FINAL_MSG
))
{
ftdm_set_sflag_locked
(
ftdmchan
,
SFLAG_SENT_FINAL_MSG
);
if
(
ftdmchan
->
call_data
&&
CALL_DATA
(
ftdmchan
)
->
last_event_id
==
SIGBOOST_EVENT_CALL_START_NACK
)
{
sangomabc_exec_command
(
mcon
,
BOOST_SPAN
(
ftdmchan
),
BOOST_CHAN
(
ftdmchan
),
CALL_DATA
(
ftdmchan
)
->
call_setup_id
,
SIGBOOST_EVENT_CALL_START_NACK_ACK
,
0
,
0
);
}
else
{
/* we got a call stop msg, time to reply with call stopped ack */
sangomabc_exec_command
(
mcon
,
BOOST_SPAN
(
ftdmchan
),
BOOST_CHAN
(
ftdmchan
),
0
,
SIGBOOST_EVENT_CALL_STOPPED_ACK
,
0
,
0
);
call_stopped_ack_sent
=
1
;
}
}
}
ftdmchan
->
sflags
=
0
;
memset
(
ftdmchan
->
call_data
,
0
,
sizeof
(
sangoma_boost_call_t
));
if
(
sangoma_boost_data
->
sigmod
&&
call_stopped_ack_sent
)
{
/* we dont want to call ftdm_channel_done just yet until call released is received */
ftdm_log
(
FTDM_LOG_DEBUG
,
"Waiting for call release confirmation before declaring chan %d:%d as available
\n
"
,
...
...
libs/freetdm/src/ftmod/ftmod_wanpipe/ftmod_wanpipe.c
浏览文件 @
632e89f5
...
...
@@ -601,7 +601,7 @@ static FIO_COMMAND_FUNCTION(wanpipe_command)
{
err
=
sangoma_tdm_enable_hwec
(
ftdmchan
->
sockfd
,
&
tdm_api
);
if
(
err
)
{
snprintf
(
ftdmchan
->
last_error
,
sizeof
(
ftdmchan
->
last_error
),
"HWEC Enable Failed"
);
snprintf
(
ftdmchan
->
last_error
,
sizeof
(
ftdmchan
->
last_error
),
"HWEC Enable Failed"
);
return
FTDM_FAIL
;
}
}
...
...
@@ -610,7 +610,7 @@ static FIO_COMMAND_FUNCTION(wanpipe_command)
{
err
=
sangoma_tdm_disable_hwec
(
ftdmchan
->
sockfd
,
&
tdm_api
);
if
(
err
)
{
snprintf
(
ftdmchan
->
last_error
,
sizeof
(
ftdmchan
->
last_error
),
"HWEC Disable Failed"
);
snprintf
(
ftdmchan
->
last_error
,
sizeof
(
ftdmchan
->
last_error
),
"HWEC Disable Failed"
);
return
FTDM_FAIL
;
}
}
...
...
@@ -625,6 +625,7 @@ static FIO_COMMAND_FUNCTION(wanpipe_command)
}
#endif
}
break
;
case
FTDM_COMMAND_DISABLE_LOOP
:
{
#ifdef WP_API_FEATURE_LOOP
...
...
@@ -635,6 +636,7 @@ static FIO_COMMAND_FUNCTION(wanpipe_command)
}
#endif
}
break
;
case
FTDM_COMMAND_SET_INTERVAL
:
{
err
=
sangoma_tdm_set_usr_period
(
ftdmchan
->
sockfd
,
&
tdm_api
,
FTDM_COMMAND_OBJ_INT
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论