Skip to content

Commit 5621e2a

Browse files
author
Harald Welte
committed
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.
1 parent f999022 commit 5621e2a

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

libs/freetdm/src/ftdm_io.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2446,6 +2446,7 @@ FT_DECLARE(ftdm_caller_data_t *) ftdm_channel_get_caller_data(ftdm_channel_t *ft
24462446
FT_DECLARE(ftdm_channel_t *) ftdm_span_get_channel(const ftdm_span_t *span, uint32_t chanid)
24472447
{
24482448
ftdm_channel_t *chan;
2449+
chanid &= 0xffff; /* mask off libpri "ds1_explicit" bit & co */
24492450
ftdm_mutex_lock(span->mutex);
24502451
if (chanid == 0 || chanid > span->chan_count) {
24512452
ftdm_mutex_unlock(span->mutex);

0 commit comments

Comments
 (0)