freetdm: added support for skip states, used by sangoma_isdn module
This commit is contained in:
parent
fced79a493
commit
86c484c134
|
@ -2213,10 +2213,10 @@ FT_DECLARE(ftdm_status_t) _ftdm_channel_call_answer(const char *file, const char
|
|||
goto done;
|
||||
}
|
||||
|
||||
#ifndef FREETDM_SKIP_SIG_STATES
|
||||
if (!ftdm_test_flag(ftdmchan->span, FTDM_SPAN_USE_SKIP_STATES)) {
|
||||
/* We will fail RFC's if we not skip states, but some modules apart from ftmod_sangoma_isdn
|
||||
* expect the call to always to go PROGRESS and PROGRESS MEDIA state before going to UP, so
|
||||
* remove this only in netborder branch for now while we update the sig modules */
|
||||
* use FTDM_SPAN_USE_SKIP_STATESfor now while we update the sig modules */
|
||||
|
||||
if (ftdmchan->state < FTDM_CHANNEL_STATE_PROGRESS) {
|
||||
ftdm_channel_set_state(file, func, line, ftdmchan, FTDM_CHANNEL_STATE_PROGRESS, 1);
|
||||
|
@ -2237,7 +2237,7 @@ FT_DECLARE(ftdm_status_t) _ftdm_channel_call_answer(const char *file, const char
|
|||
ftdm_log_chan_msg(ftdmchan, FTDM_LOG_DEBUG, "Ignoring answer because the call has moved to TERMINATING while we're moving to UP\n");
|
||||
goto done;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
ftdm_channel_set_state(file, func, line, ftdmchan, FTDM_CHANNEL_STATE_UP, 1);
|
||||
|
||||
done:
|
||||
|
|
|
@ -1067,6 +1067,7 @@ static FIO_CONFIGURE_SPAN_SIGNALING_FUNCTION(ftdm_sangoma_isdn_span_config)
|
|||
ftdm_set_flag(span, FTDM_SPAN_USE_CHAN_QUEUE);
|
||||
ftdm_set_flag(span, FTDM_SPAN_USE_SIGNALS_QUEUE);
|
||||
ftdm_set_flag(span, FTDM_SPAN_USE_PROCEED_STATE);
|
||||
ftdm_set_flag(span, FTDM_SPAN_USE_SKIP_STATES);
|
||||
|
||||
if (span->trunk_type == FTDM_TRUNK_BRI_PTMP ||
|
||||
span->trunk_type == FTDM_TRUNK_BRI) {
|
||||
|
|
|
@ -184,6 +184,9 @@ typedef enum {
|
|||
FTDM_SPAN_USE_SIGNALS_QUEUE = (1 << 10),
|
||||
/* If this flag is set, channel will be moved to proceed state when calls goes to routing */
|
||||
FTDM_SPAN_USE_PROCEED_STATE = (1 << 11),
|
||||
/* If this flag is set, the signalling module supports jumping directly to state up, without
|
||||
going through PROGRESS/PROGRESS_MEDIA */
|
||||
FTDM_SPAN_USE_SKIP_STATES = (1 << 12),
|
||||
} ftdm_span_flag_t;
|
||||
|
||||
/*! \brief Channel supported features */
|
||||
|
|
Loading…
Reference in New Issue