Only look at lower 16 bits of FreeTDM channel numbers

FreeTDM sets some higher-ordre bits in the channel number to indicate
certain situations.  The actual channel number in the E1 multiplex
is still only in the bottom 16 bits.
This commit is contained in:
Harald Welte 2019-12-29 00:22:44 +01:00
parent f9990221e6
commit 5621e2a5ed
1 changed files with 1 additions and 0 deletions

View File

@ -2446,6 +2446,7 @@ FT_DECLARE(ftdm_caller_data_t *) ftdm_channel_get_caller_data(ftdm_channel_t *ft
FT_DECLARE(ftdm_channel_t *) ftdm_span_get_channel(const ftdm_span_t *span, uint32_t chanid)
{
ftdm_channel_t *chan;
chanid &= 0xffff; /* mask off libpri "ds1_explicit" bit & co */
ftdm_mutex_lock(span->mutex);
if (chanid == 0 || chanid > span->chan_count) {
ftdm_mutex_unlock(span->mutex);