Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
63c53a85
提交
63c53a85
authored
7月 23, 2012
作者:
Kapil
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fixing issues found during seagull testing and add single common descriptors api
上级
0bb82599
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
432 行增加
和
328 行删除
+432
-328
media_gateway.c
src/mod/endpoints/mod_media_gateway/media_gateway.c
+1
-0
media_gateway_cmd_handler.c
...d/endpoints/mod_media_gateway/media_gateway_cmd_handler.c
+410
-322
media_gateway_stack.h
src/mod/endpoints/mod_media_gateway/media_gateway_stack.h
+9
-0
mod_media_gateway.c
src/mod/endpoints/mod_media_gateway/mod_media_gateway.c
+10
-5
mod_media_gateway.h
src/mod/endpoints/mod_media_gateway/mod_media_gateway.h
+2
-1
没有找到文件。
src/mod/endpoints/mod_media_gateway/media_gateway.c
浏览文件 @
63c53a85
...
@@ -166,6 +166,7 @@ mg_termination_t *megaco_choose_termination(megaco_profile_t *profile, const cha
...
@@ -166,6 +166,7 @@ mg_termination_t *megaco_choose_termination(megaco_profile_t *profile, const cha
term
=
switch_core_alloc
(
pool
,
sizeof
*
term
);
term
=
switch_core_alloc
(
pool
,
sizeof
*
term
);
term
->
pool
=
pool
;
term
->
pool
=
pool
;
term
->
type
=
termtype
;
term
->
type
=
termtype
;
term
->
active_events
=
NULL
;
if
(
termtype
==
MG_TERM_RTP
)
{
if
(
termtype
==
MG_TERM_RTP
)
{
/* Fill in local address and reserve an rtp port */
/* Fill in local address and reserve an rtp port */
...
...
src/mod/endpoints/mod_media_gateway/media_gateway_cmd_handler.c
浏览文件 @
63c53a85
差异被折叠。
点击展开。
src/mod/endpoints/mod_media_gateway/media_gateway_stack.h
浏览文件 @
63c53a85
...
@@ -112,6 +112,15 @@ typedef enum {
...
@@ -112,6 +112,15 @@ typedef enum {
cmMemcpy((U8 *)(_tkn)->val, (CONSTANT U8 *)(_val), (_len)); \
cmMemcpy((U8 *)(_tkn)->val, (CONSTANT U8 *)(_val), (_len)); \
}
}
#define MG_SET_TKNSTROSXL(_tkn, _len, _val, _mem)\
{\
(_tkn).pres = PRSNT_NODEF;\
(_tkn).len = (_len);\
cmGetMem((Ptr)_mem, (Size)((_len)*sizeof(U8)), (Ptr*)&((_tkn).val));\
cmMemcpy((U8*)((_tkn).val), (U8*)(_val), _len);\
}
switch_status_t
mg_prc_descriptors
(
megaco_profile_t
*
mg_profile
,
MgMgcoCommand
*
inc_cmd
,
mg_termination_t
*
term
);
void
handle_sng_log
(
uint8_t
level
,
char
*
fmt
,
...);
void
handle_sng_log
(
uint8_t
level
,
char
*
fmt
,
...);
void
handle_mgco_sta_ind
(
Pst
*
pst
,
SuId
suId
,
MgMgtSta
*
msg
);
void
handle_mgco_sta_ind
(
Pst
*
pst
,
SuId
suId
,
MgMgtSta
*
msg
);
void
handle_mgco_txn_sta_ind
(
Pst
*
pst
,
SuId
suId
,
MgMgcoInd
*
msg
);
void
handle_mgco_txn_sta_ind
(
Pst
*
pst
,
SuId
suId
,
MgMgcoInd
*
msg
);
...
...
src/mod/endpoints/mod_media_gateway/mod_media_gateway.c
浏览文件 @
63c53a85
...
@@ -438,6 +438,9 @@ void handle_mgco_cmd_ind(Pst *pst, SuId suId, MgMgcoCommand* cmd)
...
@@ -438,6 +438,9 @@ void handle_mgco_cmd_ind(Pst *pst, SuId suId, MgMgcoCommand* cmd)
memset
(
&
out_ctxt
,
0
,
sizeof
(
out_ctxt
));
memset
(
&
out_ctxt
,
0
,
sizeof
(
out_ctxt
));
inc_context
=
&
cmd
->
contextId
;
memcpy
(
&
out_ctxt
,
inc_context
,
sizeof
(
MgMgcoContextId
));
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_CONSOLE
,
"%s: Received Command Type[%s]
\n
"
,
__PRETTY_FUNCTION__
,
PRNT_MG_CMD_TYPE
(
cmd
->
cmdType
.
val
));
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_CONSOLE
,
"%s: Received Command Type[%s]
\n
"
,
__PRETTY_FUNCTION__
,
PRNT_MG_CMD_TYPE
(
cmd
->
cmdType
.
val
));
/* validate Transaction Id */
/* validate Transaction Id */
...
@@ -506,7 +509,6 @@ void handle_mgco_cmd_ind(Pst *pst, SuId suId, MgMgcoCommand* cmd)
...
@@ -506,7 +509,6 @@ void handle_mgco_cmd_ind(Pst *pst, SuId suId, MgMgcoCommand* cmd)
/* Validate Context - if context is specified then check if its present with us */
/* Validate Context - if context is specified then check if its present with us */
inc_context
=
&
cmd
->
contextId
;
MG_ZERO
(
&
ctxtId
,
sizeof
(
MgMgcoContextId
));
MG_ZERO
(
&
ctxtId
,
sizeof
(
MgMgcoContextId
));
memcpy
(
&
ctxtId
,
inc_context
,
sizeof
(
MgMgcoContextId
));
memcpy
(
&
ctxtId
,
inc_context
,
sizeof
(
MgMgcoContextId
));
...
@@ -535,7 +537,6 @@ void handle_mgco_cmd_ind(Pst *pst, SuId suId, MgMgcoCommand* cmd)
...
@@ -535,7 +537,6 @@ void handle_mgco_cmd_ind(Pst *pst, SuId suId, MgMgcoCommand* cmd)
goto
error1
;
goto
error1
;
}
}
memcpy
(
&
out_ctxt
,
inc_context
,
sizeof
(
MgMgcoContextId
));
switch
(
cmd
->
cmdType
.
val
)
switch
(
cmd
->
cmdType
.
val
)
{
{
...
@@ -557,7 +558,7 @@ void handle_mgco_cmd_ind(Pst *pst, SuId suId, MgMgcoCommand* cmd)
...
@@ -557,7 +558,7 @@ void handle_mgco_cmd_ind(Pst *pst, SuId suId, MgMgcoCommand* cmd)
{
{
/*MgMgcoAmmReq *addReq = &cmdReq->cmd.u.mod;*/
/*MgMgcoAmmReq *addReq = &cmdReq->cmd.u.mod;*/
handle_mg_modify_cmd
(
mg_profile
,
cmd
);
handle_mg_modify_cmd
(
mg_profile
,
cmd
);
mg_send_modify_rsp
(
suId
,
cmd
);
/*mg_send_modify_rsp(suId, cmd);*/
break
;
break
;
}
}
case
MGT_MOVE
:
case
MGT_MOVE
:
...
@@ -619,9 +620,10 @@ void handle_mgco_cmd_ind(Pst *pst, SuId suId, MgMgcoCommand* cmd)
...
@@ -619,9 +620,10 @@ void handle_mgco_cmd_ind(Pst *pst, SuId suId, MgMgcoCommand* cmd)
return
;
return
;
}
}
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_CONSOLE
,
"cmd->cmdStatus.val[%d]
\n
"
,
cmd
->
cmdStatus
.
val
);
/* END OF TXN received - means last command in txn to process.
/* END OF TXN received - means last command in txn to process.
* Send response to peer */
* Send response to peer */
if
(
CH_CMD_STATUS_END_OF_TXN
==
cmd
->
cmdStatus
.
val
)
{
/*if(CH_CMD_STATUS_END_OF_TXN == cmd->cmdStatus.val)*/
{
mg_send_end_of_axn
(
suId
,
&
cmd
->
transId
,
&
out_ctxt
,
&
cmd
->
peerId
);
mg_send_end_of_axn
(
suId
,
&
cmd
->
transId
,
&
out_ctxt
,
&
cmd
->
peerId
);
}
}
...
@@ -635,6 +637,9 @@ error:
...
@@ -635,6 +637,9 @@ error:
mg_build_mgco_err_request
(
&
mgErr
,
txn_id
,
&
ctxtId
,
err_code
,
&
errTxt
))
{
mg_build_mgco_err_request
(
&
mgErr
,
txn_id
,
&
ctxtId
,
err_code
,
&
errTxt
))
{
sng_mgco_send_err
(
suId
,
mgErr
);
sng_mgco_send_err
(
suId
,
mgErr
);
}
}
if
(
CH_CMD_STATUS_END_OF_TXN
==
cmd
->
cmdStatus
.
val
){
mg_send_end_of_axn
(
suId
,
&
cmd
->
transId
,
&
out_ctxt
,
&
cmd
->
peerId
);
}
error1
:
error1
:
mg_free_cmd
(
cmd
);
mg_free_cmd
(
cmd
);
return
;
return
;
...
@@ -654,7 +659,7 @@ void handle_mgco_txn_sta_ind(Pst *pst, SuId suId, MgMgcoInd* txn_sta_ind)
...
@@ -654,7 +659,7 @@ void handle_mgco_txn_sta_ind(Pst *pst, SuId suId, MgMgcoInd* txn_sta_ind)
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_CONSOLE
,
"%s
\n
"
,
__PRETTY_FUNCTION__
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_CONSOLE
,
"%s
\n
"
,
__PRETTY_FUNCTION__
);
/*dump information*/
/*dump information*/
/*mgAccEvntPrntMgMgcoInd(txn_sta_ind, stdout);*/
mgAccEvntPrntMgMgcoInd
(
txn_sta_ind
,
stdout
);
}
}
/*****************************************************************************************************************************/
/*****************************************************************************************************************************/
...
...
src/mod/endpoints/mod_media_gateway/mod_media_gateway.h
浏览文件 @
63c53a85
...
@@ -42,7 +42,7 @@ typedef enum {
...
@@ -42,7 +42,7 @@ typedef enum {
MEGACO_CODEC_ILBC
,
MEGACO_CODEC_ILBC
,
/* Nothing below this line */
/* Nothing below this line */
MEGACO_CODEC_INVALID
=
0xFFFFFF
FF
MEGACO_CODEC_INVALID
=
0xFFFFFF
}
megaco_codec_t
;
}
megaco_codec_t
;
typedef
struct
mg_peer_profile_s
{
typedef
struct
mg_peer_profile_s
{
...
@@ -90,6 +90,7 @@ typedef struct mg_termination_s {
...
@@ -90,6 +90,7 @@ typedef struct mg_termination_s {
const
char
*
uuid
;
/*!< UUID of the associated FS channel, or NULL if it's not activated */
const
char
*
uuid
;
/*!< UUID of the associated FS channel, or NULL if it's not activated */
mg_context_t
*
context
;
/*!< Context in which this termination is connected, or NULL */
mg_context_t
*
context
;
/*!< Context in which this termination is connected, or NULL */
megaco_profile_t
*
profile
;
/*!< Parent MG profile */
megaco_profile_t
*
profile
;
/*!< Parent MG profile */
MgMgcoReqEvtDesc
*
active_events
;
/* !< active megaco events */
union
{
union
{
struct
{
struct
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论