sngss7_chan_data_t *sngss7_info ;
ftdm_channel_t *ftdmchan;
+ /* confirm that the circuit is active on our side otherwise move to the next circuit */
+ if (!sngss7_test_flag(&g_ftdm_sngss7_data.cfg.isupCkt[circuit], SNGSS7_ACTIVE)) {
+ SS7_ERROR("[CIC:%d]Circuit is not active yet, skipping!\n",g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic);
+ return FTDM_FAIL;
+ }
+
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
/* check that the infId matches and that this is not a siglink */
if ((g_ftdm_sngss7_data.cfg.isupCkt[i].infId == infId) &&
(g_ftdm_sngss7_data.cfg.isupCkt[i].type == VOICE)) {
+
+ /* confirm that the circuit is active on our side otherwise move to the next circuit */
+ if (!sngss7_test_flag(&g_ftdm_sngss7_data.cfg.isupCkt[i], SNGSS7_ACTIVE)) {
+ SS7_ERROR("[CIC:%d]Circuit is not active yet, skipping!\n",g_ftdm_sngss7_data.cfg.isupCkt[i].cic);
+ i++;
+ continue;
+ }
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(i, &sngss7_info, &ftdmchan)) {
if ((g_ftdm_sngss7_data.cfg.isupCkt[i].infId == infId) &&
(g_ftdm_sngss7_data.cfg.isupCkt[i].type == VOICE)) {
+ /* confirm that the circuit is active on our side otherwise move to the next circuit */
+ if (!sngss7_test_flag(&g_ftdm_sngss7_data.cfg.isupCkt[i], SNGSS7_ACTIVE)) {
+ SS7_ERROR("[CIC:%d]Circuit is not active yet, skipping!\n",g_ftdm_sngss7_data.cfg.isupCkt[i].cic);
+ i++;
+ continue;
+ }
+
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(i, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
/* lock the channel */
ftdm_mutex_lock(ftdmchan->mutex);
+ /* flag the circuit as active */
+ sngss7_set_flag(sngss7_info->circuit, SNGSS7_ACTIVE);
+
/* check if the interface is paused or resumed */
if (sngss7_test_flag(sngss7_intf, SNGSS7_PAUSED)) {
SS7_DEBUG_CHAN(ftdmchan, "ISUP intf %d is PAUSED\n", sngss7_intf->id);