adding "MGC_FAIL" alarm

This commit is contained in:
Kapil 2012-07-25 13:05:54 -04:00
parent 2d9ed21007
commit 061e082b62
2 changed files with 21 additions and 11 deletions

View File

@ -20,17 +20,6 @@ const char *mg_service_change_reason[] = {
};
/*****************************************************************************************************************************/
switch_status_t mg_activate_ito_timer(megaco_profile_t* profile)
{
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO," Starting IT/ITO Timer \n");
mg_print_time();
switch_scheduler_add_task(switch_epoch_time_now(NULL)+profile->inact_tmr, mg_inactivity_timer_exp,"","media_gateway",0,profile,0);
return SWITCH_STATUS_SUCCESS;
}
/*****************************************************************************************************************************/
static void mg_inactivity_timer_exp(switch_scheduler_task_t *task)
{
@ -45,6 +34,17 @@ static void mg_inactivity_timer_exp(switch_scheduler_task_t *task)
/*task->runtime = switch_epoch_time_now(NULL)+100; */ /* interval in seconds */
}
/*****************************************************************************************************************************/
switch_status_t mg_activate_ito_timer(megaco_profile_t* profile)
{
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO," Starting IT/ITO Timer \n");
mg_print_time();
switch_scheduler_add_task(switch_epoch_time_now(NULL)+profile->inact_tmr, mg_inactivity_timer_exp,"","media_gateway",0,profile,0);
return SWITCH_STATUS_SUCCESS;
}
/*****************************************************************************************************************************/
switch_status_t mg_is_ito_pkg_req(megaco_profile_t* mg_profile, MgMgcoCommand *cmd)
{

View File

@ -74,6 +74,16 @@ void handle_mg_alarm(Pst *pst, MgMngmt *usta)
len = len + sprintf(prBuf+len, " Event ( ");
switch (usta->t.usta.alarm.event)
{
case LMG_EVENT_ALL_MGC_FAILED:
{
len = len + sprintf(prBuf+len, "ALL MGC Failed ");
break;
}
case LMG_EVENT_MGC_FAILED:
{
len = len + sprintf(prBuf+len, "MGC Failed ");
break;
}
case LMG_EVENT_TSAP_RECVRY_SUCCESS:
{
len = len + sprintf(prBuf+len, "TSAP recovery success");