switch_hash_this(hi, &var, NULL, &val);
profile = (megaco_profile_t *) val;
if (profile->idx == suId) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Got profile[%s] associated with suId[%d]\n",profile->name, suId);
+ //switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Got profile[%s] associated with suId[%d]\n",profile->name, suId);
found = 0x01;
break;
}
ctxt.cmdStatus.pres = PRSNT_NODEF;
ctxt.cmdStatus.val = CH_CMD_STATUS_END_OF_AXN;
+#if 0
#ifdef BIT_64
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG,
"mg_send_end_of_axn: Sending END_OF_AXN for transId[%d], peerId[%d], context[type = %s, value = %d]\n",
"mg_send_end_of_axn: Sending END_OF_AXN for transId[%lu], peerId[%lu], context[type = %s, value = %lu]\n",
transId->val, peerId->val, PRNT_MG_CTXT_TYPE(ctxtId->type.val), ctxtId->val.val);
+#endif
#endif
ret = sng_mgco_send_axn_req(suId, &ctxt);
switch_status_t mg_send_audit_rsp(SuId suId, MgMgcoCommand *req);
switch_status_t handle_mg_audit_cmd(megaco_profile_t* mg_profile, MgMgcoCommand *auditReq);
switch_status_t mg_stack_termination_is_in_service(megaco_profile_t* mg_profile, char* term_str, int len);
-void mg_create_tdm_term(megaco_profile_t *profile, const char *tech, const char *channel_prefix, const char *prefix, int j);
+void mg_create_tdm_term(megaco_profile_t *profile, const char *tech, const char *channel_prefix, const char *prefix, int j, int k);
void mg_util_set_cmd_name_string (MgStr *errTxt, MgMgcoCommand *cmd);
switch_status_t mgco_init_ins_service_change(SuId suId);
startchan = atoi(chanmap[0]);
endchan = atoi(chanmap[1]);
for (j = startchan; j <= endchan; j++) {
- mg_create_tdm_term(profile, tech, channel_prefix, prefix, j);
+ mg_create_tdm_term(profile, tech, channel_prefix, prefix, j, j);
}
}
}else{
/* case (i) */
p = channel_map_dup;
startchan = endchan = atoi(p);
- mg_create_tdm_term(profile, tech, channel_prefix, prefix, startchan);
+ mg_create_tdm_term(profile, tech, channel_prefix, prefix, startchan, startchan);
}
}else
{
endchan = atoi(p);
for (j = startchan; j <= endchan; j++) {
- mg_create_tdm_term(profile, tech, channel_prefix, prefix, j);
+if (0 == i)
+ mg_create_tdm_term(profile, tech, channel_prefix, prefix, j, j);
+else
+ mg_create_tdm_term(profile, tech, channel_prefix, prefix, j, j-1);
}
}
}
}
/****************************************************************************************************************************/
-void mg_create_tdm_term(megaco_profile_t *profile, const char *tech, const char *channel_prefix, const char *prefix, int chan_num)
+void mg_create_tdm_term(megaco_profile_t *profile, const char *tech, const char *channel_prefix, const char *prefix, int chan_num, int tdm_chan_num)
{
mg_termination_t *term;
switch_memory_pool_t *pool;
term->tech = switch_core_strdup(pool, tech);
term->active_events = NULL;
term->name = switch_core_sprintf(pool, "%s%d", prefix, chan_num);
- term->u.tdm.channel = chan_num;
+ term->u.tdm.channel = tdm_chan_num;
term->u.tdm.span_name = switch_core_strdup(pool, channel_prefix);
switch_set_flag(term, MG_OUT_OF_SERVICE);
inc_context = &cmd->contextId;
memcpy(&out_ctxt, inc_context,sizeof(MgMgcoContextId));
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
- "%s: Received Command Type[%s] \n", __PRETTY_FUNCTION__, PRNT_MG_CMD_TYPE(cmd->cmdType.val));
+ /*switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
+ "%s: Received Command Type[%s] \n", __PRETTY_FUNCTION__, PRNT_MG_CMD_TYPE(cmd->cmdType.val));*/
/*get mg profile associated with SuId */
if(NULL == (mg_profile = megaco_get_profile_by_suId(suId))){
}
}
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
- "Termination-Id received..value[%s] type[%d] \n", termId->name.lcl.val, termId->type.val);
+ /*switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
+ "Termination-Id received..value[%s] type[%d] \n", termId->name.lcl.val, termId->type.val);*/
/*If term type is other then check if that term is configured with us..for term type CHOOSE/ALL , no need to check */
/* check is only if command is not AUDIT */