Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
282808c2
提交
282808c2
authored
10月 31, 2013
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add channel to logline
上级
137b45da
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
18 行增加
和
18 行删除
+18
-18
mod_freetdm.c
libs/freetdm/mod_freetdm/mod_freetdm.c
+18
-18
没有找到文件。
libs/freetdm/mod_freetdm/mod_freetdm.c
浏览文件 @
282808c2
...
...
@@ -719,14 +719,14 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
name = switch_channel_get_name(channel);
if (!tech_pvt->ftdmchan) {
switch_log_printf
(
SWITCH_CHANNEL_
LOG
,
SWITCH_LOG_DEBUG
,
"no ftdmchan set in channel %s!
\n
"
,
name
);
switch_log_printf(SWITCH_CHANNEL_
CHANNEL_LOG(channel)
, SWITCH_LOG_DEBUG, "no ftdmchan set in channel %s!\n", name);
return SWITCH_STATUS_FALSE;
}
span_id = ftdm_channel_get_span_id(tech_pvt->ftdmchan);
chan_id = ftdm_channel_get_id(tech_pvt->ftdmchan);
if (switch_test_flag(tech_pvt, TFLAG_DEAD)) {
switch_log_printf
(
SWITCH_CHANNEL_
LOG
,
SWITCH_LOG_DEBUG
,
"TFLAG_DEAD is set in channel %s device %d:%d!
\n
"
,
name
,
span_id
,
chan_id
);
switch_log_printf(SWITCH_CHANNEL_
CHANNEL_LOG(channel)
, SWITCH_LOG_DEBUG, "TFLAG_DEAD is set in channel %s device %d:%d!\n", name, span_id, chan_id);
return SWITCH_STATUS_FALSE;
}
...
...
@@ -760,7 +760,7 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
}
if (!switch_test_flag(tech_pvt, TFLAG_IO)) {
switch_log_printf
(
SWITCH_CHANNEL_
LOG
,
SWITCH_LOG_DEBUG
,
"TFLAG_IO is not set in channel %s device %d:%d!
\n
"
,
name
,
span_id
,
chan_id
);
switch_log_printf(SWITCH_CHANNEL_
CHANNEL_LOG(channel)
, SWITCH_LOG_DEBUG, "TFLAG_IO is not set in channel %s device %d:%d!\n", name, span_id, chan_id);
goto fail;
}
...
...
@@ -768,7 +768,7 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
status = ftdm_channel_wait(tech_pvt->ftdmchan, &wflags, chunk);
if (status == FTDM_FAIL) {
switch_log_printf
(
SWITCH_CHANNEL_
LOG
,
SWITCH_LOG_ERROR
,
"Failed to read from channel %s device %d:%d!
\n
"
,
name
,
span_id
,
chan_id
);
switch_log_printf(SWITCH_CHANNEL_
CHANNEL_LOG(channel)
, SWITCH_LOG_ERROR, "Failed to read from channel %s device %d:%d!\n", name, span_id, chan_id);
goto fail;
}
...
...
@@ -776,7 +776,7 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
if (!switch_test_flag(tech_pvt, TFLAG_HOLD)) {
total_to -= chunk;
if (total_to <= 0) {
switch_log_printf
(
SWITCH_CHANNEL_
LOG
,
SWITCH_LOG_WARNING
,
"Too many timeouts while waiting I/O in channel %s device %d:%d!
\n
"
,
name
,
span_id
,
chan_id
);
switch_log_printf(SWITCH_CHANNEL_
CHANNEL_LOG(channel)
, SWITCH_LOG_WARNING, "Too many timeouts while waiting I/O in channel %s device %d:%d!\n", name, span_id, chan_id);
goto fail;
}
}
...
...
@@ -789,9 +789,9 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
len = tech_pvt->read_frame.buflen;
if (ftdm_channel_read(tech_pvt->ftdmchan, tech_pvt->read_frame.data, &len) != FTDM_SUCCESS) {
switch_log_printf
(
SWITCH_CHANNEL_
LOG
,
SWITCH_LOG_WARNING
,
"Failed to read from channel %s device %d:%d!
\n
"
,
name
,
span_id
,
chan_id
);
switch_log_printf(SWITCH_CHANNEL_
CHANNEL_LOG(channel)
, SWITCH_LOG_WARNING, "Failed to read from channel %s device %d:%d!\n", name, span_id, chan_id);
if (++tech_pvt->read_error > FTDM_MAX_READ_WRITE_ERRORS) {
switch_log_printf
(
SWITCH_CHANNEL_
LOG
,
SWITCH_LOG_ERROR
,
"too many I/O read errors on channel %s device %d:%d!
\n
"
,
name
,
span_id
,
chan_id
);
switch_log_printf(SWITCH_CHANNEL_
CHANNEL_LOG(channel)
, SWITCH_LOG_ERROR, "too many I/O read errors on channel %s device %d:%d!\n", name, span_id, chan_id);
goto fail;
}
} else {
...
...
@@ -812,7 +812,7 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
for (p = dtmf; p && *p; p++) {
if (is_dtmf(*p)) {
_dtmf.digit = *p;
ftdm_log
(
FTDM
_LOG_DEBUG
,
"Queuing DTMF [%c] in channel %s device %d:%d
\n
"
,
*
p
,
name
,
span_id
,
chan_id
);
switch_log_printf(SWITCH_CHANNEL_CHANNEL_LOG(channel), SWITCH
_LOG_DEBUG, "Queuing DTMF [%c] in channel %s device %d:%d\n", *p, name, span_id, chan_id);
switch_channel_queue_dtmf(channel, &_dtmf);
}
}
...
...
@@ -821,7 +821,7 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
return SWITCH_STATUS_SUCCESS;
fail:
switch_log_printf
(
SWITCH_CHANNEL_
LOG
,
SWITCH_LOG_ERROR
,
"clearing IO in channel %s device %d:%d!
\n
"
,
name
,
span_id
,
chan_id
);
switch_log_printf(SWITCH_CHANNEL_
CHANNEL_LOG(channel)
, SWITCH_LOG_ERROR, "clearing IO in channel %s device %d:%d!\n", name, span_id, chan_id);
switch_clear_flag_locked(tech_pvt, TFLAG_IO);
return SWITCH_STATUS_GENERR;
}
...
...
@@ -844,7 +844,7 @@ static switch_status_t channel_write_frame(switch_core_session_t *session, switc
name = switch_channel_get_name(channel);
if (!tech_pvt->ftdmchan) {
switch_log_printf
(
SWITCH_CHANNEL_
LOG
,
SWITCH_LOG_DEBUG
,
"no ftdmchan set in channel %s!
\n
"
,
name
);
switch_log_printf(SWITCH_CHANNEL_
CHANNEL_LOG(channel)
, SWITCH_LOG_DEBUG, "no ftdmchan set in channel %s!\n", name);
return SWITCH_STATUS_FALSE;
}
...
...
@@ -852,7 +852,7 @@ static switch_status_t channel_write_frame(switch_core_session_t *session, switc
chan_id = ftdm_channel_get_id(tech_pvt->ftdmchan);
if (switch_test_flag(tech_pvt, TFLAG_DEAD)) {
switch_log_printf
(
SWITCH_CHANNEL_
LOG
,
SWITCH_LOG_DEBUG
,
"TFLAG_DEAD is set in channel %s device %d:%d!
\n
"
,
name
,
span_id
,
chan_id
);
switch_log_printf(SWITCH_CHANNEL_
CHANNEL_LOG(channel)
, SWITCH_LOG_DEBUG, "TFLAG_DEAD is set in channel %s device %d:%d!\n", name, span_id, chan_id);
return SWITCH_STATUS_FALSE;
}
...
...
@@ -861,7 +861,7 @@ static switch_status_t channel_write_frame(switch_core_session_t *session, switc
}
if (!switch_test_flag(tech_pvt, TFLAG_IO)) {
switch_log_printf
(
SWITCH_CHANNEL_
LOG
,
SWITCH_LOG_DEBUG
,
"TFLAG_IO is not set in channel %s device %d:%d!
\n
"
,
name
,
span_id
,
chan_id
);
switch_log_printf(SWITCH_CHANNEL_
CHANNEL_LOG(channel)
, SWITCH_LOG_DEBUG, "TFLAG_IO is not set in channel %s device %d:%d!\n", name, span_id, chan_id);
goto fail;
}
...
...
@@ -879,15 +879,15 @@ static switch_status_t channel_write_frame(switch_core_session_t *session, switc
ftdm_channel_wait(tech_pvt->ftdmchan, &wflags, ftdm_channel_get_io_interval(tech_pvt->ftdmchan) * 10);
if (!(wflags & FTDM_WRITE)) {
switch_log_printf
(
SWITCH_CHANNEL_
LOG
,
SWITCH_LOG_DEBUG
,
"Dropping frame! (write not ready) in channel %s device %d:%d!
\n
"
,
name
,
span_id
,
chan_id
);
switch_log_printf(SWITCH_CHANNEL_
CHANNEL_LOG(channel)
, SWITCH_LOG_DEBUG, "Dropping frame! (write not ready) in channel %s device %d:%d!\n", name, span_id, chan_id);
return SWITCH_STATUS_SUCCESS;
}
len = frame->datalen;
if (ftdm_channel_write(tech_pvt->ftdmchan, frame->data, frame->buflen, &len) != FTDM_SUCCESS) {
switch_log_printf
(
SWITCH_CHANNEL_
LOG
,
SWITCH_LOG_DEBUG
,
"Failed to write to channel %s device %d:%d!
\n
"
,
name
,
span_id
,
chan_id
);
switch_log_printf(SWITCH_CHANNEL_
CHANNEL_LOG(channel)
, SWITCH_LOG_DEBUG, "Failed to write to channel %s device %d:%d!\n", name, span_id, chan_id);
if (++tech_pvt->write_error > FTDM_MAX_READ_WRITE_ERRORS) {
switch_log_printf
(
SWITCH_CHANNEL_
LOG
,
switch_log_printf(SWITCH_CHANNEL_
CHANNEL_LOG(channel)
,
SWITCH_LOG_ERROR, "Too many I/O write errors on channel %s device %d:%d!\n", name, span_id, chan_id);
goto fail;
}
...
...
@@ -898,7 +898,7 @@ static switch_status_t channel_write_frame(switch_core_session_t *session, switc
return SWITCH_STATUS_SUCCESS;
fail:
switch_log_printf
(
SWITCH_CHANNEL_
LOG
,
SWITCH_LOG_DEBUG
,
"Error writing to channel %s device %d:%d!
\n
"
,
name
,
span_id
,
chan_id
);
switch_log_printf(SWITCH_CHANNEL_
CHANNEL_LOG(channel)
, SWITCH_LOG_DEBUG, "Error writing to channel %s device %d:%d!\n", name, span_id, chan_id);
switch_clear_flag_locked(tech_pvt, TFLAG_IO);
return SWITCH_STATUS_GENERR;
...
...
@@ -1239,7 +1239,7 @@ static ftdm_status_t on_channel_found(ftdm_channel_t *fchan, ftdm_caller_data_t
tech_init(hdata->tech_pvt, hdata->new_session, fchan, caller_data);
snprintf(name, sizeof(name), "FreeTDM/%u:%u/%s", span_id, chan_id, caller_data->dnis.digits);
switch_log_printf
(
SWITCH_CHANNEL_
LOG
,
SWITCH_LOG_DEBUG
,
"Connect outbound channel %s
\n
"
,
name
);
switch_log_printf(SWITCH_CHANNEL_
CHANNEL_LOG(channel)
, SWITCH_LOG_DEBUG, "Connect outbound channel %s\n", name);
switch_channel_set_name(channel, name);
switch_channel_set_variable(channel, "freetdm_span_name", ftdm_channel_get_span_name(fchan));
switch_channel_set_variable_printf(channel, "freetdm_span_number", "%d", span_id);
...
...
@@ -1267,7 +1267,7 @@ static ftdm_status_t on_channel_found(ftdm_channel_t *fchan, ftdm_caller_data_t
return FTDM_BREAK;
}
}
switch_log_printf
(
SWITCH_CHANNEL_
LOG
,
SWITCH_LOG_DEBUG
,
"Attached session %s to channel %d:%d
\n
"
,
sess_uuid
,
span_id
,
chan_id
);
switch_log_printf(SWITCH_CHANNEL_
CHANNEL_LOG(channel)
, SWITCH_LOG_DEBUG, "Attached session %s to channel %d:%d\n", sess_uuid, span_id, chan_id);
return FTDM_SUCCESS;
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论