Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
529e7fd2
提交
529e7fd2
authored
5月 31, 2012
作者:
kapil
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
adding code to make "version" as configurable parameter
上级
a7ac2725
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
30 行增加
和
3 行删除
+30
-3
megaco.conf.xml
src/mod/endpoints/mod_megaco/conf/megaco.conf.xml
+3
-2
megaco_stack.c
src/mod/endpoints/mod_megaco/megaco_stack.c
+15
-1
megaco_stack.h
src/mod/endpoints/mod_megaco/megaco_stack.h
+1
-0
megaco_xml.c
src/mod/endpoints/mod_megaco/megaco_xml.c
+11
-0
没有找到文件。
src/mod/endpoints/mod_megaco/conf/megaco.conf.xml
浏览文件 @
529e7fd2
...
@@ -5,8 +5,9 @@
...
@@ -5,8 +5,9 @@
<sng_mg_interface
name=
"default"
>
<sng_mg_interface
name=
"default"
>
<param
name=
"id"
value=
"1"
/>
<!-- /* equivalent to SSAP ID of MEGACO layer */-->
<param
name=
"id"
value=
"1"
/>
<!-- /* equivalent to SSAP ID of MEGACO layer */-->
<param
name=
"protocol"
value=
"MEGACO"
/>
<!-- /* Protocol Type , Supported values are MEGACO/MGCP */ -->
<param
name=
"protocol"
value=
"MEGACO"
/>
<!-- /* Protocol Type , Supported values are MEGACO/MGCP */ -->
<param
name=
"version"
value=
"3"
/>
<!-- /* Protocol Version , Supported values for MEGACO are 1/2/3 */ -->
<param
name=
"transportProfileId"
value=
"1"
/>
<!-- /* Link to transport layer configuration -->
<param
name=
"transportProfileId"
value=
"1"
/>
<!-- /* Link to transport layer configuration -->
<param
name=
"localIp"
value=
"192.168.1.10
0
"
/>
<!-- /* Local node IP */ -->
<param
name=
"localIp"
value=
"192.168.1.10
1
"
/>
<!-- /* Local node IP */ -->
<param
name=
"port"
value=
"2944"
/>
<!-- /* Port */ -->
<param
name=
"port"
value=
"2944"
/>
<!-- /* Port */ -->
<param
name=
"myDomainName"
value=
"mg.sangoma.com"
/>
<!--/* Local domain name */ -->
<param
name=
"myDomainName"
value=
"mg.sangoma.com"
/>
<!--/* Local domain name */ -->
<param
name=
"mid"
value=
"<lab.sangoma.com>"
/>
<!-- /* Message Identifier (MID) of MEGACO message */ -->
<param
name=
"mid"
value=
"<lab.sangoma.com>"
/>
<!-- /* Message Identifier (MID) of MEGACO message */ -->
...
@@ -35,7 +36,7 @@
...
@@ -35,7 +36,7 @@
<sng_mg_peer_interface
name=
"MG_PEER1"
>
<sng_mg_peer_interface
name=
"MG_PEER1"
>
<param
name=
"id"
value=
"1"
/>
<!-- /* Peer profile ID */-->
<param
name=
"id"
value=
"1"
/>
<!-- /* Peer profile ID */-->
<param
name=
"ip"
value=
"192.168.1.10
1
"
/>
<!-- /* Peer node IP */ -->
<param
name=
"ip"
value=
"192.168.1.10
0
"
/>
<!-- /* Peer node IP */ -->
<param
name=
"port"
value=
"2944"
/>
<!--/* peer port */ -->
<param
name=
"port"
value=
"2944"
/>
<!--/* peer port */ -->
<param
name=
"encodingScheme"
value=
"TEXT"
/>
<!--/* H.248 Encoding scheme TEXT/BINARY */ -->
<param
name=
"encodingScheme"
value=
"TEXT"
/>
<!--/* H.248 Encoding scheme TEXT/BINARY */ -->
<param
name=
"mid"
value=
"<remote.mgc.com>"
/>
<!-- /* Message Identifier (MID) of remote MGC MEGACO message */-->
<param
name=
"mid"
value=
"<remote.mgc.com>"
/>
<!-- /* Message Identifier (MID) of remote MGC MEGACO message */-->
...
...
src/mod/endpoints/mod_megaco/megaco_stack.c
浏览文件 @
529e7fd2
...
@@ -917,7 +917,21 @@ int mgco_mg_ssap_config(int idx)
...
@@ -917,7 +917,21 @@ int mgco_mg_ssap_config(int idx)
pCfg
->
mwdTimer
=
(
U16
)
10
;
pCfg
->
mwdTimer
=
(
U16
)
10
;
pCfg
->
minMgcoVersion
=
LMG_VER_PROF_MGCO_H248_1_0
;
pCfg
->
minMgcoVersion
=
LMG_VER_PROF_MGCO_H248_1_0
;
pCfg
->
maxMgcoVersion
=
LMG_VER_PROF_MGCO_H248_3_0
;
switch
(
mgCfg
->
protocol_version
)
{
case
1
:
pCfg
->
maxMgcoVersion
=
LMG_VER_PROF_MGCO_H248_1_0
;
break
;
case
2
:
pCfg
->
maxMgcoVersion
=
LMG_VER_PROF_MGCO_H248_2_0
;
break
;
case
3
:
pCfg
->
maxMgcoVersion
=
LMG_VER_PROF_MGCO_H248_3_0
;
break
;
default:
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"Invalid Protocol version[%d]
\n
"
,
mgCfg
->
protocol_version
);
return
SWITCH_STATUS_FALSE
;
}
pCfg
->
userInfo
.
pres
.
pres
=
PRSNT_NODEF
;
pCfg
->
userInfo
.
pres
.
pres
=
PRSNT_NODEF
;
pCfg
->
userInfo
.
id
.
pres
=
NOTPRSNT
;
pCfg
->
userInfo
.
id
.
pres
=
NOTPRSNT
;
...
...
src/mod/endpoints/mod_megaco/megaco_stack.h
浏览文件 @
529e7fd2
...
@@ -76,6 +76,7 @@ typedef struct sng_mg_cfg{
...
@@ -76,6 +76,7 @@ typedef struct sng_mg_cfg{
uint8_t
my_domain
[
MAX_DOMAIN_LEN
];
/* local domain name */
uint8_t
my_domain
[
MAX_DOMAIN_LEN
];
/* local domain name */
uint8_t
my_ipaddr
[
MAX_DOMAIN_LEN
];
/* local domain name */
uint8_t
my_ipaddr
[
MAX_DOMAIN_LEN
];
/* local domain name */
uint32_t
port
;
/* port */
uint32_t
port
;
/* port */
uint16_t
protocol_version
;
/* Protocol supported version */
uint16_t
peer_id
;
/* MGC Peer ID */
uint16_t
peer_id
;
/* MGC Peer ID */
uint16_t
transport_prof_id
;
/* Transport profile id ..this also will be the spId for MG SAP*/
uint16_t
transport_prof_id
;
/* Transport profile id ..this also will be the spId for MG SAP*/
uint16_t
protocol_type
;
/* MEGACO/MGCP */
uint16_t
protocol_type
;
/* MEGACO/MGCP */
...
...
src/mod/endpoints/mod_megaco/megaco_xml.c
浏览文件 @
529e7fd2
...
@@ -46,6 +46,17 @@ switch_status_t sng_parse_mg_profile(switch_xml_t mg_interface)
...
@@ -46,6 +46,17 @@ switch_status_t sng_parse_mg_profile(switch_xml_t mg_interface)
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_INFO
,
" mg_interface protocol[%d]
\n
"
,
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_INFO
,
" mg_interface protocol[%d]
\n
"
,
megaco_globals
.
g_mg_cfg
.
mgCfg
[
i
].
protocol_type
);
megaco_globals
.
g_mg_cfg
.
mgCfg
[
i
].
protocol_type
);
/********************************************************************************************/
/********************************************************************************************/
}
else
if
(
!
strcasecmp
(
var
,
"version"
)){
/********************************************************************************************/
megaco_globals
.
g_mg_cfg
.
mgCfg
[
i
].
protocol_version
=
atoi
(
val
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_INFO
,
" mg_interface protocol version[%s]
\n
"
,
val
);
if
((
megaco_globals
.
g_mg_cfg
.
mgCfg
[
i
].
protocol_version
<
1
)
||
(
megaco_globals
.
g_mg_cfg
.
mgCfg
[
i
].
protocol_version
>
3
))
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"Invalid Protocol version[%s] , Supported values are [1/2/3]
\n
"
,
val
);
return
SWITCH_STATUS_FALSE
;
}
/********************************************************************************************/
}
else
if
(
!
strcasecmp
(
var
,
"transportProfileId"
)){
}
else
if
(
!
strcasecmp
(
var
,
"transportProfileId"
)){
/********************************************************************************************/
/********************************************************************************************/
megaco_globals
.
g_mg_cfg
.
mgCfg
[
i
].
transport_prof_id
=
atoi
(
val
);
megaco_globals
.
g_mg_cfg
.
mgCfg
[
i
].
transport_prof_id
=
atoi
(
val
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论