mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-06-02 11:29:48 +00:00
freetdm: fixing cgu with signaling link in unblock range
This commit is contained in:
parent
024a043e2c
commit
b78b612b47
@ -2407,7 +2407,7 @@ ftdm_status_t handle_cgb_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
|
|||||||
|
|
||||||
/* loop over the cics starting from circuit until range+1 */
|
/* loop over the cics starting from circuit until range+1 */
|
||||||
loop_range = circuit + range + 1;
|
loop_range = circuit + range + 1;
|
||||||
x circuit;
|
x = circuit;
|
||||||
while( x < loop_range ) {
|
while( x < loop_range ) {
|
||||||
if (g_ftdm_sngss7_data.cfg.isupCkt[x].type != SNG_CKT_VOICE) {
|
if (g_ftdm_sngss7_data.cfg.isupCkt[x].type != SNG_CKT_VOICE) {
|
||||||
loop_range++;
|
loop_range++;
|
||||||
@ -2538,7 +2538,8 @@ ftdm_status_t handle_cgu_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
|
|||||||
int blockType = 0;
|
int blockType = 0;
|
||||||
int byte = 0;
|
int byte = 0;
|
||||||
int bit = 0;
|
int bit = 0;
|
||||||
int x;
|
int x;
|
||||||
|
int loop_range=0;
|
||||||
ftdm_sigmsg_t sigev;
|
ftdm_sigmsg_t sigev;
|
||||||
|
|
||||||
ftdm_running_return(FTDM_FAIL);
|
ftdm_running_return(FTDM_FAIL);
|
||||||
@ -2608,6 +2609,60 @@ ftdm_status_t handle_cgu_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* loop over the cics starting from circuit until range+1 */
|
/* loop over the cics starting from circuit until range+1 */
|
||||||
|
loop_range = circuit + range + 1;
|
||||||
|
x = circuit;
|
||||||
|
while( x < loop_range ) {
|
||||||
|
if (g_ftdm_sngss7_data.cfg.isupCkt[x].type != SNG_CKT_VOICE) {
|
||||||
|
loop_range++;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
/* lock the channel */
|
||||||
|
ftdm_mutex_lock(ftdmchan->mutex);
|
||||||
|
|
||||||
|
if (status[byte] & (1 << bit)) {
|
||||||
|
switch (blockType) {
|
||||||
|
/**********************************************************************/
|
||||||
|
case 0: /* maintenance oriented */
|
||||||
|
sngss7_clear_ckt_blk_flag(sngss7_info, FLAG_GRP_MN_BLOCK_RX);
|
||||||
|
sngss7_clear_ckt_blk_flag(sngss7_info, FLAG_CKT_MN_BLOCK_RX);
|
||||||
|
sngss7_clear_ckt_blk_flag(sngss7_info, FLAG_CKT_MN_BLOCK_RX_DN);
|
||||||
|
break;
|
||||||
|
/**********************************************************************/
|
||||||
|
case 1: /* hardware failure oriented */
|
||||||
|
sngss7_clear_ckt_blk_flag(sngss7_info, FLAG_GRP_HW_BLOCK_RX);
|
||||||
|
break;
|
||||||
|
/**********************************************************************/
|
||||||
|
case 2: /* reserved for national use */
|
||||||
|
break;
|
||||||
|
/**********************************************************************/
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
/**********************************************************************/
|
||||||
|
} /* switch (blockType) */
|
||||||
|
} /* if (status[byte] & (1 << bit)) */
|
||||||
|
|
||||||
|
sigev.chan_id = ftdmchan->chan_id;
|
||||||
|
sigev.span_id = ftdmchan->span_id;
|
||||||
|
sigev.channel = ftdmchan;
|
||||||
|
|
||||||
|
/* bring the sig status down */
|
||||||
|
if (sngss7_channel_status_clear(sngss7_info)) {
|
||||||
|
sngss7_set_sig_status(sngss7_info, FTDM_SIG_STATE_UP);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* unlock the channel again before we exit */
|
||||||
|
ftdm_mutex_unlock(ftdmchan->mutex);
|
||||||
|
|
||||||
|
/* update the bit and byte counter*/
|
||||||
|
bit ++;
|
||||||
|
if (bit == 8) {
|
||||||
|
byte++;
|
||||||
|
bit = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
x++;
|
||||||
|
}
|
||||||
|
#if 0
|
||||||
for (x = circuit; x < (circuit + range + 1); x++) {
|
for (x = circuit; x < (circuit + range + 1); x++) {
|
||||||
if (g_ftdm_sngss7_data.cfg.isupCkt[x].type != SNG_CKT_VOICE) continue;
|
if (g_ftdm_sngss7_data.cfg.isupCkt[x].type != SNG_CKT_VOICE) continue;
|
||||||
/* grab the circuit in question */
|
/* grab the circuit in question */
|
||||||
@ -2661,6 +2716,7 @@ ftdm_status_t handle_cgu_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
|
|||||||
}
|
}
|
||||||
|
|
||||||
} /* for (x = circuit; x < (circuit + range + 1); x++) */
|
} /* for (x = circuit; x < (circuit + range + 1); x++) */
|
||||||
|
#endif
|
||||||
|
|
||||||
/* get the ftdmchan and ss7_chan_data from the circuit */
|
/* get the ftdmchan and ss7_chan_data from the circuit */
|
||||||
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
|
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user