Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
1fabe6fc
提交
1fabe6fc
authored
3月 18, 2011
作者:
Moises Silva
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
freetdm: add configuration option for DTMF debug directory
上级
3c9ee25a
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
20 行增加
和
5 行删除
+20
-5
freetdm.conf
libs/freetdm/conf/freetdm.conf
+3
-0
ftdm_io.c
libs/freetdm/src/ftdm_io.c
+17
-5
没有找到文件。
libs/freetdm/conf/freetdm.conf
浏览文件 @
1fabe6fc
...
@@ -20,6 +20,9 @@ cpu_reset_alarm_threshold => 70
...
@@ -20,6 +20,9 @@ cpu_reset_alarm_threshold => 70
;
cpu_alarm_action
=>
warn
,
reject
;
cpu_alarm_action
=>
warn
,
reject
cpu_alarm_action
=>
warn
cpu_alarm_action
=>
warn
;
Where
to
dump
DTMF
debug
files
(
see
per
span
debugdtmf
=
yes
option
)
debugdtmf_directory
=/
full
/
path
/
to
/
dtmf
/
directory
;
spans
are
defined
with
[
span
<
span
type
> <
span
name
>]
;
spans
are
defined
with
[
span
<
span
type
> <
span
name
>]
;
the
span
type
can
either
be
zt
,
wanpipe
or
pika
;
the
span
type
can
either
be
zt
,
wanpipe
or
pika
;
the
span
name
can
be
any
unique
string
;
the
span
name
can
be
any
unique
string
...
...
libs/freetdm/src/ftdm_io.c
浏览文件 @
1fabe6fc
...
@@ -244,6 +244,7 @@ static struct {
...
@@ -244,6 +244,7 @@ static struct {
ftdm_caller_data_t
*
call_ids
[
MAX_CALLIDS
+
1
];
ftdm_caller_data_t
*
call_ids
[
MAX_CALLIDS
+
1
];
ftdm_mutex_t
*
call_id_mutex
;
ftdm_mutex_t
*
call_id_mutex
;
uint32_t
last_call_id
;
uint32_t
last_call_id
;
char
dtmfdebug_directory
[
1024
];
}
globals
;
}
globals
;
enum
ftdm_enum_cpu_alarm_action_flags
enum
ftdm_enum_cpu_alarm_action_flags
...
@@ -3469,7 +3470,7 @@ FT_DECLARE(ftdm_status_t) ftdm_channel_queue_dtmf(ftdm_channel_t *ftdmchan, cons
...
@@ -3469,7 +3470,7 @@ FT_DECLARE(ftdm_status_t) ftdm_channel_queue_dtmf(ftdm_channel_t *ftdmchan, cons
if
(
!
ftdmchan
->
dtmfdbg
.
file
)
{
if
(
!
ftdmchan
->
dtmfdbg
.
file
)
{
struct
tm
currtime
;
struct
tm
currtime
;
time_t
currsec
;
time_t
currsec
;
char
dfile
[
512
];
char
dfile
[
1024
];
currsec
=
time
(
NULL
);
currsec
=
time
(
NULL
);
...
@@ -3480,10 +3481,18 @@ FT_DECLARE(ftdm_status_t) ftdm_channel_queue_dtmf(ftdm_channel_t *ftdmchan, cons
...
@@ -3480,10 +3481,18 @@ FT_DECLARE(ftdm_status_t) ftdm_channel_queue_dtmf(ftdm_channel_t *ftdmchan, cons
localtime_r
(
&
currsec
,
&
currtime
);
localtime_r
(
&
currsec
,
&
currtime
);
#endif
#endif
snprintf
(
dfile
,
sizeof
(
dfile
),
"dtmf-s%dc%d-20%d-%d-%d-%d:%d:%d.%s"
,
if
(
ftdm_strlen_zero
(
globals
.
dtmfdebug_directory
))
{
ftdmchan
->
span_id
,
ftdmchan
->
chan_id
,
snprintf
(
dfile
,
sizeof
(
dfile
),
"dtmf-s%dc%d-20%d-%d-%d-%d:%d:%d.%s"
,
currtime
.
tm_year
-
100
,
currtime
.
tm_mon
+
1
,
currtime
.
tm_mday
,
ftdmchan
->
span_id
,
ftdmchan
->
chan_id
,
currtime
.
tm_hour
,
currtime
.
tm_min
,
currtime
.
tm_sec
,
ftdmchan
->
native_codec
==
FTDM_CODEC_ULAW
?
"ulaw"
:
ftdmchan
->
native_codec
==
FTDM_CODEC_ALAW
?
"alaw"
:
"sln"
);
currtime
.
tm_year
-
100
,
currtime
.
tm_mon
+
1
,
currtime
.
tm_mday
,
currtime
.
tm_hour
,
currtime
.
tm_min
,
currtime
.
tm_sec
,
ftdmchan
->
native_codec
==
FTDM_CODEC_ULAW
?
"ulaw"
:
ftdmchan
->
native_codec
==
FTDM_CODEC_ALAW
?
"alaw"
:
"sln"
);
}
else
{
snprintf
(
dfile
,
sizeof
(
dfile
),
"%s/dtmf-s%dc%d-20%d-%d-%d-%d:%d:%d.%s"
,
globals
.
dtmfdebug_directory
,
ftdmchan
->
span_id
,
ftdmchan
->
chan_id
,
currtime
.
tm_year
-
100
,
currtime
.
tm_mon
+
1
,
currtime
.
tm_mday
,
currtime
.
tm_hour
,
currtime
.
tm_min
,
currtime
.
tm_sec
,
ftdmchan
->
native_codec
==
FTDM_CODEC_ULAW
?
"ulaw"
:
ftdmchan
->
native_codec
==
FTDM_CODEC_ALAW
?
"alaw"
:
"sln"
);
}
ftdmchan
->
dtmfdbg
.
file
=
fopen
(
dfile
,
"wb"
);
ftdmchan
->
dtmfdbg
.
file
=
fopen
(
dfile
,
"wb"
);
if
(
!
ftdmchan
->
dtmfdbg
.
file
)
{
if
(
!
ftdmchan
->
dtmfdbg
.
file
)
{
ftdm_log_chan
(
ftdmchan
,
FTDM_LOG_ERROR
,
"failed to open debug dtmf file %s
\n
"
,
dfile
);
ftdm_log_chan
(
ftdmchan
,
FTDM_LOG_ERROR
,
"failed to open debug dtmf file %s
\n
"
,
dfile
);
...
@@ -4697,6 +4706,9 @@ static ftdm_status_t load_config(void)
...
@@ -4697,6 +4706,9 @@ static ftdm_status_t load_config(void)
globals
.
cpu_monitor
.
alarm_action_flags
|=
FTDM_CPU_ALARM_ACTION_WARN
;
globals
.
cpu_monitor
.
alarm_action_flags
|=
FTDM_CPU_ALARM_ACTION_WARN
;
}
}
}
}
}
else
if
(
!
strncasecmp
(
var
,
"debugdtmf_directory"
,
sizeof
(
"debugdtmf_directory"
)
-
1
))
{
ftdm_set_string
(
globals
.
dtmfdebug_directory
,
val
);
ftdm_log
(
FTDM_LOG_DEBUG
,
"Debug DTMF directory set to '%s'
\n
"
,
globals
.
dtmfdebug_directory
);
}
else
if
(
!
strncasecmp
(
var
,
"cpu_monitoring_interval"
,
sizeof
(
"cpu_monitoring_interval"
)
-
1
))
{
}
else
if
(
!
strncasecmp
(
var
,
"cpu_monitoring_interval"
,
sizeof
(
"cpu_monitoring_interval"
)
-
1
))
{
if
(
atoi
(
val
)
>
0
)
{
if
(
atoi
(
val
)
>
0
)
{
globals
.
cpu_monitor
.
interval
=
atoi
(
val
);
globals
.
cpu_monitor
.
interval
=
atoi
(
val
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论