Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
d04606fb
提交
d04606fb
authored
8月 08, 2012
作者:
Kapil Gupta
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
updating rfc2833 variable code
上级
e5d140d1
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
39 行增加
和
19 行删除
+39
-19
media_gateway.c
src/mod/endpoints/mod_media_gateway/media_gateway.c
+2
-2
media_gateway_utils.c
src/mod/endpoints/mod_media_gateway/media_gateway_utils.c
+37
-17
没有找到文件。
src/mod/endpoints/mod_media_gateway/media_gateway.c
浏览文件 @
d04606fb
...
...
@@ -85,7 +85,7 @@ static switch_status_t mg_on_dtmf(switch_core_session_t *session, const switch_d
{
switch_channel_t
*
channel
=
switch_core_session_get_channel
(
session
);
mg_termination_t
*
term
=
switch_channel_get_private
(
channel
,
"_mg_term_"
);
char
digit
[
2
]
=
{
dtmf
->
digit
};
//
char digit[2] = { dtmf->digit };
if
(
!
term
)
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"Cannot find termination structure for session [%s]
\n
"
,
switch_core_session_get_uuid
(
session
));
...
...
@@ -94,7 +94,7 @@ static switch_status_t mg_on_dtmf(switch_core_session_t *session, const switch_d
//switch_status_t mg_send_dtmf_notify(megaco_profile_t* mg_profile, const char* term_name, char* digits, int num_of_collected_digits);
//mg_send_dtmf_notify(term->profile, term->name, digit, 1);
switch_log_printf
(
"NOT Sending notify to MGC for dtmf: %c
\n
"
,
dtmf
->
digit
);
//switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "MEGACO DTMF Signaling NOT Sending notify to MGC for dtmf:%c\n",
dtmf->digit);
return
SWITCH_STATUS_SUCCESS
;
}
...
...
src/mod/endpoints/mod_media_gateway/media_gateway_utils.c
浏览文件 @
d04606fb
...
...
@@ -528,7 +528,7 @@ void mgco_handle_sdp_attr_set(CmSdpAttrSet *s, mg_termination_t* term)
CmSdpAttrFmtp
*
f
=
&
a
->
u
.
fmtp
;
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"
\t
CM_SDP_ATTR_FMTP:
\n
"
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"
\t
Format Type = %d
\n
"
,(
NOTPRSNT
=
=
f
->
type
.
pres
)
?
f
->
type
.
val
:-
1
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"
\t
Format Type = %d
\n
"
,(
NOTPRSNT
!
=
f
->
type
.
pres
)
?
f
->
type
.
val
:-
1
);
break
;
}
...
...
@@ -540,30 +540,47 @@ void mgco_handle_sdp_attr_set(CmSdpAttrSet *s, mg_termination_t* term)
if
(
NOTPRSNT
!=
r
->
pres
.
pres
){
/* payload type */
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"
\t
Payload Type = %d
\n
"
,
(
NOTPRSNT
!=
r
->
pay
.
type
.
pres
)
?
r
->
pay
.
type
.
val
:-
1
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"
\t
Payload Type = %d
\n
"
,
(
NOTPRSNT
!=
r
->
pay
.
type
.
pres
)
?
r
->
pay
.
type
.
val
:-
1
);
/* payload value */
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"
\t
Payload Value = %d
\n
"
,
(
NOTPRSNT
!=
r
->
pay
.
val
.
pres
)
?
r
->
pay
.
val
.
val
:-
1
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"
\t
Payload Value = %d
\n
"
,
(
NOTPRSNT
!=
r
->
pay
.
val
.
pres
)
?
r
->
pay
.
val
.
val
:-
1
);
/* encoding name */
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"
\t
Encoding Name value = %d
\n
"
,
(
NOTPRSNT
!=
r
->
enc
.
val
.
pres
)
?
r
->
enc
.
val
.
val
:-
1
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"
\t
Encoding Name name = %s
\n
"
,
(
NOTPRSNT
!=
r
->
enc
.
name
.
pres
)
?
(
char
*
)
r
->
enc
.
name
.
val
:
"Not Present"
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"
\t
Encoding Name value = %d
\n
"
,
(
NOTPRSNT
!=
r
->
enc
.
val
.
pres
)
?
r
->
enc
.
val
.
val
:-
1
);
if
((
NOTPRSNT
!=
r
->
enc
.
val
.
pres
)
&&
(
CM_SDP_ENC_TELEPHONE_EVENT
==
r
->
enc
.
val
.
val
)){
term
->
u
.
rtp
.
rfc2833_pt
=
r
->
pay
.
val
.
val
;
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
" Updating rfc2833_pt to [%d]
\n
"
,
term
->
u
.
rtp
.
rfc2833_pt
);
}
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"
\t
Encoding Name name = %s
\n
"
,
(
NOTPRSNT
!=
r
->
enc
.
name
.
pres
)
?
(
char
*
)
r
->
enc
.
name
.
val
:
"Not Present"
);
#ifdef BIT_64
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"
\t
Clock Rate = %d
\n
"
,
(
NOTPRSNT
!=
r
->
clk
.
pres
)
?
r
->
clk
.
val
:-
1
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"
\t
Clock Rate = %d
\n
"
,
(
NOTPRSNT
!=
r
->
clk
.
pres
)
?
r
->
clk
.
val
:-
1
);
#else
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"
\t
Clock Rate = %ld
\n
"
,
(
NOTPRSNT
!=
r
->
clk
.
pres
)
?
r
->
clk
.
val
:-
1
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"
\t
Clock Rate = %ld
\n
"
,
(
NOTPRSNT
!=
r
->
clk
.
pres
)
?
r
->
clk
.
val
:-
1
);
#endif
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"
\t
Encoding Parameters = %s
\n
"
,
(
NOTPRSNT
!=
r
->
parms
.
pres
)
?
(
char
*
)
r
->
parms
.
val
:
"Not Present"
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"
\t
Encoding Parameters = %s
\n
"
,
(
NOTPRSNT
!=
r
->
parms
.
pres
)
?
(
char
*
)
r
->
parms
.
val
:
"Not Present"
);
}
break
;
}
...
...
@@ -1832,8 +1849,11 @@ switch_status_t mg_rem_unsupported_codecs (megaco_profile_t* mg_profile, mg_term
/* see if received codec is present in our codec supported list */
for
(
id
=
0
;
codecs
[
id
]
&&
id
<
codec_count
;
id
++
)
{
int
pt
=
codecs
[
id
]
->
ianacode
;
switch_log_printf
(
SWITCH_CHANNEL_LOG_CLEAN
,
SWITCH_LOG_INFO
,
"Matching recv codec[%d] with supported codec[%d]
\n
"
,
fmt
->
val
.
val
,
pt
);
switch_log_printf
(
SWITCH_CHANNEL_LOG_CLEAN
,
SWITCH_LOG_INFO
,
"Matching recv codec[%d] with supported codec[%d]
\n
"
,
fmt
->
val
.
val
,
pt
);
//const char *name = codecs[id]->iananame;
/* anything > 96 is dymanic we should skip codec match */
if
(
fmt
->
val
.
val
>=
96
)
{
foundCodec
=
0x01
;
break
;}
if
(
pt
==
fmt
->
val
.
val
){
foundCodec
=
0x01
;
break
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论