freetdm: ss7 - updated ftmod_sangoma_ss7 to support changes to FreeTDM api
This commit is contained in:
parent
b1e773e787
commit
525f399812
|
@ -1482,7 +1482,7 @@ static ftdm_status_t handle_tx_grs(ftdm_stream_handle_t *stream, int span, int c
|
||||||
|
|
||||||
sngss7_info = (sngss7_chan_data_t *)g_ftdm_sngss7_data.cfg.isupCkt[x].obj;
|
sngss7_info = (sngss7_chan_data_t *)g_ftdm_sngss7_data.cfg.isupCkt[x].obj;
|
||||||
ftdmchan = sngss7_info->ftdmchan;
|
ftdmchan = sngss7_info->ftdmchan;
|
||||||
sngss7_span = ftdmchan->span->mod_data;
|
sngss7_span = ftdmchan->span->signal_data;
|
||||||
|
|
||||||
if ((ftdmchan->physical_span_id == span) &&
|
if ((ftdmchan->physical_span_id == span) &&
|
||||||
((ftdmchan->physical_chan_id >= chan) && (ftdmchan->physical_chan_id < (chan+range)))) {
|
((ftdmchan->physical_chan_id >= chan) && (ftdmchan->physical_chan_id < (chan+range)))) {
|
||||||
|
@ -1529,7 +1529,7 @@ static ftdm_status_t handle_tx_grs(ftdm_stream_handle_t *stream, int span, int c
|
||||||
|
|
||||||
sngss7_info = (sngss7_chan_data_t *)g_ftdm_sngss7_data.cfg.isupCkt[x].obj;
|
sngss7_info = (sngss7_chan_data_t *)g_ftdm_sngss7_data.cfg.isupCkt[x].obj;
|
||||||
ftdmchan = sngss7_info->ftdmchan;
|
ftdmchan = sngss7_info->ftdmchan;
|
||||||
sngss7_span = ftdmchan->span->mod_data;
|
sngss7_span = ftdmchan->span->signal_data;
|
||||||
|
|
||||||
if ((ftdmchan->physical_span_id == span) &&
|
if ((ftdmchan->physical_span_id == span) &&
|
||||||
((ftdmchan->physical_chan_id >= chan) && (ftdmchan->physical_chan_id < (chan+range)))) {
|
((ftdmchan->physical_chan_id >= chan) && (ftdmchan->physical_chan_id < (chan+range)))) {
|
||||||
|
@ -1572,7 +1572,7 @@ static ftdm_status_t handle_tx_cgb(ftdm_stream_handle_t *stream, int span, int c
|
||||||
/* extract the channel and span info for this circuit */
|
/* extract the channel and span info for this circuit */
|
||||||
sngss7_info = (sngss7_chan_data_t *)g_ftdm_sngss7_data.cfg.isupCkt[x].obj;
|
sngss7_info = (sngss7_chan_data_t *)g_ftdm_sngss7_data.cfg.isupCkt[x].obj;
|
||||||
ftdmchan = sngss7_info->ftdmchan;
|
ftdmchan = sngss7_info->ftdmchan;
|
||||||
sngss7_span = ftdmchan->span->mod_data;
|
sngss7_span = ftdmchan->span->signal_data;
|
||||||
|
|
||||||
/* check if this circuit is part of the block */
|
/* check if this circuit is part of the block */
|
||||||
if ((ftdmchan->physical_span_id == span) &&
|
if ((ftdmchan->physical_span_id == span) &&
|
||||||
|
@ -1628,7 +1628,7 @@ static ftdm_status_t handle_tx_cgb(ftdm_stream_handle_t *stream, int span, int c
|
||||||
|
|
||||||
sngss7_info = (sngss7_chan_data_t *)g_ftdm_sngss7_data.cfg.isupCkt[x].obj;
|
sngss7_info = (sngss7_chan_data_t *)g_ftdm_sngss7_data.cfg.isupCkt[x].obj;
|
||||||
ftdmchan = sngss7_info->ftdmchan;
|
ftdmchan = sngss7_info->ftdmchan;
|
||||||
sngss7_span = ftdmchan->span->mod_data;
|
sngss7_span = ftdmchan->span->signal_data;
|
||||||
|
|
||||||
if ((ftdmchan->physical_span_id == span) &&
|
if ((ftdmchan->physical_span_id == span) &&
|
||||||
((ftdmchan->physical_chan_id >= chan) && (ftdmchan->physical_chan_id < (chan+range)))) {
|
((ftdmchan->physical_chan_id >= chan) && (ftdmchan->physical_chan_id < (chan+range)))) {
|
||||||
|
@ -1672,7 +1672,7 @@ static ftdm_status_t handle_tx_cgu(ftdm_stream_handle_t *stream, int span, int c
|
||||||
/* extract the channel and span info for this circuit */
|
/* extract the channel and span info for this circuit */
|
||||||
sngss7_info = (sngss7_chan_data_t *)g_ftdm_sngss7_data.cfg.isupCkt[x].obj;
|
sngss7_info = (sngss7_chan_data_t *)g_ftdm_sngss7_data.cfg.isupCkt[x].obj;
|
||||||
ftdmchan = sngss7_info->ftdmchan;
|
ftdmchan = sngss7_info->ftdmchan;
|
||||||
sngss7_span = ftdmchan->span->mod_data;
|
sngss7_span = ftdmchan->span->signal_data;
|
||||||
|
|
||||||
/* check if this circuit is part of the block */
|
/* check if this circuit is part of the block */
|
||||||
if ((ftdmchan->physical_span_id == span) &&
|
if ((ftdmchan->physical_span_id == span) &&
|
||||||
|
@ -1728,7 +1728,7 @@ static ftdm_status_t handle_tx_cgu(ftdm_stream_handle_t *stream, int span, int c
|
||||||
|
|
||||||
sngss7_info = (sngss7_chan_data_t *)g_ftdm_sngss7_data.cfg.isupCkt[x].obj;
|
sngss7_info = (sngss7_chan_data_t *)g_ftdm_sngss7_data.cfg.isupCkt[x].obj;
|
||||||
ftdmchan = sngss7_info->ftdmchan;
|
ftdmchan = sngss7_info->ftdmchan;
|
||||||
sngss7_span = ftdmchan->span->mod_data;
|
sngss7_span = ftdmchan->span->signal_data;
|
||||||
|
|
||||||
if ((ftdmchan->physical_span_id == span) &&
|
if ((ftdmchan->physical_span_id == span) &&
|
||||||
((ftdmchan->physical_chan_id >= chan) && (ftdmchan->physical_chan_id < (chan+range)))) {
|
((ftdmchan->physical_chan_id >= chan) && (ftdmchan->physical_chan_id < (chan+range)))) {
|
||||||
|
|
|
@ -1722,7 +1722,7 @@ ftdm_status_t handle_grs_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
|
||||||
}
|
}
|
||||||
|
|
||||||
/* fill in the span structure for this circuit */
|
/* fill in the span structure for this circuit */
|
||||||
sngss7_span = ftdmchan->span->mod_data;
|
sngss7_span = ftdmchan->span->signal_data;
|
||||||
sngss7_span->rx_grs.circuit = circuit;
|
sngss7_span->rx_grs.circuit = circuit;
|
||||||
sngss7_span->rx_grs.range = range;
|
sngss7_span->rx_grs.range = range;
|
||||||
|
|
||||||
|
@ -1758,7 +1758,7 @@ ftdm_status_t handle_grs_rsp(uint32_t suInstId, uint32_t spInstId, uint32_t circ
|
||||||
}
|
}
|
||||||
|
|
||||||
/* fill in the span structure for this circuit */
|
/* fill in the span structure for this circuit */
|
||||||
sngss7_span = ftdmchan->span->mod_data;
|
sngss7_span = ftdmchan->span->signal_data;
|
||||||
sngss7_span->rx_gra.circuit = circuit;
|
sngss7_span->rx_gra.circuit = circuit;
|
||||||
sngss7_span->rx_gra.range = range;
|
sngss7_span->rx_gra.range = range;
|
||||||
|
|
||||||
|
@ -1866,7 +1866,7 @@ ftdm_status_t handle_ucic(uint32_t suInstId, uint32_t spInstId, uint32_t circuit
|
||||||
}
|
}
|
||||||
|
|
||||||
/* check if we just sent a GRS request...*/
|
/* check if we just sent a GRS request...*/
|
||||||
sngss7_span = ftdmchan->span->mod_data;
|
sngss7_span = ftdmchan->span->signal_data;
|
||||||
if (sngss7_span->tx_grs.circuit > 0) {
|
if (sngss7_span->tx_grs.circuit > 0) {
|
||||||
/* we need to put all circuits on this UCIC */
|
/* we need to put all circuits on this UCIC */
|
||||||
sngss7_span->ucic.circuit = sngss7_span->tx_grs.circuit;
|
sngss7_span->ucic.circuit = sngss7_span->tx_grs.circuit;
|
||||||
|
@ -1917,7 +1917,7 @@ ftdm_status_t handle_cgb_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
|
||||||
}
|
}
|
||||||
|
|
||||||
/* grab the span info */
|
/* grab the span info */
|
||||||
sngss7_span = ftdmchan->span->mod_data;
|
sngss7_span = ftdmchan->span->signal_data;
|
||||||
|
|
||||||
/* figure out what type of block needs to be applied */
|
/* figure out what type of block needs to be applied */
|
||||||
if ((siStaEvnt->cgsmti.eh.pres == PRSNT_NODEF) && (siStaEvnt->cgsmti.typeInd.pres == PRSNT_NODEF)) {
|
if ((siStaEvnt->cgsmti.eh.pres == PRSNT_NODEF) && (siStaEvnt->cgsmti.typeInd.pres == PRSNT_NODEF)) {
|
||||||
|
@ -2058,7 +2058,7 @@ ftdm_status_t handle_cgu_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
|
||||||
}
|
}
|
||||||
|
|
||||||
/* grab the span info */
|
/* grab the span info */
|
||||||
sngss7_span = ftdmchan->span->mod_data;
|
sngss7_span = ftdmchan->span->signal_data;
|
||||||
|
|
||||||
/* figure out what type of block needs to be applied */
|
/* figure out what type of block needs to be applied */
|
||||||
if ((siStaEvnt->cgsmti.eh.pres == PRSNT_NODEF) && (siStaEvnt->cgsmti.typeInd.pres == PRSNT_NODEF)) {
|
if ((siStaEvnt->cgsmti.eh.pres == PRSNT_NODEF) && (siStaEvnt->cgsmti.typeInd.pres == PRSNT_NODEF)) {
|
||||||
|
|
|
@ -90,7 +90,7 @@ void sngss7_con_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiCo
|
||||||
memcpy(&sngss7_event->event.siConEvnt, siConEvnt, sizeof(*siConEvnt));
|
memcpy(&sngss7_event->event.siConEvnt, siConEvnt, sizeof(*siConEvnt));
|
||||||
|
|
||||||
/* enqueue this event */
|
/* enqueue this event */
|
||||||
ftdm_queue_enqueue(((sngss7_span_data_t*)sngss7_info->ftdmchan->span->mod_data)->event_queue, sngss7_event);
|
ftdm_queue_enqueue(((sngss7_span_data_t*)sngss7_info->ftdmchan->span->signal_data)->event_queue, sngss7_event);
|
||||||
|
|
||||||
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
|
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
|
||||||
}
|
}
|
||||||
|
@ -128,7 +128,7 @@ void sngss7_con_cfm(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiCo
|
||||||
memcpy(&sngss7_event->event.siConEvnt, siConEvnt, sizeof(*siConEvnt));
|
memcpy(&sngss7_event->event.siConEvnt, siConEvnt, sizeof(*siConEvnt));
|
||||||
|
|
||||||
/* enqueue this event */
|
/* enqueue this event */
|
||||||
ftdm_queue_enqueue(((sngss7_span_data_t*)sngss7_info->ftdmchan->span->mod_data)->event_queue, sngss7_event);
|
ftdm_queue_enqueue(((sngss7_span_data_t*)sngss7_info->ftdmchan->span->signal_data)->event_queue, sngss7_event);
|
||||||
|
|
||||||
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
|
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
|
||||||
}
|
}
|
||||||
|
@ -167,7 +167,7 @@ void sngss7_con_sta(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiCn
|
||||||
memcpy(&sngss7_event->event.siCnStEvnt, siCnStEvnt, sizeof(*siCnStEvnt));
|
memcpy(&sngss7_event->event.siCnStEvnt, siCnStEvnt, sizeof(*siCnStEvnt));
|
||||||
|
|
||||||
/* enqueue this event */
|
/* enqueue this event */
|
||||||
ftdm_queue_enqueue(((sngss7_span_data_t*)sngss7_info->ftdmchan->span->mod_data)->event_queue, sngss7_event);
|
ftdm_queue_enqueue(((sngss7_span_data_t*)sngss7_info->ftdmchan->span->signal_data)->event_queue, sngss7_event);
|
||||||
|
|
||||||
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
|
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
|
||||||
}
|
}
|
||||||
|
@ -205,7 +205,7 @@ void sngss7_rel_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiRe
|
||||||
memcpy(&sngss7_event->event.siRelEvnt, siRelEvnt, sizeof(*siRelEvnt));
|
memcpy(&sngss7_event->event.siRelEvnt, siRelEvnt, sizeof(*siRelEvnt));
|
||||||
|
|
||||||
/* enqueue this event */
|
/* enqueue this event */
|
||||||
ftdm_queue_enqueue(((sngss7_span_data_t*)sngss7_info->ftdmchan->span->mod_data)->event_queue, sngss7_event);
|
ftdm_queue_enqueue(((sngss7_span_data_t*)sngss7_info->ftdmchan->span->signal_data)->event_queue, sngss7_event);
|
||||||
|
|
||||||
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
|
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
|
||||||
}
|
}
|
||||||
|
@ -243,7 +243,7 @@ void sngss7_rel_cfm(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiRe
|
||||||
memcpy(&sngss7_event->event.siRelEvnt, siRelEvnt, sizeof(*siRelEvnt));
|
memcpy(&sngss7_event->event.siRelEvnt, siRelEvnt, sizeof(*siRelEvnt));
|
||||||
|
|
||||||
/* enqueue this event */
|
/* enqueue this event */
|
||||||
ftdm_queue_enqueue(((sngss7_span_data_t*)sngss7_info->ftdmchan->span->mod_data)->event_queue, sngss7_event);
|
ftdm_queue_enqueue(((sngss7_span_data_t*)sngss7_info->ftdmchan->span->signal_data)->event_queue, sngss7_event);
|
||||||
|
|
||||||
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
|
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
|
||||||
}
|
}
|
||||||
|
@ -281,7 +281,7 @@ void sngss7_dat_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiIn
|
||||||
memcpy(&sngss7_event->event.siInfoEvnt, siInfoEvnt, sizeof(*siInfoEvnt));
|
memcpy(&sngss7_event->event.siInfoEvnt, siInfoEvnt, sizeof(*siInfoEvnt));
|
||||||
|
|
||||||
/* enqueue this event */
|
/* enqueue this event */
|
||||||
ftdm_queue_enqueue(((sngss7_span_data_t*)sngss7_info->ftdmchan->span->mod_data)->event_queue, sngss7_event);
|
ftdm_queue_enqueue(((sngss7_span_data_t*)sngss7_info->ftdmchan->span->signal_data)->event_queue, sngss7_event);
|
||||||
|
|
||||||
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
|
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
|
||||||
}
|
}
|
||||||
|
@ -320,7 +320,7 @@ void sngss7_fac_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, uint
|
||||||
memcpy(&sngss7_event->event.siFacEvnt, siFacEvnt, sizeof(*siFacEvnt));
|
memcpy(&sngss7_event->event.siFacEvnt, siFacEvnt, sizeof(*siFacEvnt));
|
||||||
|
|
||||||
/* enqueue this event */
|
/* enqueue this event */
|
||||||
ftdm_queue_enqueue(((sngss7_span_data_t*)sngss7_info->ftdmchan->span->mod_data)->event_queue, sngss7_event);
|
ftdm_queue_enqueue(((sngss7_span_data_t*)sngss7_info->ftdmchan->span->signal_data)->event_queue, sngss7_event);
|
||||||
|
|
||||||
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
|
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
|
||||||
}
|
}
|
||||||
|
@ -359,7 +359,7 @@ void sngss7_fac_cfm(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, uint
|
||||||
memcpy(&sngss7_event->event.siFacEvnt, siFacEvnt, sizeof(*siFacEvnt));
|
memcpy(&sngss7_event->event.siFacEvnt, siFacEvnt, sizeof(*siFacEvnt));
|
||||||
|
|
||||||
/* enqueue this event */
|
/* enqueue this event */
|
||||||
ftdm_queue_enqueue(((sngss7_span_data_t*)sngss7_info->ftdmchan->span->mod_data)->event_queue, sngss7_event);
|
ftdm_queue_enqueue(((sngss7_span_data_t*)sngss7_info->ftdmchan->span->signal_data)->event_queue, sngss7_event);
|
||||||
|
|
||||||
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
|
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
|
||||||
}
|
}
|
||||||
|
@ -396,7 +396,7 @@ void sngss7_umsg_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit)
|
||||||
sngss7_event->event_id = SNGSS7_UMSG_IND_EVENT;
|
sngss7_event->event_id = SNGSS7_UMSG_IND_EVENT;
|
||||||
|
|
||||||
/* enqueue this event */
|
/* enqueue this event */
|
||||||
ftdm_queue_enqueue(((sngss7_span_data_t*)sngss7_info->ftdmchan->span->mod_data)->event_queue, sngss7_event);
|
ftdm_queue_enqueue(((sngss7_span_data_t*)sngss7_info->ftdmchan->span->signal_data)->event_queue, sngss7_event);
|
||||||
|
|
||||||
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
|
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
|
||||||
|
|
||||||
|
@ -438,7 +438,7 @@ void sngss7_sta_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, uint
|
||||||
}
|
}
|
||||||
|
|
||||||
/* enqueue this event */
|
/* enqueue this event */
|
||||||
ftdm_queue_enqueue(((sngss7_span_data_t*)sngss7_info->ftdmchan->span->mod_data)->event_queue, sngss7_event);
|
ftdm_queue_enqueue(((sngss7_span_data_t*)sngss7_info->ftdmchan->span->signal_data)->event_queue, sngss7_event);
|
||||||
|
|
||||||
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
|
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
|
||||||
}
|
}
|
||||||
|
@ -478,7 +478,7 @@ void sngss7_susp_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiS
|
||||||
}
|
}
|
||||||
|
|
||||||
/* enqueue this event */
|
/* enqueue this event */
|
||||||
ftdm_queue_enqueue(((sngss7_span_data_t*)sngss7_info->ftdmchan->span->mod_data)->event_queue, sngss7_event);
|
ftdm_queue_enqueue(((sngss7_span_data_t*)sngss7_info->ftdmchan->span->signal_data)->event_queue, sngss7_event);
|
||||||
|
|
||||||
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
|
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
|
||||||
|
|
||||||
|
@ -519,7 +519,7 @@ void sngss7_resm_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiR
|
||||||
}
|
}
|
||||||
|
|
||||||
/* enqueue this event */
|
/* enqueue this event */
|
||||||
ftdm_queue_enqueue(((sngss7_span_data_t*)sngss7_info->ftdmchan->span->mod_data)->event_queue, sngss7_event);
|
ftdm_queue_enqueue(((sngss7_span_data_t*)sngss7_info->ftdmchan->span->signal_data)->event_queue, sngss7_event);
|
||||||
|
|
||||||
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
|
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
|
||||||
|
|
||||||
|
@ -560,7 +560,7 @@ void sngss7_ssp_sta_cfm(uint32_t infId)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* enqueue this event */
|
/* enqueue this event */
|
||||||
ftdm_queue_enqueue(((sngss7_span_data_t*)sngss7_info->ftdmchan->span->mod_data)->event_queue, sngss7_event);
|
ftdm_queue_enqueue(((sngss7_span_data_t*)sngss7_info->ftdmchan->span->signal_data)->event_queue, sngss7_event);
|
||||||
#endif
|
#endif
|
||||||
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
|
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
|
||||||
|
|
||||||
|
|
|
@ -275,7 +275,7 @@ static void *ftdm_sangoma_ss7_run(ftdm_thread_t * me, void *obj)
|
||||||
ftdm_span_t *ftdmspan = (ftdm_span_t *) obj;
|
ftdm_span_t *ftdmspan = (ftdm_span_t *) obj;
|
||||||
ftdm_channel_t *ftdmchan = NULL;
|
ftdm_channel_t *ftdmchan = NULL;
|
||||||
sngss7_event_data_t *sngss7_event = NULL;
|
sngss7_event_data_t *sngss7_event = NULL;
|
||||||
sngss7_span_data_t *sngss7_span = (sngss7_span_data_t *)ftdmspan->mod_data;
|
sngss7_span_data_t *sngss7_span = (sngss7_span_data_t *)ftdmspan->signal_data;
|
||||||
|
|
||||||
ftdm_log (FTDM_LOG_INFO, "ftmod_sangoma_ss7 monitor thread for span=%u started.\n", ftdmspan->span_id);
|
ftdm_log (FTDM_LOG_INFO, "ftmod_sangoma_ss7 monitor thread for span=%u started.\n", ftdmspan->span_id);
|
||||||
|
|
||||||
|
@ -788,7 +788,7 @@ void ftdm_sangoma_ss7_process_state_change (ftdm_channel_t * ftdmchan)
|
||||||
/* check if this is the base circuit and send out the GRA
|
/* check if this is the base circuit and send out the GRA
|
||||||
* we insure that this is the last circuit to have the state change queued
|
* we insure that this is the last circuit to have the state change queued
|
||||||
*/
|
*/
|
||||||
sngss7_span_data_t *span = ftdmchan->span->mod_data;
|
sngss7_span_data_t *span = ftdmchan->span->signal_data;
|
||||||
if (span->rx_grs.circuit == sngss7_info->circuit->id) {
|
if (span->rx_grs.circuit == sngss7_info->circuit->id) {
|
||||||
/* send out the GRA */
|
/* send out the GRA */
|
||||||
ft_to_sngss7_gra(ftdmchan);
|
ft_to_sngss7_gra(ftdmchan);
|
||||||
|
@ -1350,7 +1350,7 @@ static ftdm_status_t ftdm_sangoma_ss7_start(ftdm_span_t * span)
|
||||||
ftdmchan = span->channels[x];
|
ftdmchan = span->channels[x];
|
||||||
if (ftdmchan->call_data == NULL) continue;
|
if (ftdmchan->call_data == NULL) continue;
|
||||||
sngss7_info = ftdmchan->call_data;
|
sngss7_info = ftdmchan->call_data;
|
||||||
sngss7_span = ftdmchan->span->mod_data;
|
sngss7_span = ftdmchan->span->signal_data;
|
||||||
sngss7_intf = &g_ftdm_sngss7_data.cfg.isupIntf[sngss7_info->circuit->infId];
|
sngss7_intf = &g_ftdm_sngss7_data.cfg.isupIntf[sngss7_info->circuit->infId];
|
||||||
|
|
||||||
|
|
||||||
|
@ -1474,7 +1474,7 @@ static FIO_CONFIGURE_SPAN_SIGNALING_FUNCTION(ftdm_sangoma_ss7_span_config)
|
||||||
span->get_channel_sig_status = ftdm_sangoma_ss7_get_sig_status;
|
span->get_channel_sig_status = ftdm_sangoma_ss7_get_sig_status;
|
||||||
span->set_channel_sig_status = ftdm_sangoma_ss7_set_sig_status;
|
span->set_channel_sig_status = ftdm_sangoma_ss7_set_sig_status;
|
||||||
span->state_map = &sangoma_ss7_state_map;
|
span->state_map = &sangoma_ss7_state_map;
|
||||||
span->mod_data = ss7_span_info;
|
span->signal_data = ss7_span_info;
|
||||||
|
|
||||||
/* set the flag to indicate that this span uses channel state change queues */
|
/* set the flag to indicate that this span uses channel state change queues */
|
||||||
ftdm_set_flag (span, FTDM_SPAN_USE_CHAN_QUEUE);
|
ftdm_set_flag (span, FTDM_SPAN_USE_CHAN_QUEUE);
|
||||||
|
|
|
@ -619,7 +619,7 @@ void ft_to_sngss7_gra (ftdm_channel_t * ftdmchan)
|
||||||
{
|
{
|
||||||
SS7_FUNC_TRACE_ENTER (__FUNCTION__);
|
SS7_FUNC_TRACE_ENTER (__FUNCTION__);
|
||||||
|
|
||||||
sngss7_span_data_t *sngss7_span = ftdmchan->span->mod_data;
|
sngss7_span_data_t *sngss7_span = ftdmchan->span->signal_data;
|
||||||
sngss7_chan_data_t *sngss7_info = ftdmchan->call_data;
|
sngss7_chan_data_t *sngss7_info = ftdmchan->call_data;
|
||||||
SiStaEvnt gra;
|
SiStaEvnt gra;
|
||||||
|
|
||||||
|
@ -663,7 +663,7 @@ void ft_to_sngss7_grs (ftdm_channel_t * ftdmchan)
|
||||||
{
|
{
|
||||||
SS7_FUNC_TRACE_ENTER (__FUNCTION__);
|
SS7_FUNC_TRACE_ENTER (__FUNCTION__);
|
||||||
|
|
||||||
sngss7_span_data_t *sngss7_span = ftdmchan->span->mod_data;
|
sngss7_span_data_t *sngss7_span = ftdmchan->span->signal_data;
|
||||||
sngss7_chan_data_t *sngss7_info = ftdmchan->call_data;
|
sngss7_chan_data_t *sngss7_info = ftdmchan->call_data;
|
||||||
|
|
||||||
SiStaEvnt grs;
|
SiStaEvnt grs;
|
||||||
|
@ -696,7 +696,7 @@ void ft_to_sngss7_cgba(ftdm_channel_t * ftdmchan)
|
||||||
{
|
{
|
||||||
SS7_FUNC_TRACE_ENTER (__FUNCTION__);
|
SS7_FUNC_TRACE_ENTER (__FUNCTION__);
|
||||||
|
|
||||||
sngss7_span_data_t *sngss7_span = ftdmchan->span->mod_data;
|
sngss7_span_data_t *sngss7_span = ftdmchan->span->signal_data;
|
||||||
sngss7_chan_data_t *sngss7_info = ftdmchan->call_data;
|
sngss7_chan_data_t *sngss7_info = ftdmchan->call_data;
|
||||||
int x = 0;
|
int x = 0;
|
||||||
|
|
||||||
|
@ -745,7 +745,7 @@ void ft_to_sngss7_cgua(ftdm_channel_t * ftdmchan)
|
||||||
{
|
{
|
||||||
SS7_FUNC_TRACE_ENTER (__FUNCTION__);
|
SS7_FUNC_TRACE_ENTER (__FUNCTION__);
|
||||||
|
|
||||||
sngss7_span_data_t *sngss7_span = ftdmchan->span->mod_data;
|
sngss7_span_data_t *sngss7_span = ftdmchan->span->signal_data;
|
||||||
sngss7_chan_data_t *sngss7_info = ftdmchan->call_data;
|
sngss7_chan_data_t *sngss7_info = ftdmchan->call_data;
|
||||||
int x = 0;
|
int x = 0;
|
||||||
|
|
||||||
|
@ -794,7 +794,7 @@ void ft_to_sngss7_cgb(ftdm_channel_t * ftdmchan)
|
||||||
{
|
{
|
||||||
SS7_FUNC_TRACE_ENTER (__FUNCTION__);
|
SS7_FUNC_TRACE_ENTER (__FUNCTION__);
|
||||||
|
|
||||||
sngss7_span_data_t *sngss7_span = ftdmchan->span->mod_data;
|
sngss7_span_data_t *sngss7_span = ftdmchan->span->signal_data;
|
||||||
sngss7_chan_data_t *sngss7_info = ftdmchan->call_data;
|
sngss7_chan_data_t *sngss7_info = ftdmchan->call_data;
|
||||||
SiStaEvnt cgb;
|
SiStaEvnt cgb;
|
||||||
int x = 0;
|
int x = 0;
|
||||||
|
@ -844,7 +844,7 @@ void ft_to_sngss7_cgu(ftdm_channel_t * ftdmchan)
|
||||||
{
|
{
|
||||||
SS7_FUNC_TRACE_ENTER (__FUNCTION__);
|
SS7_FUNC_TRACE_ENTER (__FUNCTION__);
|
||||||
|
|
||||||
sngss7_span_data_t *sngss7_span = ftdmchan->span->mod_data;
|
sngss7_span_data_t *sngss7_span = ftdmchan->span->signal_data;
|
||||||
sngss7_chan_data_t *sngss7_info = ftdmchan->call_data;
|
sngss7_chan_data_t *sngss7_info = ftdmchan->call_data;
|
||||||
SiStaEvnt cgu;
|
SiStaEvnt cgu;
|
||||||
int x = 0;
|
int x = 0;
|
||||||
|
|
|
@ -513,7 +513,7 @@ ftdm_status_t check_if_rx_grs_started(ftdm_span_t *ftdmspan)
|
||||||
{
|
{
|
||||||
ftdm_channel_t *ftdmchan = NULL;
|
ftdm_channel_t *ftdmchan = NULL;
|
||||||
sngss7_chan_data_t *sngss7_info = NULL;
|
sngss7_chan_data_t *sngss7_info = NULL;
|
||||||
sngss7_span_data_t *sngss7_span = (sngss7_span_data_t *)ftdmspan->mod_data;
|
sngss7_span_data_t *sngss7_span = (sngss7_span_data_t *)ftdmspan->signal_data;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for ( i = sngss7_span->rx_grs.circuit; i < (sngss7_span->rx_grs.circuit + sngss7_span->rx_grs.range + 1); i++) {
|
for ( i = sngss7_span->rx_grs.circuit; i < (sngss7_span->rx_grs.circuit + sngss7_span->rx_grs.range + 1); i++) {
|
||||||
|
@ -575,7 +575,7 @@ ftdm_status_t check_if_rx_grs_processed(ftdm_span_t *ftdmspan)
|
||||||
{
|
{
|
||||||
ftdm_channel_t *ftdmchan = NULL;
|
ftdm_channel_t *ftdmchan = NULL;
|
||||||
sngss7_chan_data_t *sngss7_info = NULL;
|
sngss7_chan_data_t *sngss7_info = NULL;
|
||||||
sngss7_span_data_t *sngss7_span = (sngss7_span_data_t *)ftdmspan->mod_data;
|
sngss7_span_data_t *sngss7_span = (sngss7_span_data_t *)ftdmspan->signal_data;
|
||||||
int i;
|
int i;
|
||||||
int byte = 0;
|
int byte = 0;
|
||||||
int bit = 0;
|
int bit = 0;
|
||||||
|
@ -667,7 +667,7 @@ ftdm_status_t check_if_rx_gra_started(ftdm_span_t *ftdmspan)
|
||||||
{
|
{
|
||||||
ftdm_channel_t *ftdmchan = NULL;
|
ftdm_channel_t *ftdmchan = NULL;
|
||||||
sngss7_chan_data_t *sngss7_info = NULL;
|
sngss7_chan_data_t *sngss7_info = NULL;
|
||||||
sngss7_span_data_t *sngss7_span = (sngss7_span_data_t *)ftdmspan->mod_data;
|
sngss7_span_data_t *sngss7_span = (sngss7_span_data_t *)ftdmspan->signal_data;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = sngss7_span->rx_gra.circuit; i < (sngss7_span->rx_gra.circuit + sngss7_span->rx_gra.range + 1); i++) {
|
for (i = sngss7_span->rx_gra.circuit; i < (sngss7_span->rx_gra.circuit + sngss7_span->rx_gra.range + 1); i++) {
|
||||||
|
@ -817,7 +817,7 @@ ftdm_status_t process_span_ucic(ftdm_span_t *ftdmspan)
|
||||||
{
|
{
|
||||||
ftdm_channel_t *ftdmchan = NULL;
|
ftdm_channel_t *ftdmchan = NULL;
|
||||||
sngss7_chan_data_t *sngss7_info = NULL;
|
sngss7_chan_data_t *sngss7_info = NULL;
|
||||||
sngss7_span_data_t *sngss7_span = (sngss7_span_data_t *)ftdmspan->mod_data;
|
sngss7_span_data_t *sngss7_span = (sngss7_span_data_t *)ftdmspan->signal_data;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = sngss7_span->ucic.circuit; i < (sngss7_span->ucic.circuit + sngss7_span->ucic.range + 1); i++) {
|
for (i = sngss7_span->ucic.circuit; i < (sngss7_span->ucic.circuit + sngss7_span->ucic.range + 1); i++) {
|
||||||
|
@ -869,7 +869,7 @@ ftdm_status_t clear_rx_grs_flags(sngss7_chan_data_t *sngss7_info)
|
||||||
ftdm_status_t clear_rx_grs_data(sngss7_chan_data_t *sngss7_info)
|
ftdm_status_t clear_rx_grs_data(sngss7_chan_data_t *sngss7_info)
|
||||||
{
|
{
|
||||||
ftdm_channel_t *ftdmchan = sngss7_info->ftdmchan;
|
ftdm_channel_t *ftdmchan = sngss7_info->ftdmchan;
|
||||||
sngss7_span_data_t *sngss7_span = ftdmchan->span->mod_data;
|
sngss7_span_data_t *sngss7_span = ftdmchan->span->signal_data;
|
||||||
|
|
||||||
/* clear the rx_grs data fields */
|
/* clear the rx_grs data fields */
|
||||||
memset(&sngss7_span->rx_grs, 0x0, sizeof(sngss7_group_data_t));
|
memset(&sngss7_span->rx_grs, 0x0, sizeof(sngss7_group_data_t));
|
||||||
|
@ -881,7 +881,7 @@ ftdm_status_t clear_rx_grs_data(sngss7_chan_data_t *sngss7_info)
|
||||||
ftdm_status_t clear_rx_gra_data(sngss7_chan_data_t *sngss7_info)
|
ftdm_status_t clear_rx_gra_data(sngss7_chan_data_t *sngss7_info)
|
||||||
{
|
{
|
||||||
ftdm_channel_t *ftdmchan = sngss7_info->ftdmchan;
|
ftdm_channel_t *ftdmchan = sngss7_info->ftdmchan;
|
||||||
sngss7_span_data_t *sngss7_span = ftdmchan->span->mod_data;
|
sngss7_span_data_t *sngss7_span = ftdmchan->span->signal_data;
|
||||||
|
|
||||||
/* clear the rx_grs data fields */
|
/* clear the rx_grs data fields */
|
||||||
memset(&sngss7_span->rx_gra, 0x0, sizeof(sngss7_group_data_t));
|
memset(&sngss7_span->rx_gra, 0x0, sizeof(sngss7_group_data_t));
|
||||||
|
@ -904,7 +904,7 @@ ftdm_status_t clear_tx_grs_flags(sngss7_chan_data_t *sngss7_info)
|
||||||
ftdm_status_t clear_tx_grs_data(sngss7_chan_data_t *sngss7_info)
|
ftdm_status_t clear_tx_grs_data(sngss7_chan_data_t *sngss7_info)
|
||||||
{
|
{
|
||||||
ftdm_channel_t *ftdmchan = sngss7_info->ftdmchan;
|
ftdm_channel_t *ftdmchan = sngss7_info->ftdmchan;
|
||||||
sngss7_span_data_t *sngss7_span = ftdmchan->span->mod_data;
|
sngss7_span_data_t *sngss7_span = ftdmchan->span->signal_data;
|
||||||
|
|
||||||
/* clear the rx_grs data fields */
|
/* clear the rx_grs data fields */
|
||||||
memset(&sngss7_span->tx_grs, 0x0, sizeof(sngss7_group_data_t));
|
memset(&sngss7_span->tx_grs, 0x0, sizeof(sngss7_group_data_t));
|
||||||
|
|
|
@ -2121,7 +2121,7 @@ static int ftmod_ss7_fill_in_circuits(sng_isupCkt_t *isupCkt)
|
||||||
ftdmchan->call_data = ss7_info;
|
ftdmchan->call_data = ss7_info;
|
||||||
|
|
||||||
/* prepare the timer structures */
|
/* prepare the timer structures */
|
||||||
ss7_info->t35.sched = ((sngss7_span_data_t *)isupCkt->span->mod_data)->sched;
|
ss7_info->t35.sched = ((sngss7_span_data_t *)isupCkt->span->signal_data)->sched;
|
||||||
ss7_info->t35.counter = 1;
|
ss7_info->t35.counter = 1;
|
||||||
ss7_info->t35.beat = g_ftdm_sngss7_data.cfg.isupIntf[isupCkt->isupInf].t35*100; /* beat is in ms, t35 is in 100ms */
|
ss7_info->t35.beat = g_ftdm_sngss7_data.cfg.isupIntf[isupCkt->isupInf].t35*100; /* beat is in ms, t35 is in 100ms */
|
||||||
ss7_info->t35.callback = handle_isup_t35;
|
ss7_info->t35.callback = handle_isup_t35;
|
||||||
|
|
Loading…
Reference in New Issue