Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
c3798dbb
提交
c3798dbb
authored
6月 28, 2014
作者:
Steve Underwood
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FAX tweaks
上级
ad1e7e96
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
34 行增加
和
39 行删除
+34
-39
fax.c
libs/spandsp/src/fax.c
+3
-3
fax.h
libs/spandsp/src/spandsp/fax.h
+2
-2
t30.h
libs/spandsp/src/spandsp/t30.h
+5
-3
t30.c
libs/spandsp/src/t30.c
+13
-13
t38_gateway.c
libs/spandsp/src/t38_gateway.c
+9
-16
t38_terminal.c
libs/spandsp/src/t38_terminal.c
+2
-2
没有找到文件。
libs/spandsp/src/fax.c
浏览文件 @
c3798dbb
...
...
@@ -394,7 +394,7 @@ SPAN_DECLARE(logging_state_t *) fax_get_logging_state(fax_state_t *s)
}
/*- End of function --------------------------------------------------------*/
SPAN_DECLARE
(
int
)
fax_restart
(
fax_state_t
*
s
,
int
calling_party
)
SPAN_DECLARE
(
int
)
fax_restart
(
fax_state_t
*
s
,
bool
calling_party
)
{
v8_parms_t
v8_parms
;
...
...
@@ -420,7 +420,7 @@ SPAN_DECLARE(int) fax_restart(fax_state_t *s, int calling_party)
v8_parms
.
nsf
=
-
1
;
v8_parms
.
t66
=
-
1
;
v8_restart
(
&
s
->
v8
,
calling_party
,
&
v8_parms
);
t30_restart
(
&
s
->
t30
);
t30_restart
(
&
s
->
t30
,
calling_party
);
#if defined(LOG_FAX_AUDIO)
{
char
buf
[
100
+
1
];
...
...
@@ -455,7 +455,7 @@ SPAN_DECLARE(int) fax_restart(fax_state_t *s, int calling_party)
}
/*- End of function --------------------------------------------------------*/
SPAN_DECLARE
(
fax_state_t
*
)
fax_init
(
fax_state_t
*
s
,
int
calling_party
)
SPAN_DECLARE
(
fax_state_t
*
)
fax_init
(
fax_state_t
*
s
,
bool
calling_party
)
{
v8_parms_t
v8_parms
;
...
...
libs/spandsp/src/spandsp/fax.h
浏览文件 @
c3798dbb
...
...
@@ -108,7 +108,7 @@ SPAN_DECLARE(logging_state_t *) fax_get_logging_state(fax_state_t *s);
\param calling_party True if the context is for a calling party. False if the
context is for an answering party.
\return 0 for OK, else -1. */
SPAN_DECLARE
(
int
)
fax_restart
(
fax_state_t
*
s
,
int
calling_party
);
SPAN_DECLARE
(
int
)
fax_restart
(
fax_state_t
*
s
,
bool
calling_party
);
/*! Initialise a FAX context.
\brief Initialise a FAX context.
...
...
@@ -117,7 +117,7 @@ SPAN_DECLARE(int) fax_restart(fax_state_t *s, int calling_party);
context is for an answering party.
\return A pointer to the FAX context, or NULL if there was a problem.
*/
SPAN_DECLARE
(
fax_state_t
*
)
fax_init
(
fax_state_t
*
s
,
int
calling_party
);
SPAN_DECLARE
(
fax_state_t
*
)
fax_init
(
fax_state_t
*
s
,
bool
calling_party
);
/*! Release a FAX context.
\brief Release a FAX context.
...
...
libs/spandsp/src/spandsp/t30.h
浏览文件 @
c3798dbb
...
...
@@ -213,7 +213,7 @@ typedef void (*t30_set_handler_t)(void *user_data, int type, int bit_rate, int s
\brief T.30 send HDLC handler.
\param user_data An opaque pointer.
\param msg The HDLC message.
\param len The length of the message.
\param len The length of the message.
-1 to flush the HDLC queue.
*/
typedef
void
(
*
t30_send_hdlc_handler_t
)(
void
*
user_data
,
const
uint8_t
msg
[],
int
len
);
...
...
@@ -526,7 +526,7 @@ extern "C"
\param send_hdlc_user_data
\return A pointer to the context, or NULL if there was a problem. */
SPAN_DECLARE
(
t30_state_t
*
)
t30_init
(
t30_state_t
*
s
,
int
calling_party
,
bool
calling_party
,
t30_set_handler_t
set_rx_type_handler
,
void
*
set_rx_type_user_data
,
t30_set_handler_t
set_tx_type_handler
,
...
...
@@ -549,8 +549,10 @@ SPAN_DECLARE(int) t30_free(t30_state_t *s);
/*! Restart a T.30 context.
\brief Restart a T.30 context.
\param s The T.30 context.
\param calling_party True if the context is for a calling party. False if the
context is for an answering party.
\return 0 for OK, else -1. */
SPAN_DECLARE
(
int
)
t30_restart
(
t30_state_t
*
s
);
SPAN_DECLARE
(
int
)
t30_restart
(
t30_state_t
*
s
,
bool
calling_party
);
/*! Check if a T.30 call is still active. This may be used to regularly poll
if the job has finished.
...
...
libs/spandsp/src/t30.c
浏览文件 @
c3798dbb
...
...
@@ -410,15 +410,15 @@ static const struct
uint8_t
dcs_code
;
}
fallback_sequence
[]
=
{
{
14400
,
T30_MODEM_V17
,
T30_SUPPORT_V17
,
DISBIT6
},
{
12000
,
T30_MODEM_V17
,
T30_SUPPORT_V17
,
(
DISBIT6
|
DISBIT4
)},
{
9600
,
T30_MODEM_V17
,
T30_SUPPORT_V17
,
(
DISBIT6
|
DISBIT3
)},
{
9600
,
T30_MODEM_V29
,
T30_SUPPORT_V29
,
DISBIT3
},
{
14400
,
T30_MODEM_V17
,
T30_SUPPORT_V17
,
(
DISBIT6
)
},
{
12000
,
T30_MODEM_V17
,
T30_SUPPORT_V17
,
(
DISBIT6
|
DISBIT4
)},
{
9600
,
T30_MODEM_V17
,
T30_SUPPORT_V17
,
(
DISBIT6
|
DISBIT3
)},
{
9600
,
T30_MODEM_V29
,
T30_SUPPORT_V29
,
(
DISBIT3
)
},
{
7200
,
T30_MODEM_V17
,
T30_SUPPORT_V17
,
(
DISBIT6
|
DISBIT4
|
DISBIT3
)},
{
7200
,
T30_MODEM_V29
,
T30_SUPPORT_V29
,
(
DISBIT4
|
DISBIT3
)},
{
4800
,
T30_MODEM_V27TER
,
T30_SUPPORT_V27TER
,
DISBIT4
},
{
2400
,
T30_MODEM_V27TER
,
T30_SUPPORT_V27TER
,
0
},
{
0
,
0
,
0
,
0
}
{
7200
,
T30_MODEM_V29
,
T30_SUPPORT_V29
,
(
DISBIT4
|
DISBIT3
)},
{
4800
,
T30_MODEM_V27TER
,
T30_SUPPORT_V27TER
,
(
DISBIT4
)
},
{
2400
,
T30_MODEM_V27TER
,
T30_SUPPORT_V27TER
,
(
0
)
},
{
0
,
0
,
0
,
(
0
)
}
};
static
void
queue_phase
(
t30_state_t
*
s
,
int
phase
);
...
...
@@ -6587,8 +6587,10 @@ SPAN_DECLARE(void) t30_remote_interrupts_allowed(t30_state_t *s, int state)
}
/*- End of function --------------------------------------------------------*/
SPAN_DECLARE
(
int
)
t30_restart
(
t30_state_t
*
s
)
SPAN_DECLARE
(
int
)
t30_restart
(
t30_state_t
*
s
,
bool
calling_party
)
{
release_resources
(
s
);
s
->
calling_party
=
calling_party
;
s
->
phase
=
T30_PHASE_IDLE
;
s
->
next_phase
=
T30_PHASE_IDLE
;
s
->
current_fallback
=
0
;
...
...
@@ -6602,7 +6604,6 @@ SPAN_DECLARE(int) t30_restart(t30_state_t *s)
memset
(
&
s
->
far_dis_dtc_frame
,
0
,
sizeof
(
s
->
far_dis_dtc_frame
));
t30_build_dis_or_dtc
(
s
);
memset
(
&
s
->
rx_info
,
0
,
sizeof
(
s
->
rx_info
));
release_resources
(
s
);
/* The page number is only reset at call establishment */
s
->
rx_page_number
=
0
;
s
->
tx_page_number
=
0
;
...
...
@@ -6627,7 +6628,7 @@ SPAN_DECLARE(int) t30_restart(t30_state_t *s)
/*- End of function --------------------------------------------------------*/
SPAN_DECLARE
(
t30_state_t
*
)
t30_init
(
t30_state_t
*
s
,
int
calling_party
,
bool
calling_party
,
t30_set_handler_t
set_rx_type_handler
,
void
*
set_rx_type_user_data
,
t30_set_handler_t
set_tx_type_handler
,
...
...
@@ -6641,7 +6642,6 @@ SPAN_DECLARE(t30_state_t *) t30_init(t30_state_t *s,
return
NULL
;
}
memset
(
s
,
0
,
sizeof
(
*
s
));
s
->
calling_party
=
calling_party
;
s
->
set_rx_type_handler
=
set_rx_type_handler
;
s
->
set_rx_type_user_data
=
set_rx_type_user_data
;
s
->
set_tx_type_handler
=
set_tx_type_handler
;
...
...
@@ -6670,7 +6670,7 @@ SPAN_DECLARE(t30_state_t *) t30_init(t30_state_t *s,
s
->
local_min_scan_time_code
=
T30_MIN_SCAN_0MS
;
span_log_init
(
&
s
->
logging
,
SPAN_LOG_NONE
,
NULL
);
span_log_set_protocol
(
&
s
->
logging
,
"T.30"
);
t30_restart
(
s
);
t30_restart
(
s
,
calling_party
);
return
s
;
}
/*- End of function --------------------------------------------------------*/
...
...
libs/spandsp/src/t38_gateway.c
浏览文件 @
c3798dbb
...
...
@@ -604,26 +604,19 @@ static void monitor_control_messages(t38_gateway_state_t *s,
uint8_t
dcs_code
;
}
modem_codes
[]
=
{
{
14400
,
FAX_MODEM_V17_RX
,
DISBIT6
},
{
12000
,
FAX_MODEM_V17_RX
,
(
DISBIT6
|
DISBIT4
)},
{
9600
,
FAX_MODEM_V17_RX
,
(
DISBIT6
|
DISBIT3
)},
{
9600
,
FAX_MODEM_V29_RX
,
DISBIT3
},
{
14400
,
FAX_MODEM_V17_RX
,
(
DISBIT6
)
},
{
12000
,
FAX_MODEM_V17_RX
,
(
DISBIT6
|
DISBIT4
)},
{
9600
,
FAX_MODEM_V17_RX
,
(
DISBIT6
|
DISBIT3
)},
{
9600
,
FAX_MODEM_V29_RX
,
(
DISBIT3
)
},
{
7200
,
FAX_MODEM_V17_RX
,
(
DISBIT6
|
DISBIT4
|
DISBIT3
)},
{
7200
,
FAX_MODEM_V29_RX
,
(
DISBIT4
|
DISBIT3
)},
{
4800
,
FAX_MODEM_V27TER_RX
,
DISBIT4
},
{
2400
,
FAX_MODEM_V27TER_RX
,
0
},
{
0
,
FAX_MODEM_NONE
,
0
}
{
7200
,
FAX_MODEM_V29_RX
,
(
DISBIT4
|
DISBIT3
)},
{
4800
,
FAX_MODEM_V27TER_RX
,
(
DISBIT4
)
},
{
2400
,
FAX_MODEM_V27TER_RX
,
(
0
)
},
{
0
,
FAX_MODEM_NONE
,
(
0
)
}
};
static
const
int
minimum_scan_line_times
[
8
]
=
{
20
,
5
,
10
,
0
,
40
,
0
,
0
,
0
20
,
5
,
10
,
0
,
40
,
0
,
0
,
0
};
int
dcs_code
;
int
i
;
...
...
libs/spandsp/src/t38_terminal.c
浏览文件 @
c3798dbb
...
...
@@ -1517,7 +1517,7 @@ SPAN_DECLARE(int) t38_terminal_restart(t38_terminal_state_t *s,
bool
calling_party
)
{
t38_terminal_t38_fe_restart
(
s
);
t30_restart
(
&
s
->
t30
);
t30_restart
(
&
s
->
t30
,
calling_party
);
return
0
;
}
/*- End of function --------------------------------------------------------*/
...
...
@@ -1557,7 +1557,7 @@ SPAN_DECLARE(t38_terminal_state_t *) t38_terminal_init(t38_terminal_state_t *s,
t30_set_iaf_mode
(
&
s
->
t30
,
s
->
t38_fe
.
iaf
);
t30_set_supported_modems
(
&
s
->
t30
,
T30_SUPPORT_V27TER
|
T30_SUPPORT_V29
|
T30_SUPPORT_V17
|
T30_SUPPORT_IAF
);
t30_restart
(
&
s
->
t30
);
t30_restart
(
&
s
->
t30
,
calling_party
);
return
s
;
}
/*- End of function --------------------------------------------------------*/
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论