From 53122b09d0e0890aa656e0d23a879bd61999d4fb Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Thu, 20 Aug 2015 19:10:58 +0200 Subject: mncc: Use the default codec from the built-in mncc mode In case of the RTP bridge mode we need to select the codec ourselves. Rely on the same (incomplete) codec selection that can be done using the mncc-int configuration node. This might gain bearer capabilities support. In case of a SDCCH a TCH/F will be attempted to be assigned. This is an open issue for both modes and there should be a preference for full or half-rate channels somewhere. --- openbsc/src/libmsc/mncc_builtin.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'openbsc/src/libmsc/mncc_builtin.c') diff --git a/openbsc/src/libmsc/mncc_builtin.c b/openbsc/src/libmsc/mncc_builtin.c index 5c3461bea..7d5a7f163 100644 --- a/openbsc/src/libmsc/mncc_builtin.c +++ b/openbsc/src/libmsc/mncc_builtin.c @@ -65,16 +65,21 @@ static struct gsm_call *get_call_ref(uint32_t callref) return NULL; } -static uint8_t determine_lchan_mode(struct gsm_mncc *setup) +uint8_t mncc_codec_for_mode(int lchan_type) { /* FIXME: check codec capabilities of the phone */ - if (setup->lchan_type != GSM_LCHAN_TCH_H) + if (lchan_type != GSM_LCHAN_TCH_H) return mncc_int.def_codec[0]; else return mncc_int.def_codec[1]; } +static uint8_t determine_lchan_mode(struct gsm_mncc *setup) +{ + return mncc_codec_for_mode(setup->lchan_type); +} + /* on incoming call, look up database and send setup to remote subscr. */ static int mncc_setup_ind(struct gsm_call *call, int msg_type, struct gsm_mncc *setup) -- cgit v1.2.3