diff --git a/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_relay.c b/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_relay.c index f58aad4ca7..a96dae5cdd 100644 --- a/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_relay.c +++ b/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_relay.c @@ -42,8 +42,6 @@ /******************************************************************************/ /* PROTOTYPES *****************************************************************/ -ftdm_status_t handle_relay_connect(RyMngmt *sta); -ftdm_status_t handle_relay_disconnect(RyMngmt *sta); /*static ftdm_status_t enable_all_ckts_for_relay(void);*/ static ftdm_status_t reconfig_all_ckts_for_relay(void); @@ -84,23 +82,24 @@ ftdm_status_t handle_relay_connect(RyMngmt *sta) /******************************************************************************/ ftdm_status_t handle_relay_disconnect_on_error(RyMngmt *sta) { + SS7_DEBUG("SS7 relay disconnect on error\n"); /* check which procId is in error, if it is 1, disable the ckts */ if (sta->t.usta.s.ryErrUsta.errPid == 1 ) { - /* we've lost the server, bring down the mtp2 links */ - disble_all_mtp2_sigs_for_relay(); - /* we've lost the server, bring the sig status down on all ckts */ disable_all_ckts_for_relay(); + + /* we've lost the server, bring down the mtp2 links */ + disble_all_mtp2_sigs_for_relay(); } /* check if the channel is a server, means we just lost a MGW */ if (g_ftdm_sngss7_data.cfg.relay[sta->t.usta.s.ryErrUsta.errPid].type == LRY_CT_TCP_SERVER) { - /* we've lost the client, bring down all mtp3 links for this procId */ - disable_all_sigs_for_relay(sta->t.usta.s.ryErrUsta.errPid); - /* we've lost the client, bring down all the ckts for this procId */ block_all_ckts_for_relay(sta->t.usta.s.ryErrUsta.errPid); + + /* we've lost the client, bring down all mtp3 links for this procId */ + disable_all_sigs_for_relay(sta->t.usta.s.ryErrUsta.errPid); } return FTDM_SUCCESS; @@ -110,6 +109,8 @@ ftdm_status_t handle_relay_disconnect_on_error(RyMngmt *sta) ftdm_status_t handle_relay_disconnect_on_down(RyMngmt *sta) { + SS7_DEBUG("SS7 relay disconnect on down\n"); + /* check if the channel is a server, means we just lost a MGW */ if (g_ftdm_sngss7_data.cfg.relay[sta->t.usta.s.ryUpUsta.id].type == LRY_CT_TCP_SERVER) { block_all_ckts_for_relay(sta->t.usta.s.ryUpUsta.id);