Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
0f937ca1
提交
0f937ca1
authored
12月 16, 2010
作者:
Moises Silva
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
freetdm: Add documentation on sig status
上级
ccbc2ed9
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
60 行增加
和
0 行删除
+60
-0
sigstatus.txt
libs/freetdm/docs/sigstatus.txt
+59
-0
freetdm.h
libs/freetdm/src/include/freetdm.h
+1
-0
没有找到文件。
libs/freetdm/docs/sigstatus.txt
0 → 100644
浏览文件 @
0f937ca1
FreeTDM can both notify and set signaling status changes in the different protocols thru a unified interface. More
specific details on the C data types and function prototypes are found in freetdm.h
The API provides the following functions and data types to do it:
The signaling status in any channel/span is represented thru ftdm_signaling_status_t
/* The signaling link is down (no d-chans up in the span/group, MFC-R2 bit pattern unidentified) */
FTDM_SIG_STATE_DOWN,
/* The signaling link is suspended (MFC-R2 bit pattern blocked, PRI maintenance, ss7 blocked?) */
FTDM_SIG_STATE_SUSPENDED,
/* The signaling link is ready and calls can be placed (ie: d-chan up, MFC-R2 both rx and tx in IDLE) */
FTDM_SIG_STATE_UP,
/* Invalid status */
FTDM_SIG_STATE_INVALID
Changes in the signaling status are notified to the user using the standard callback notification function provided
during configuration using the sigevent type FTDM_SIGEVENT_SIGSTATUS_CHANGED which is sent when the line status changes.
On startup the signalling status default is FTDM_SIG_STATE_DOWN, and no notification is provided until the state change,
so applications must assume the status is down unless told otherwise.
When ftdm_span_start is called, the signaling stack takes care of attempting to bring the status to UP
but it will ultimately depend on the other side too.
== Setting the signaling status ==
Users can set the signaling status on a given channel/span thru FreeTDM the following API functions:
ftdm_channel_set_sig_status
ftdm_span_set_sig_status
If the user calls ftdm_channel_set_sig_status(chan, FTDM_SIG_STATE_SUSPENDED), the signaling stack will try to set
the status of the line to the one requested, if successful, it will result in a SIGEVENT_SIGSTATUS_CHANGED notification
being sent with status FTDM_SIG_STATE_SUSPENDED.
** MFC-R2 Signaling Notes **
For MFC-R2, calling ftdm_span_start() results in setting the tx CAS bits to IDLE. However, if the rx bits are in BLOCKED state
the signaling status will be reported as SUSPENDED.
If the user calls ftdm_channel_set_sig_status(chan, SUSPENDED), the tx CAS bits will be set to BLOCKED and, if, the current rx bits
are IDLE then a SIGEVENT_SIGSTATUS_CHANGED with state SUSPENDED will be sent. If the rx bits are already in blocked then no further
SIGEVENT_SIGSTATUS_CHANGED notification is needed (because it was already sent when the rx bits were initially detected as BLOCKED).
If the user calls ftdm_channel_set_sig_status(chan, UP), the tx CAS bits will be set to IDLE and, if, the current rx bits
are IDLE, then SIGEVENT_SIGSTATUS_CHANGED with state UP will be sent. If the rx bits are BLOCKED, then no notification is
sent at all until the rx bits change.
Bottom line is, for MFC-R2, SIGEVENT_SIGSTATUS_CHANGED UP is only sent to the user when both the rx and tx bits are in IDLE, and
SIGEVENT_SIGSTATUS_CHANGED SUSPENDED is only sent to the user when any of the rx or tx bits are in BLOCKED.
== Getting the signaling status ==
Users can get the signaling status on a given channel/span thru FreeTDM the following API functions:
ftdm_channel_get_sig_status
ftdm_span_get_sig_status
The line status returned should be the same as the last time a SIGEVENT_SIGSTATUS_CHANGED was reported.
libs/freetdm/src/include/freetdm.h
浏览文件 @
0f937ca1
...
...
@@ -367,6 +367,7 @@ typedef struct ftdm_channel_config {
/*!
\brief Signaling status on a given span or specific channel on protocols that support it
\note see docs/sigstatus.txt for more extensive documentation on signaling status
*/
typedef
enum
{
/* The signaling link is down (no d-chans up in the span/group, MFC-R2 bit pattern unidentified) */
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论