mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-26 13:14:14 +00:00
freetdm: improved logic to enable/disable EC on call start/stop
- MFC-R2 requires tone signaling that gets screwed sometimes
if the EC is enabled during call setup.
- EC is now enabled only when switching to a state requiring
media (UP and PROGRESS_MEDIA)
- The logic is aware of EC persist option in Wanpipe
- Improved logging in ftmod_wanpipe to print EC state on startup
This commit is contained in:
1 parent
99cab144b5
commit
1db40e60e4
6 files changed
+70
-41
No files matched your search
@@ -622,6 +622,9 @@ FT_DECLARE(ftdm_status_t) ftdm_span_trigger_signals(const ftdm_span_t *span);
|
||||
/*! \brief clear the tone detector state */
|
||||
FT_DECLARE(void) ftdm_channel_clear_detected_tones(ftdm_channel_t *ftdmchan);
|
||||
|
||||
/* start/stop echo cancelling at the beginning/end of a call */
|
||||
FT_DECLARE(void) ftdm_set_echocancel_call_begin(ftdm_channel_t *chan);
|
||||
FT_DECLARE(void) ftdm_set_echocancel_call_end(ftdm_channel_t *chan);
|
||||
|
||||
/*!
|
||||
\brief Assert condition
|
||||
@@ -677,6 +680,14 @@ FT_DECLARE(void) ftdm_channel_clear_detected_tones(ftdm_channel_t *ftdmchan);
|
||||
#define ftdm_span_lock(span) ftdm_mutex_lock(span->mutex)
|
||||
#define ftdm_span_unlock(span) ftdm_mutex_unlock(span->mutex)
|
||||
|
||||
#define ftdm_test_and_set_media(fchan) \
|
||||
do { \
|
||||
if (!ftdm_test_flag((fchan), FTDM_CHANNEL_MEDIA)) { \
|
||||
ftdm_set_flag((fchan), FTDM_CHANNEL_MEDIA); \
|
||||
ftdm_set_echocancel_call_begin((fchan)); \
|
||||
} \
|
||||
} while (0);
|
||||
|
||||
FT_DECLARE_DATA extern const char *FTDM_LEVEL_NAMES[9];
|
||||
|
||||
static __inline__ void ftdm_abort(void)
|
||||
|
||||
@@ -227,16 +227,11 @@ typedef enum {
|
||||
#define FTDM_CHANNEL_OUTBOUND (1ULL << 18)
|
||||
#define FTDM_CHANNEL_SUSPENDED (1ULL << 19)
|
||||
#define FTDM_CHANNEL_3WAY (1ULL << 20)
|
||||
|
||||
/* this 3 flags are really nonsense used by boost module only, as soon
|
||||
* as we deprecate/delete boost module we can get rid of them
|
||||
* ==================
|
||||
* */
|
||||
#define FTDM_CHANNEL_PROGRESS (1ULL << 21)
|
||||
/*!< There is media on the channel already */
|
||||
#define FTDM_CHANNEL_MEDIA (1ULL << 22)
|
||||
/*!< The channel was answered */
|
||||
#define FTDM_CHANNEL_ANSWERED (1ULL << 23)
|
||||
/* ================== */
|
||||
|
||||
#define FTDM_CHANNEL_MUTE (1ULL << 24)
|
||||
#define FTDM_CHANNEL_USE_RX_GAIN (1ULL << 25)
|
||||
#define FTDM_CHANNEL_USE_TX_GAIN (1ULL << 26)
|
||||
|
||||
Reference in new issue
Block a user