Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
540c2a91
提交
540c2a91
authored
8月 10, 2012
作者:
Mathieu Rene
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
t38
上级
2dd7ab10
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
13 行增加
和
5 行删除
+13
-5
media_gateway.c
src/mod/endpoints/mod_media_gateway/media_gateway.c
+9
-0
rtp.c
src/mod/endpoints/mod_sofia/rtp.c
+4
-5
没有找到文件。
src/mod/endpoints/mod_media_gateway/media_gateway.c
浏览文件 @
540c2a91
...
@@ -147,6 +147,10 @@ switch_status_t megaco_activate_termination(mg_termination_t *term)
...
@@ -147,6 +147,10 @@ switch_status_t megaco_activate_termination(mg_termination_t *term)
switch_core_session_receive_event
(
session
,
&
var_event
);
switch_core_session_receive_event
(
session
,
&
var_event
);
if
(
term
->
u
.
rtp
.
t38_options
)
{
switch_channel_set_private
(
channel
,
"t38_options"
,
term
->
u
.
rtp
.
t38_options
);
}
switch_core_session_rwunlock
(
session
);
switch_core_session_rwunlock
(
session
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"Sent refresh to channel [%s], for termination [%s]
\n
"
,
term
->
uuid
,
term
->
name
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"Sent refresh to channel [%s], for termination [%s]
\n
"
,
term
->
uuid
,
term
->
name
);
...
@@ -170,6 +174,11 @@ switch_status_t megaco_activate_termination(mg_termination_t *term)
...
@@ -170,6 +174,11 @@ switch_status_t megaco_activate_termination(mg_termination_t *term)
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_INFO
,
"Termination [%s] successfully instanciated as [%s] [%s]
\n
"
,
term
->
name
,
dialstring
,
switch_core_session_get_uuid
(
session
));
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_INFO
,
"Termination [%s] successfully instanciated as [%s] [%s]
\n
"
,
term
->
name
,
dialstring
,
switch_core_session_get_uuid
(
session
));
channel
=
switch_core_session_get_channel
(
session
);
channel
=
switch_core_session_get_channel
(
session
);
switch_channel_set_private
(
channel
,
PVT_MG_TERM
,
term
);
switch_channel_set_private
(
channel
,
PVT_MG_TERM
,
term
);
if
(
term
->
u
.
rtp
.
t38_options
)
{
switch_channel_set_private
(
channel
,
"t38_options"
,
term
->
u
.
rtp
.
t38_options
);
}
switch_core_event_hook_add_recv_dtmf
(
session
,
mg_on_dtmf
);
switch_core_event_hook_add_recv_dtmf
(
session
,
mg_on_dtmf
);
if
(
term
->
type
==
MG_TERM_TDM
)
{
if
(
term
->
type
==
MG_TERM_TDM
)
{
...
...
src/mod/endpoints/mod_sofia/rtp.c
浏览文件 @
540c2a91
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
#define kPTIME "ptime"
#define kPTIME "ptime"
#define kPT "pt"
#define kPT "pt"
#define kRFC2833PT "rfc2833_pt"
#define kRFC2833PT "rfc2833_pt"
#define kM
ODE "mod
e"
#define kM
EDIATYPE "media_typ
e"
#define kRATE "rate"
#define kRATE "rate"
static
struct
{
static
struct
{
...
@@ -524,9 +524,8 @@ static switch_status_t channel_receive_event(switch_core_session_t *session, swi
...
@@ -524,9 +524,8 @@ static switch_status_t channel_receive_event(switch_core_session_t *session, swi
switch_rtp_set_telephony_event
(
tech_pvt
->
rtp_session
,
pt
);
switch_rtp_set_telephony_event
(
tech_pvt
->
rtp_session
,
pt
);
}
}
if
(
compare_var
(
event
,
channel
,
kMODE
))
{
if
(
compare_var
(
event
,
channel
,
kMEDIATYPE
))
{
const
char
*
newmode
=
switch_channel_get_variable
(
channel
,
kMODE
);
const
char
*
newmode
=
switch_channel_get_variable
(
channel
,
kMEDIATYPE
);
const
char
*
mode
=
switch_channel_get_variable
(
channel
,
kMODE
);
if
(
!
strcmp
(
newmode
,
"image"
))
{
if
(
!
strcmp
(
newmode
,
"image"
))
{
switch_channel_set_variable
(
tech_pvt
->
channel
,
"has_t38"
,
"true"
);
switch_channel_set_variable
(
tech_pvt
->
channel
,
"has_t38"
,
"true"
);
...
@@ -535,7 +534,7 @@ static switch_status_t channel_receive_event(switch_core_session_t *session, swi
...
@@ -535,7 +534,7 @@ static switch_status_t channel_receive_event(switch_core_session_t *session, swi
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_INFO
,
"Got IMAGE description
\n
"
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_INFO
,
"Got IMAGE description
\n
"
);
}
}
switch_channel_set_variable
(
channel
,
kM
OD
E
,
newmode
);
switch_channel_set_variable
(
channel
,
kM
EDIATYP
E
,
newmode
);
}
}
}
else
{
}
else
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论