|
|
|
@ -319,26 +319,16 @@ switch_status_t handle_mg_add_cmd(megaco_profile_t* mg_profile, MgMgcoCommand *i
|
|
|
|
|
MgMgcoTermIdLst* termLst;
|
|
|
|
|
int err_code;
|
|
|
|
|
int is_rtp = 0x00;
|
|
|
|
|
char rtp_term_name[32];
|
|
|
|
|
MgMgcoAmmReq *cmd = &inc_cmd->u.mgCmdInd[0]->cmd.u.add;
|
|
|
|
|
U32 txn_id = inc_cmd->transId.val;
|
|
|
|
|
mg_termination_t* term = NULL;
|
|
|
|
|
MgMgcoMediaDesc* inc_med_desc;
|
|
|
|
|
MgMgcoAudRetParm *desc;
|
|
|
|
|
mg_context_t* mg_ctxt;
|
|
|
|
|
MgMgcoStreamDesc *stream;
|
|
|
|
|
MgMgcoLocalDesc *local;
|
|
|
|
|
MgMgcoRemoteDesc* remote;
|
|
|
|
|
CmSdpInfoSet *psdp;
|
|
|
|
|
CmSdpInfoSet *prsdp;
|
|
|
|
|
char* ipAddress = "192.168.1.1";
|
|
|
|
|
|
|
|
|
|
/* TODO - Kapil dummy line , will need to add with proper code */
|
|
|
|
|
inc_med_desc = &cmd->dl.descs[0]->u.media;
|
|
|
|
|
|
|
|
|
|
memset(&rtp_term_name[0], 0, 32);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/********************************************************************/
|
|
|
|
|
ctxtId = &inc_cmd->contextId;
|
|
|
|
|
termLst = mg_get_term_id_list(inc_cmd);
|
|
|
|
@ -367,6 +357,12 @@ switch_status_t handle_mg_add_cmd(megaco_profile_t* mg_profile, MgMgcoCommand *i
|
|
|
|
|
|
|
|
|
|
mg_ctxt = megaco_choose_context(mg_profile);
|
|
|
|
|
|
|
|
|
|
if(NULL == mg_ctxt){
|
|
|
|
|
mg_util_set_err_string(&errTxt, " Resource Failure ");
|
|
|
|
|
err_code = MGT_MGCO_RSP_CODE_RSRC_ERROR;
|
|
|
|
|
goto error;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO," Allocated Context[%p] with context_id[%d]\n", (void*)mg_ctxt, mg_ctxt->context_id);
|
|
|
|
|
|
|
|
|
|
/* fill Trillium Context structure with allocated context */
|
|
|
|
@ -383,15 +379,34 @@ switch_status_t handle_mg_add_cmd(megaco_profile_t* mg_profile, MgMgcoCommand *i
|
|
|
|
|
if ((NOTPRSNT != termId->type.pres) &&
|
|
|
|
|
(MGT_TERMID_CHOOSE == termId->type.val)){
|
|
|
|
|
|
|
|
|
|
term = megaco_choose_termination(mg_profile, "RTP"); /* TODO - RTP string has be configured one */
|
|
|
|
|
|
|
|
|
|
if(NULL == term){
|
|
|
|
|
mg_util_set_err_string(&errTxt, " Resource Failure ");
|
|
|
|
|
err_code = MGT_MGCO_RSP_CODE_RSRC_ERROR;
|
|
|
|
|
goto error;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO," Allocated Termination[%p] with term name[%s]\n", (void*)term, term->name);
|
|
|
|
|
|
|
|
|
|
is_rtp = 0x01;
|
|
|
|
|
strcpy(rtp_term_name,"rtp/1");
|
|
|
|
|
|
|
|
|
|
/* TODO - Matt */
|
|
|
|
|
/* allocate rtp term and associated the same to context */
|
|
|
|
|
/********************************************************************/
|
|
|
|
|
}else{ /* Physical termination */
|
|
|
|
|
/* TODO - Matt - associate physical termination to context */
|
|
|
|
|
|
|
|
|
|
/* get physical termination */
|
|
|
|
|
}
|
|
|
|
|
/********************************************************************/
|
|
|
|
|
/* associate physical termination to context */
|
|
|
|
|
|
|
|
|
|
if(SWITCH_STATUS_FALSE == megaco_context_add_termination(mg_ctxt, term)){
|
|
|
|
|
mg_util_set_err_string(&errTxt, " Resource Failure ");
|
|
|
|
|
err_code = MGT_MGCO_RSP_CODE_RSRC_ERROR;
|
|
|
|
|
goto error;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/********************************************************************/
|
|
|
|
|
|
|
|
|
|
ret = mg_prc_descriptors(mg_profile, inc_cmd, term);
|
|
|
|
@ -458,7 +473,7 @@ switch_status_t handle_mg_add_cmd(megaco_profile_t* mg_profile, MgMgcoCommand *i
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
out_termId = rsp.u.mgCmdRsp[0]->u.add.termIdLst.terms[rsp.u.mgCmdRsp[0]->u.add.termIdLst.num.val-1];
|
|
|
|
|
mg_fill_mgco_termid(out_termId, (char*)rtp_term_name, strlen((char*)rtp_term_name), &rsp.u.mgCmdRsp[0]->memCp);
|
|
|
|
|
mg_fill_mgco_termid(out_termId, (char*)term->name, strlen((char*)term->name), &rsp.u.mgCmdRsp[0]->memCp);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Whatever Media descriptor we have received, we can copy that and then
|
|
|
|
@ -480,6 +495,15 @@ switch_status_t handle_mg_add_cmd(megaco_profile_t* mg_profile, MgMgcoCommand *i
|
|
|
|
|
desc->type.val = MGT_MEDIADESC;
|
|
|
|
|
mgUtlCpyMgMgcoMediaDesc(&desc->u.media, inc_med_desc, &rsp.u.mgCmdRsp[0]->memCp);
|
|
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
MgMgcoStreamDesc *stream;
|
|
|
|
|
MgMgcoLocalDesc *local;
|
|
|
|
|
MgMgcoRemoteDesc* remote;
|
|
|
|
|
CmSdpInfoSet *psdp;
|
|
|
|
|
CmSdpInfoSet *prsdp;
|
|
|
|
|
char* ipAddress = "192.168.1.1";
|
|
|
|
|
|
|
|
|
|
/* Most probably we need to add local descriptor */
|
|
|
|
|
|
|
|
|
@ -642,6 +666,8 @@ switch_status_t handle_mg_add_cmd(megaco_profile_t* mg_profile, MgMgcoCommand *i
|
|
|
|
|
else {
|
|
|
|
|
printf("!local->pres.pres false \n");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -667,7 +693,7 @@ error:
|
|
|
|
|
mg_build_mgco_err_request(&mgErr, txn_id, ctxtId, err_code, &errTxt)) {
|
|
|
|
|
sng_mgco_send_err(mg_profile->idx, mgErr);
|
|
|
|
|
}
|
|
|
|
|
mg_free_cmd(cmd);
|
|
|
|
|
mg_free_cmd(inc_cmd);
|
|
|
|
|
return SWITCH_STATUS_FALSE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -683,6 +709,7 @@ error:
|
|
|
|
|
*/
|
|
|
|
|
switch_status_t handle_mg_modify_cmd(megaco_profile_t* mg_profile, MgMgcoCommand *inc_cmd)
|
|
|
|
|
{
|
|
|
|
|
mg_context_t* mg_ctxt = NULL;
|
|
|
|
|
MgMgcoContextId *ctxtId;
|
|
|
|
|
MgStr errTxt;
|
|
|
|
|
MgMgcoInd *mgErr;
|
|
|
|
@ -691,7 +718,7 @@ switch_status_t handle_mg_modify_cmd(megaco_profile_t* mg_profile, MgMgcoCommand
|
|
|
|
|
mg_termination_t* term = NULL;
|
|
|
|
|
switch_status_t ret;
|
|
|
|
|
int err_code;
|
|
|
|
|
MgMgcoAmmReq *cmd = &inc_cmd->u.mgCmdInd[0]->cmd.u.mod;
|
|
|
|
|
/*MgMgcoAmmReq *cmd = &inc_cmd->u.mgCmdInd[0]->cmd.u.mod;*/
|
|
|
|
|
U32 txn_id = inc_cmd->transId.val;
|
|
|
|
|
|
|
|
|
|
/********************************************************************/
|
|
|
|
@ -729,23 +756,72 @@ switch_status_t handle_mg_modify_cmd(megaco_profile_t* mg_profile, MgMgcoCommand
|
|
|
|
|
|
|
|
|
|
/********************************************************************/
|
|
|
|
|
/* context id presence check is already being done, we are here it means context-id requested in megaco message is present */
|
|
|
|
|
/********************************************************************/
|
|
|
|
|
|
|
|
|
|
/* Matt - to check if we have terminations in the context */
|
|
|
|
|
/* MGT_TERMID_ROOT = If ROOT term then there will not be any conext */
|
|
|
|
|
|
|
|
|
|
/* TODO - Matt */
|
|
|
|
|
if(MGT_TERMID_ROOT == termId->type.val){
|
|
|
|
|
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO,
|
|
|
|
|
"Modify request is for ROOT termination \n");
|
|
|
|
|
/* TODO */
|
|
|
|
|
|
|
|
|
|
/* Matt to indicate ERROR - If there is no terminations in requested context */
|
|
|
|
|
/********************************************************************/
|
|
|
|
|
} else if(MGT_TERMID_OTHER == termId->type.val){
|
|
|
|
|
/********************************************************************/
|
|
|
|
|
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO,
|
|
|
|
|
"Modify request is for termination[%s] and context: type[%d], value[%d] \n",
|
|
|
|
|
termId->name.lcl.val, ctxtId->type.val, ctxtId->val.val);
|
|
|
|
|
|
|
|
|
|
/* Kapil - If there is an error - send response back to MG stack with MGT_MGCO_RSP_CODE_NO_TERM_CTXT error code*/
|
|
|
|
|
term = megaco_find_termination(mg_profile, (char*)termId->name.lcl.val);
|
|
|
|
|
|
|
|
|
|
if(NULL == term){
|
|
|
|
|
mg_util_set_term_string(&errTxt,termId);
|
|
|
|
|
err_code = MGT_MGCO_RSP_CODE_UNKNOWN_TERM_ID;
|
|
|
|
|
goto error;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* termination specified...context should also be specified */
|
|
|
|
|
|
|
|
|
|
/* check if we have terminations in the context */
|
|
|
|
|
|
|
|
|
|
if (NOTPRSNT != ctxtId->type.pres) {
|
|
|
|
|
if(MGT_CXTID_OTHER == ctxtId->type.val) {
|
|
|
|
|
/*find context based on received context-id */
|
|
|
|
|
mg_ctxt = megaco_get_context(mg_profile, ctxtId->val.val);
|
|
|
|
|
if(NULL == mg_ctxt){
|
|
|
|
|
mg_util_set_ctxt_string(&errTxt, ctxtId);
|
|
|
|
|
err_code = MGT_MGCO_RSP_CODE_UNKNOWN_CTXT;
|
|
|
|
|
goto error;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(SWITCH_STATUS_FALSE == megaco_context_is_term_present(mg_ctxt, term)){
|
|
|
|
|
/* ERROR - termination didnt bind with requested context */
|
|
|
|
|
mg_util_set_term_string(&errTxt,termId);
|
|
|
|
|
err_code = MGT_MGCO_RSP_CODE_NO_TERM_CTXT;
|
|
|
|
|
goto error;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}else if(MGT_CXTID_NULL == ctxtId->type.val) {
|
|
|
|
|
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO,
|
|
|
|
|
"Modify request is for NULL Context \n");
|
|
|
|
|
/*TODO - NULL context...nothing to do now...jump to response to send +ve response */
|
|
|
|
|
goto response;
|
|
|
|
|
}else if(MGT_CXTID_ALL == ctxtId->type.val) {
|
|
|
|
|
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO,
|
|
|
|
|
"Modify request is for ALL Context \n");
|
|
|
|
|
/*TODO - ALL context...nothing to do now...jump to response to send +ve response */
|
|
|
|
|
goto response;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Not sure if MODIFY can come with Context ALL with specified term */
|
|
|
|
|
|
|
|
|
|
/********************************************************************/
|
|
|
|
|
|
|
|
|
|
/* TODO - dummy code will replace with proper choose_termination api */
|
|
|
|
|
term = malloc(sizeof(*term));
|
|
|
|
|
term->active_events = NULL;
|
|
|
|
|
|
|
|
|
|
ret = mg_prc_descriptors(mg_profile, inc_cmd, term);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/********************************************************************/
|
|
|
|
|
|
|
|
|
|
/* Matt - to provide the response SDP structure which needs to fill in Modify command response */
|
|
|
|
@ -756,6 +832,7 @@ switch_status_t handle_mg_modify_cmd(megaco_profile_t* mg_profile, MgMgcoCommand
|
|
|
|
|
|
|
|
|
|
/* Kapil - to fill the response structure and call the response API to send Modify response */
|
|
|
|
|
|
|
|
|
|
response:
|
|
|
|
|
{ /* send response */
|
|
|
|
|
|
|
|
|
|
MgMgcoCommand rsp;
|
|
|
|
@ -812,7 +889,7 @@ error:
|
|
|
|
|
mg_build_mgco_err_request(&mgErr, txn_id, ctxtId, err_code, &errTxt)) {
|
|
|
|
|
sng_mgco_send_err(mg_profile->idx, mgErr);
|
|
|
|
|
}
|
|
|
|
|
mg_free_cmd(cmd);
|
|
|
|
|
mg_free_cmd(inc_cmd);
|
|
|
|
|
return SWITCH_STATUS_FALSE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -834,26 +911,40 @@ switch_status_t handle_mg_subtract_cmd(megaco_profile_t* mg_profile, MgMgcoComma
|
|
|
|
|
MgMgcoTermId *termId;
|
|
|
|
|
MgMgcoTermIdLst* termLst;
|
|
|
|
|
int err_code;
|
|
|
|
|
MgMgcoAmmReq *cmd = &inc_cmd->u.mgCmdInd[0]->cmd.u.add;
|
|
|
|
|
/*MgMgcoAmmReq *cmd = &inc_cmd->u.mgCmdInd[0]->cmd.u.add;*/
|
|
|
|
|
U32 txn_id = inc_cmd->transId.val;
|
|
|
|
|
mg_context_t* mg_ctxt = NULL;
|
|
|
|
|
mg_termination_t* term = NULL;
|
|
|
|
|
uint8_t wild = 0x00;
|
|
|
|
|
|
|
|
|
|
wild = inc_cmd->u.mgCmdReq[0]->wild.pres;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/********************************************************************/
|
|
|
|
|
/************************************************************************************************************************************************************/
|
|
|
|
|
ctxtId = &inc_cmd->contextId;
|
|
|
|
|
termLst = mg_get_term_id_list(inc_cmd);
|
|
|
|
|
termId = termLst->terms[0];
|
|
|
|
|
|
|
|
|
|
/********************************************************************/
|
|
|
|
|
/************************************************************************************************************************************************************/
|
|
|
|
|
/* Validating Subtract request *******************************************/
|
|
|
|
|
|
|
|
|
|
if(NOTPRSNT == ctxtId->type.pres){
|
|
|
|
|
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_ERROR," SUB Request processing failed, Context Not Present\n");
|
|
|
|
|
mg_util_set_ctxt_string(&errTxt, ctxtId);
|
|
|
|
|
err_code = MGT_MGCO_RSP_CODE_PROT_ERROR;
|
|
|
|
|
goto error;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(NOTPRSNT == termId->type.pres){
|
|
|
|
|
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_ERROR," SUB Request processing failed, Termination Not Present\n");
|
|
|
|
|
mg_util_set_term_string(&errTxt,termId);
|
|
|
|
|
err_code = MGT_MGCO_RSP_CODE_PROT_ERROR;
|
|
|
|
|
goto error;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*-- NULL Context & CHOOSE Context not applicable for SUB request --*/
|
|
|
|
|
if ((NOTPRSNT != ctxtId->type.pres) &&
|
|
|
|
|
((MGT_CXTID_CHOOSE == ctxtId->type.val) ||
|
|
|
|
|
(MGT_CXTID_NULL == ctxtId->type.val))) {
|
|
|
|
|
if ((MGT_CXTID_CHOOSE == ctxtId->type.val) ||
|
|
|
|
|
(MGT_CXTID_NULL == ctxtId->type.val)) {
|
|
|
|
|
|
|
|
|
|
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_ERROR," SUB Request processing failed, Context CHOOSE/NULL not allowed\n");
|
|
|
|
|
|
|
|
|
@ -862,9 +953,8 @@ switch_status_t handle_mg_subtract_cmd(megaco_profile_t* mg_profile, MgMgcoComma
|
|
|
|
|
goto error;
|
|
|
|
|
}
|
|
|
|
|
/* ROOT Termination & CHOOSE Termination not allowed */
|
|
|
|
|
else if ((NOTPRSNT != termId->type.pres) &&
|
|
|
|
|
((MGT_TERMID_ROOT == termId->type.val) ||
|
|
|
|
|
(MGT_TERMID_CHOOSE == termId->type.val))) {
|
|
|
|
|
else if ((MGT_TERMID_ROOT == termId->type.val) ||
|
|
|
|
|
(MGT_TERMID_CHOOSE == termId->type.val)) {
|
|
|
|
|
|
|
|
|
|
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_ERROR," SUB Request processing failed, Termination ROOT/CHOOSE not allowed\n");
|
|
|
|
|
|
|
|
|
@ -872,33 +962,76 @@ switch_status_t handle_mg_subtract_cmd(megaco_profile_t* mg_profile, MgMgcoComma
|
|
|
|
|
err_code = MGT_MGCO_RSP_CODE_INVLD_IDENTIFIER;
|
|
|
|
|
goto error;
|
|
|
|
|
}
|
|
|
|
|
/************************************************************************************************************************************************************/
|
|
|
|
|
|
|
|
|
|
/********************************************************************/
|
|
|
|
|
/* TODO - see if we receive wild card SUB for ALL context */
|
|
|
|
|
if (MGT_CXTID_OTHER == ctxtId->type.val){
|
|
|
|
|
|
|
|
|
|
/********************************************************************/
|
|
|
|
|
/* Matt - TODO - check if we have terminations in the context */
|
|
|
|
|
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO," SUB Request for Context[%d] \n", ctxtId->val.val);
|
|
|
|
|
|
|
|
|
|
/* Matt to indicate ERROR - If there is no terminations in requested context */
|
|
|
|
|
|
|
|
|
|
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO," Received context_id[%d]\n", ctxtId->val.val);
|
|
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
|
/*find context based on received context-id */
|
|
|
|
|
mg_ctxt = megaco_get_context(mg_profile, ctxtId->val.val);
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
if(mg_ctxt){
|
|
|
|
|
if(NULL == mg_ctxt){
|
|
|
|
|
mg_util_set_ctxt_string(&errTxt, ctxtId);
|
|
|
|
|
err_code = MGT_MGCO_RSP_CODE_UNKNOWN_CTXT;
|
|
|
|
|
goto error;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO," Found Context[%p] for context_id[%d]\n", (void*)mg_ctxt, mg_ctxt->context_id);
|
|
|
|
|
|
|
|
|
|
/* TODO - remove terminations from context....as if now there is no termination associated with Context */
|
|
|
|
|
|
|
|
|
|
if(MGT_TERMID_ALL == termId->type.val){
|
|
|
|
|
|
|
|
|
|
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO," SUB Request for context[%d] with ALL termination \n", mg_ctxt->context_id);
|
|
|
|
|
|
|
|
|
|
/* remove terminations from context */
|
|
|
|
|
megaco_context_sub_all_termination(mg_ctxt);
|
|
|
|
|
|
|
|
|
|
}else if(MGT_TERMID_OTHER == termId->type.val){
|
|
|
|
|
|
|
|
|
|
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO," SUB Request for termination[%s] \n", (char*)termId->name.lcl.val);
|
|
|
|
|
|
|
|
|
|
term = megaco_find_termination(mg_profile, (char*)termId->name.lcl.val);
|
|
|
|
|
|
|
|
|
|
if(SWITCH_STATUS_FALSE == megaco_context_is_term_present(mg_ctxt, term)){
|
|
|
|
|
/* ERROR - termination didnt bind with requested context */
|
|
|
|
|
mg_util_set_term_string(&errTxt,termId);
|
|
|
|
|
err_code = MGT_MGCO_RSP_CODE_NO_TERM_CTXT;
|
|
|
|
|
goto error;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(NULL == term){
|
|
|
|
|
mg_util_set_term_string(&errTxt,termId);
|
|
|
|
|
err_code = MGT_MGCO_RSP_CODE_UNKNOWN_TERM_ID;
|
|
|
|
|
goto error;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* remove termination from context */
|
|
|
|
|
megaco_context_sub_termination(mg_ctxt, term);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* release context*/
|
|
|
|
|
megaco_release_context(mg_ctxt);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*************************************************************************************************************************/
|
|
|
|
|
/************************************************************************************************************************************************************/
|
|
|
|
|
/* CONTEXT = ALL */
|
|
|
|
|
|
|
|
|
|
if (MGT_CXTID_ALL == ctxtId->type.val){
|
|
|
|
|
|
|
|
|
|
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO," SUB Request for ALL context \n");
|
|
|
|
|
|
|
|
|
|
/* TODO */
|
|
|
|
|
|
|
|
|
|
/* As of now sending +ve response */
|
|
|
|
|
goto response;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/************************************************************************************************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
response:
|
|
|
|
|
/************************************************************************************************************************************************************/
|
|
|
|
|
/* resp code -- begin */
|
|
|
|
|
{
|
|
|
|
|
MgMgcoCommand rsp;
|
|
|
|
@ -951,7 +1084,7 @@ switch_status_t handle_mg_subtract_cmd(megaco_profile_t* mg_profile, MgMgcoComma
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
/* sample resp code -- end */
|
|
|
|
|
/*************************************************************************************************************************/
|
|
|
|
|
/************************************************************************************************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return SWITCH_STATUS_SUCCESS;
|
|
|
|
@ -960,7 +1093,7 @@ error:
|
|
|
|
|
mg_build_mgco_err_request(&mgErr, txn_id, ctxtId, err_code, &errTxt)) {
|
|
|
|
|
sng_mgco_send_err(mg_profile->idx, mgErr);
|
|
|
|
|
}
|
|
|
|
|
mg_free_cmd(cmd);
|
|
|
|
|
mg_free_cmd(inc_cmd);
|
|
|
|
|
return SWITCH_STATUS_FALSE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|