From 210c850a3663eaf333ad44270415220aa1fe9d70 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sat, 12 Dec 2009 20:58:20 +0100 Subject: If we're trying to allocate TCH/H but don't have it, fallback to TCH/F The rationale is as following: If we have NECI=1, then the phone will request a channel with CHREQ "0100xxxx Originating speech call from dual-rate mobile station when TCH/H is sufficient and supported by the MS for speech calls", then we will try to allocate a TCH/H [as it is sufficient]. However, if there are no free TCH/H slots on the BTS, we abandon and can't handle the MO call at all :( --- openbsc/src/chan_alloc.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'openbsc') diff --git a/openbsc/src/chan_alloc.c b/openbsc/src/chan_alloc.c index 7ba679c87..6bf65f325 100644 --- a/openbsc/src/chan_alloc.c +++ b/openbsc/src/chan_alloc.c @@ -203,6 +203,9 @@ struct gsm_lchan *lchan_alloc(struct gsm_bts *bts, enum gsm_chan_t type) break; case GSM_LCHAN_TCH_H: lchan =_lc_find_bts(bts, GSM_PCHAN_TCH_H); + /* If we don't have TCH/H available, fall-back to TCH/F */ + if (!lchan) + lchan = _lc_find_bts(bts, GSM_PCHAN_TCH_F); break; default: fprintf(stderr, "Unknown gsm_chan_t %u\n", type); -- cgit v1.2.3