Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
33349010
提交
33349010
authored
4月 20, 2011
作者:
Michael S Collins
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
ssh://git.freeswitch.org:222/freeswitch
上级
1781ac88
82e3ccf8
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
29 行增加
和
13 行删除
+29
-13
mod_lcr.c
src/mod/applications/mod_lcr/mod_lcr.c
+12
-7
mod_spandsp.h
src/mod/applications/mod_spandsp/mod_spandsp.h
+2
-2
mod_spandsp_fax.c
src/mod/applications/mod_spandsp/mod_spandsp_fax.c
+11
-2
switch_core_codec.c
src/switch_core_codec.c
+3
-1
switch_nat.c
src/switch_nat.c
+1
-1
没有找到文件。
src/mod/applications/mod_lcr/mod_lcr.c
浏览文件 @
33349010
...
...
@@ -133,7 +133,7 @@ struct callback_obj {
profile_t
*
profile
;
switch_core_session_t
*
session
;
switch_event_t
*
event
;
float
sell
_rate
;
float
max
_rate
;
};
typedef
struct
callback_obj
callback_t
;
...
...
@@ -622,6 +622,9 @@ static int route_add_callback(void *pArg, int argc, char **argv, char **columnNa
}
else
if
(
CF
(
"lcr_carrier_name"
))
{
additional
->
carrier_name
=
switch_core_strdup
(
pool
,
switch_str_nil
(
argv
[
i
]));
}
else
if
(
CF
(
"lcr_rate_field"
))
{
if
(
!
argv
[
i
]
||
zstr
(
argv
[
i
]))
{
goto
end
;
}
additional
->
rate
=
(
float
)
atof
(
switch_str_nil
(
argv
[
i
]));
additional
->
rate_str
=
switch_core_sprintf
(
pool
,
"%0.5f"
,
additional
->
rate
);
}
else
if
(
CF
(
"lcr_gw_prefix"
))
{
...
...
@@ -669,10 +672,12 @@ static int route_add_callback(void *pArg, int argc, char **argv, char **columnNa
for
(
current
=
cbt
->
head
;
current
;
current
=
current
->
next
)
{
if
(
cbt
->
sell_rate
&&
cbt
->
sell_rate
>
current
->
rate
)
{
continue
;
if
(
cbt
->
max_rate
&&
(
cbt
->
max_rate
<
additional
->
rate
))
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_INFO
,
"Skipping [%s] because [%f] is higher than the max_rate of [%f]
\n
"
,
additional
->
carrier_name
,
additional
->
rate
,
cbt
->
max_rate
);
break
;
}
key
=
switch_core_sprintf
(
pool
,
"%s:%s"
,
additional
->
gw_prefix
,
additional
->
gw_suffix
);
if
(
switch_core_hash_find
(
cbt
->
dedup_hash
,
key
))
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
...
...
@@ -852,9 +857,9 @@ static switch_status_t lcr_do_lookup(callback_t *cb_struct)
if
(
cb_struct
->
session
)
{
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
cb_struct
->
session
),
SWITCH_LOG_DEBUG
,
"we have a session
\n
"
);
if
((
channel
=
switch_core_session_get_channel
(
cb_struct
->
session
)))
{
const
char
*
sell_rate
=
switch_channel_get_variable
(
channel
,
"sell
_rate"
);
if
(
!
zstr
(
sell
_rate
))
{
cb_struct
->
sell_rate
=
atof
(
sell
_rate
);
const
char
*
max_rate
=
switch_channel_get_variable
(
channel
,
"max
_rate"
);
if
(
!
zstr
(
max
_rate
))
{
cb_struct
->
max_rate
=
atof
(
max
_rate
);
}
switch_channel_set_variable_var_check
(
channel
,
"lcr_rate_field"
,
rate_field
,
SWITCH_FALSE
);
switch_channel_set_variable_var_check
(
channel
,
"lcr_user_rate_field"
,
user_rate_field
,
SWITCH_FALSE
);
...
...
src/mod/applications/mod_spandsp/mod_spandsp.h
浏览文件 @
33349010
...
...
@@ -69,8 +69,8 @@ switch_status_t spandsp_inband_dtmf_session(switch_core_session_t *session);
switch_status_t
callprogress_detector_start
(
switch_core_session_t
*
session
,
const
char
*
name
);
switch_status_t
callprogress_detector_stop
(
switch_core_session_t
*
session
);
SWITCH_DECLARE
(
switch_status_t
)
spandsp_fax_detect_session
(
switch_core_session_t
*
session
,
switch_status_t
spandsp_fax_detect_session
(
switch_core_session_t
*
session
,
const
char
*
flags
,
time_t
timeout
,
int
hits
,
const
char
*
app
,
const
char
*
data
,
switch_tone_detect_callback_t
callback
);
SWITCH_DECLARE
(
switch_status_t
)
spandsp_fax_stop_detect_session
(
switch_core_session_t
*
session
);
switch_status_t
spandsp_fax_stop_detect_session
(
switch_core_session_t
*
session
);
src/mod/applications/mod_spandsp/mod_spandsp_fax.c
浏览文件 @
33349010
...
...
@@ -459,6 +459,15 @@ static int t38_tx_packet_handler(t38_core_state_t *s, void *user_data, const uin
}
else
{
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
session
),
SWITCH_LOG_ERROR
,
"INVALID PACKETLEN: %d PASSED: %d:%d
\n
"
,
r
,
len
,
count
);
}
if
(
r
<
0
)
{
t30_state_t
*
t30
;
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
session
),
SWITCH_LOG_ERROR
,
"TERMINATING T30 STATE
\n
"
);
if
(
pvt
->
t38_state
&&
(
t30
=
t38_terminal_get_t30_state
(
pvt
->
t38_state
)))
{
t30_terminate
(
t30
);
}
}
return
r
;
}
...
...
@@ -1953,7 +1962,7 @@ static switch_bool_t tone_detect_callback(switch_media_bug_t *bug, void *user_da
return
rval
;
}
SWITCH_DECLARE
(
switch_status_t
)
spandsp_fax_stop_detect_session
(
switch_core_session_t
*
session
)
switch_status_t
spandsp_fax_stop_detect_session
(
switch_core_session_t
*
session
)
{
switch_channel_t
*
channel
=
switch_core_session_get_channel
(
session
);
spandsp_fax_tone_container_t
*
cont
=
switch_channel_get_private
(
channel
,
"_fax_tone_detect_"
);
...
...
@@ -1967,7 +1976,7 @@ SWITCH_DECLARE(switch_status_t) spandsp_fax_stop_detect_session(switch_core_sess
return
SWITCH_STATUS_FALSE
;
}
SWITCH_DECLARE
(
switch_status_t
)
spandsp_fax_detect_session
(
switch_core_session_t
*
session
,
switch_status_t
spandsp_fax_detect_session
(
switch_core_session_t
*
session
,
const
char
*
flags
,
time_t
timeout
,
int
hits
,
const
char
*
app
,
const
char
*
data
,
switch_tone_detect_callback_t
callback
)
{
...
...
src/switch_core_codec.c
浏览文件 @
33349010
...
...
@@ -658,7 +658,9 @@ SWITCH_DECLARE(switch_status_t) switch_core_codec_decode(switch_codec_t *codec,
if
(
frames
&&
codec
->
implementation
->
decoded_bytes_per_packet
*
frames
>
*
decoded_data_len
)
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_CRIT
,
"Buffer size sanity check failed!
\n
"
);
return
SWITCH_STATUS_GENERR
;
*
decoded_data_len
=
codec
->
implementation
->
decoded_bytes_per_packet
;
memset
(
decoded_data
,
255
,
*
decoded_data_len
);
return
SWITCH_STATUS_SUCCESS
;
}
}
...
...
src/switch_nat.c
浏览文件 @
33349010
...
...
@@ -586,7 +586,7 @@ SWITCH_DECLARE(switch_status_t) switch_nat_add_mapping_internal(switch_port_t po
switch_event_t
*
event
=
NULL
;
if
(
!
nat_globals
.
mapping
)
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_
WARNING
,
"NAT port mapping disabled
\n
"
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_
INFO
,
"NAT port mapping disabled
\n
"
);
return
status
;
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论