提交 061e082b authored 作者: Kapil's avatar Kapil

adding "MGC_FAIL" alarm

上级 2d9ed210
...@@ -20,17 +20,6 @@ const char *mg_service_change_reason[] = { ...@@ -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) 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) ...@@ -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 */ /*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) switch_status_t mg_is_ito_pkg_req(megaco_profile_t* mg_profile, MgMgcoCommand *cmd)
{ {
......
...@@ -74,6 +74,16 @@ void handle_mg_alarm(Pst *pst, MgMngmt *usta) ...@@ -74,6 +74,16 @@ void handle_mg_alarm(Pst *pst, MgMngmt *usta)
len = len + sprintf(prBuf+len, " Event ( "); len = len + sprintf(prBuf+len, " Event ( ");
switch (usta->t.usta.alarm.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: case LMG_EVENT_TSAP_RECVRY_SUCCESS:
{ {
len = len + sprintf(prBuf+len, "TSAP recovery success"); len = len + sprintf(prBuf+len, "TSAP recovery success");
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论