freetdm: ftmod_r2 - implemented ftdm_r2_get_channel_sig_status()
This commit is contained in:
parent
f5a9adae92
commit
c75e5150d1
|
@ -397,6 +397,17 @@ static ftdm_status_t ftdm_r2_stop(ftdm_span_t *span)
|
||||||
return FTDM_SUCCESS;
|
return FTDM_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static FIO_CHANNEL_GET_SIG_STATUS_FUNCTION(ftdm_r2_get_channel_sig_status)
|
||||||
|
{
|
||||||
|
if (ftdm_test_flag(ftdmchan, FTDM_CHANNEL_SIG_UP)) {
|
||||||
|
*status = FTDM_SIG_STATE_UP;
|
||||||
|
} else {
|
||||||
|
*status = FTDM_SIG_STATE_DOWN;
|
||||||
|
}
|
||||||
|
|
||||||
|
return FTDM_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
/* always called from the monitor thread */
|
/* always called from the monitor thread */
|
||||||
static void ftdm_r2_on_call_init(openr2_chan_t *r2chan)
|
static void ftdm_r2_on_call_init(openr2_chan_t *r2chan)
|
||||||
{
|
{
|
||||||
|
@ -1250,6 +1261,9 @@ static FIO_CONFIGURE_SPAN_SIGNALING_FUNCTION(ftdm_r2_configure_span_signaling)
|
||||||
span->stop = ftdm_r2_stop;
|
span->stop = ftdm_r2_stop;
|
||||||
span->sig_read = NULL;
|
span->sig_read = NULL;
|
||||||
|
|
||||||
|
/* let the core set the states, we just read them */
|
||||||
|
span->get_channel_sig_status = ftdm_r2_get_channel_sig_status;
|
||||||
|
|
||||||
span->signal_cb = sig_cb;
|
span->signal_cb = sig_cb;
|
||||||
span->signal_type = FTDM_SIGTYPE_R2;
|
span->signal_type = FTDM_SIGTYPE_R2;
|
||||||
span->signal_data = r2data;
|
span->signal_data = r2data;
|
||||||
|
|
Loading…
Reference in New Issue