From a4c63b0cdba82a453875d9208d9dad0b9b530d56 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 18 May 2014 22:23:26 +0200 Subject: [PATCH] chan_alloc: Fall-back to TCH/H, if we cannot find a TCH/F I'm not entirely sure if this is the best approach. However, there are phones that send a RACH request for TCH/F on MO calls, even though they actually do support TCH/H channels. --- openbsc/src/libbsc/chan_alloc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/openbsc/src/libbsc/chan_alloc.c b/openbsc/src/libbsc/chan_alloc.c index 9b74329f4..f6eb5af14 100644 --- a/openbsc/src/libbsc/chan_alloc.c +++ b/openbsc/src/libbsc/chan_alloc.c @@ -260,6 +260,11 @@ struct gsm_lchan *lchan_alloc(struct gsm_bts *bts, enum gsm_chan_t type, break; case GSM_LCHAN_TCH_F: lchan = _lc_find_bts(bts, GSM_PCHAN_TCH_F); + /* If we don't have TCH/F available, fall-back to TCH/H */ + if (!lchan) { + lchan = _lc_find_bts(bts, GSM_PCHAN_TCH_H); + type = GSM_LCHAN_TCH_H; + } break; case GSM_LCHAN_TCH_H: lchan =_lc_find_bts(bts, GSM_PCHAN_TCH_H);