Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
e6788964
提交
e6788964
authored
3月 07, 2007
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
sigh
git-svn-id:
http://svn.freeswitch.org/svn/freeswitch/trunk@4467
d0543943-73ff-0310-b7d9-9358b9ac24b2
上级
64e07112
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
21 行增加
和
14 行删除
+21
-14
mod_g729.c
src/mod/codecs/mod_g729/mod_g729.c
+4
-4
mod_sofia.c
src/mod/endpoints/mod_sofia/mod_sofia.c
+13
-10
switch_rtp.c
src/switch_rtp.c
+4
-0
没有找到文件。
src/mod/codecs/mod_g729/mod_g729.c
浏览文件 @
e6788964
...
...
@@ -214,10 +214,10 @@ static switch_status_t switch_g729_decode(switch_codec_t *codec,
}
}
}
//
else {
//
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "yo this frame is an odd size [%d]\n", encoded_data_len);
//
return SWITCH_STATUS_FALSE;
//
}
}
else
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"yo this frame is an odd size [%d]
\n
"
,
encoded_data_len
);
return
SWITCH_STATUS_FALSE
;
}
return
SWITCH_STATUS_SUCCESS
;
#endif
}
...
...
src/mod/endpoints/mod_sofia/mod_sofia.c
浏览文件 @
e6788964
...
...
@@ -750,10 +750,6 @@ static void set_local_sdp(private_object_t *tech_pvt, char *ip, uint32_t port, c
snprintf
(
buf
+
strlen
(
buf
),
sizeof
(
buf
)
-
strlen
(
buf
),
" %d"
,
tech_pvt
->
te
);
}
if
(
tech_pvt
->
read_codec
.
implementation
->
samples_per_second
==
8000
)
{
tech_pvt
->
cng_pt
=
SWITCH_RTP_CNG_PAYLOAD
;
}
if
(
tech_pvt
->
cng_pt
)
{
snprintf
(
buf
+
strlen
(
buf
),
sizeof
(
buf
)
-
strlen
(
buf
),
" %d"
,
tech_pvt
->
cng_pt
);
}
...
...
@@ -880,13 +876,13 @@ static void attach_private(switch_core_session_t *session,
tech_pvt
->
profile
=
profile
;
if
(
tech_pvt
->
bte
)
{
tech_pvt
->
te
=
tech_pvt
->
bte
;
}
else
{
}
else
if
(
!
tech_pvt
->
te
)
{
tech_pvt
->
te
=
profile
->
te
;
}
if
(
tech_pvt
->
bcng_pt
)
{
tech_pvt
->
cng_pt
=
tech_pvt
->
bcng_pt
;
}
else
{
}
else
if
(
!
tech_pvt
->
cng_pt
)
{
tech_pvt
->
cng_pt
=
profile
->
cng_pt
;
}
...
...
@@ -1629,6 +1625,7 @@ static switch_status_t activate_rtp(private_object_t *tech_pvt)
switch_rtp_set_telephony_event
(
tech_pvt
->
rtp_session
,
tech_pvt
->
te
);
if
(
tech_pvt
->
cng_pt
)
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"WTF %d"
,
tech_pvt
->
cng_pt
);
switch_rtp_set_cng_pt
(
tech_pvt
->
rtp_session
,
tech_pvt
->
cng_pt
);
}
...
...
@@ -1829,7 +1826,7 @@ static switch_status_t sofia_read_frame(switch_core_session_t *session, switch_f
if
(
tech_pvt
->
read_frame
.
datalen
>
0
)
{
size_t
bytes
=
0
;
int
frames
=
1
;
//tech_pvt->last_read = switch_time_now();
if
(
!
switch_test_flag
((
&
tech_pvt
->
read_frame
),
SFF_CNG
))
{
if
((
bytes
=
tech_pvt
->
read_codec
.
implementation
->
encoded_bytes_per_frame
))
{
frames
=
(
tech_pvt
->
read_frame
.
datalen
/
bytes
);
...
...
@@ -2390,7 +2387,7 @@ static switch_call_cause_t sofia_outgoing_channel(switch_core_session_t *session
static
uint8_t
negotiate_sdp
(
switch_core_session_t
*
session
,
sdp_session_t
*
sdp
)
{
uint8_t
match
=
0
;
switch_payload_t
te
=
0
;
switch_payload_t
te
=
0
,
cng_pt
=
0
;
private_object_t
*
tech_pvt
;
sdp_media_t
*
m
;
sdp_attribute_t
*
a
;
...
...
@@ -2449,10 +2446,16 @@ static uint8_t negotiate_sdp(switch_core_session_t *session, sdp_session_t *sdp)
if
(
!
te
&&
!
strcasecmp
(
map
->
rm_encoding
,
"telephone-event"
))
{
te
=
tech_pvt
->
te
=
(
switch_payload_t
)
map
->
rm_pt
;
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"Set 2833 dtmf payload to %u
\n
"
,
te
);
}
if
(
!
cng_pt
&&
!
strcasecmp
(
map
->
rm_encoding
,
"CN"
))
{
cng_pt
=
tech_pvt
->
cng_pt
=
(
switch_payload_t
)
map
->
rm_pt
;
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"Set comfort noise payload to %u
\n
"
,
cng_pt
);
}
if
(
match
)
{
if
(
te
)
{
if
(
te
&&
cng_pt
)
{
break
;
}
continue
;
...
...
@@ -5305,7 +5308,7 @@ static switch_status_t config_sofia(int reload)
}
if
(
!
profile
->
cng_pt
)
{
profile
->
cng_pt
=
127
;
profile
->
cng_pt
=
SWITCH_RTP_CNG_PAYLOAD
;
}
if
(
!
profile
->
sipip
)
{
...
...
src/switch_rtp.c
浏览文件 @
e6788964
...
...
@@ -779,6 +779,10 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
switch_core_timer_step
(
&
rtp_session
->
timer
);
}
if
(
rtp_session
->
recv_msg
.
header
.
pt
==
rtp_session
->
cng_pt
)
{
*
flags
|=
SFF_CNG
;
}
if
(
!
bytes
&&
switch_test_flag
(
rtp_session
,
SWITCH_RTP_FLAG_BREAK
))
{
switch_clear_flag_locked
(
rtp_session
,
SWITCH_RTP_FLAG_BREAK
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论