Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
3b2203b7
提交
3b2203b7
authored
8月 04, 2011
作者:
Moises Silva
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
freetdm: default iostats to yes and allow configuration thru freetdm.conf
上级
8735906a
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
28 行增加
和
6 行删除
+28
-6
freetdm.conf
libs/freetdm/conf/freetdm.conf
+6
-0
ftdm_io.c
libs/freetdm/src/ftdm_io.c
+21
-6
freetdm.h
libs/freetdm/src/include/freetdm.h
+1
-0
没有找到文件。
libs/freetdm/conf/freetdm.conf
浏览文件 @
3b2203b7
...
...
@@ -34,6 +34,12 @@ trunk_type => FXS
;
add
FXS
channels
from
3
to
4
at
wanpipe
span
1
to
this
freetdm
span
fxs
-
channel
=>
1
:
3
-
4
;
IO
stats
.
Defaults
to
yes
,
you
can
print
the
stats
with
ftdm
iostats
print
<
span
> <
chan
>
;
This
feature
depends
on
the
span
IO
type
,
currently
only
Wanpipe
spans
support
it
;
This
may
cause
a
warning
to
be
printed
once
in
a
while
if
audio
is
not
provided
fast
enough
;
and
causes
the
driver
to
transmit
an
idle
frame
(
when
there
is
no
data
provided
by
the
application
)
iostats
=>
yes
[
span
wanpipe
myWanpipe2
]
trunk_type
=>
FXO
;
This
number
will
be
used
as
DNIS
for
FXO
devices
...
...
libs/freetdm/src/ftdm_io.c
浏览文件 @
3b2203b7
...
...
@@ -4584,14 +4584,20 @@ FT_DECLARE(ftdm_status_t) ftdm_configure_span_channels(ftdm_span_t *span, const
return
FTDM_FAIL
;
}
if
(
chan_config
->
debugdtmf
)
{
for
(
chan_index
=
currindex
+
1
;
chan_index
<=
span
->
chan_count
;
chan_index
++
)
{
if
(
!
FTDM_IS_VOICE_CHANNEL
(
span
->
channels
[
chan_index
]))
{
continue
;
}
span
->
channels
[
chan_index
]
->
dtmfdbg
.
requested
=
1
;
for
(
chan_index
=
currindex
+
1
;
chan_index
<=
span
->
chan_count
;
chan_index
++
)
{
if
(
chan_config
->
iostats
)
{
ftdm_channel_set_feature
(
span
->
channels
[
chan_index
],
FTDM_CHANNEL_FEATURE_IO_STATS
);
}
if
(
!
FTDM_IS_VOICE_CHANNEL
(
span
->
channels
[
chan_index
]))
{
continue
;
}
if
(
chan_config
->
debugdtmf
)
{
span
->
channels
[
chan_index
]
->
dtmfdbg
.
requested
=
1
;
}
}
return
FTDM_SUCCESS
;
}
...
...
@@ -4658,6 +4664,8 @@ static ftdm_status_t load_config(void)
/* it is confusing that parameters from one span affect others, so let's clear them */
memset
(
&
chan_config
,
0
,
sizeof
(
chan_config
));
sprintf
(
chan_config
.
group_name
,
"__default"
);
/* default to storing iostats */
chan_config
.
iostats
=
FTDM_TRUE
;
}
else
{
ftdm_log
(
FTDM_LOG_CRIT
,
"failure creating span of type %s
\n
"
,
type
);
span
=
NULL
;
...
...
@@ -4784,6 +4792,13 @@ static ftdm_status_t load_config(void)
}
else
if
(
!
strcasecmp
(
var
,
"debugdtmf"
))
{
chan_config
.
debugdtmf
=
ftdm_true
(
val
);
ftdm_log
(
FTDM_LOG_DEBUG
,
"Setting debugdtmf to '%s'
\n
"
,
chan_config
.
debugdtmf
?
"yes"
:
"no"
);
}
else
if
(
!
strncasecmp
(
var
,
"iostats"
,
sizeof
(
"iostats"
)
-
1
))
{
if
(
ftdm_true
(
val
))
{
chan_config
.
iostats
=
FTDM_TRUE
;
}
else
{
chan_config
.
iostats
=
FTDM_FALSE
;
}
ftdm_log
(
FTDM_LOG_DEBUG
,
"Setting iostats to '%s'
\n
"
,
chan_config
.
iostats
?
"yes"
:
"no"
);
}
else
if
(
!
strcasecmp
(
var
,
"group"
))
{
len
=
strlen
(
val
);
if
(
len
>=
FTDM_MAX_NAME_STR_SZ
)
{
...
...
libs/freetdm/src/include/freetdm.h
浏览文件 @
3b2203b7
...
...
@@ -487,6 +487,7 @@ typedef struct ftdm_channel_config {
float
rxgain
;
float
txgain
;
uint8_t
debugdtmf
;
uint8_t
iostats
;
}
ftdm_channel_config_t
;
/*!
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论