diff --git a/libs/freetdm/src/ftmod/ftmod_analog_em/ftmod_analog_em.c b/libs/freetdm/src/ftmod/ftmod_analog_em/ftmod_analog_em.c index da6aa3bf2a..b08a832b4f 100644 --- a/libs/freetdm/src/ftmod/ftmod_analog_em/ftmod_analog_em.c +++ b/libs/freetdm/src/ftmod/ftmod_analog_em/ftmod_analog_em.c @@ -44,6 +44,8 @@ struct tm * localtime_r(const time_t *clock, struct tm *result); #endif +static FIO_SPAN_SET_SIG_STATUS_FUNCTION(analog_em_set_span_sig_status); + /* check if the given file is a wave file and skip the header if it is */ #define WAVE_CHUNK_ID "RIFF" #define WAVE_FMT "WAVEfmt " @@ -223,6 +225,7 @@ static ftdm_status_t ftdm_analog_em_stop(ftdm_span_t *span) ftdm_analog_em_data_t *analog_data = span->signal_data; ftdm_clear_flag(analog_data, FTDM_ANALOG_EM_RUNNING); ftdm_sleep(100); + analog_em_set_span_sig_status(span, FTDM_SIG_STATE_SUSPENDED); return FTDM_SUCCESS; } @@ -1014,6 +1017,7 @@ static void *ftdm_analog_em_run(ftdm_thread_t *me, void *obj) ftdm_analog_em_data_t *analog_data = span->signal_data; ftdm_log(FTDM_LOG_DEBUG, "ANALOG EM thread starting.\n"); + analog_em_set_span_sig_status(span, FTDM_SIG_STATE_UP); while(ftdm_running() && ftdm_test_flag(analog_data, FTDM_ANALOG_EM_RUNNING)) { int waitms = 10;