path: root/include/osmocom/bsc/codec_pref.h
diff options
authorPhilipp Maier <pmaier@sysmocom.de>2018-10-23 16:05:13 +0200
committerHarald Welte <laforge@gnumonks.org>2018-10-23 18:23:27 +0000
commitbca82edab74678a1af08a50201d916bdcd9b7140 (patch)
treefd6c3d6a19a35524258f09751377be71fb858b59 /include/osmocom/bsc/codec_pref.h
parent5a63cd62aa3b58d1912b9a635101a2aa32911b0b (diff)
codec_pref: also check amr codec rates in check_codec_pref()
The function check_codec_pref() currently only does a basic check over the general codec configuration of bts and msc. However, it does not yet check if the amr codec rate settings for the BTSs contradict the allowed/forbidden amr codec rates of the MSC. When the two settings do contradict AMR would not work, even when everything else is correctly configured. We need to check this on startup to spot configuration problems quickly. - Add function to calculate intersections of struct gsm48_multi_rate_conf variables. - Calculate the intersection between the multi rate config of each BTS with the one of the MSC Change-Id: I3537d1c89e2520d35cc0e150ba8e6d3693e06710 Related: OS#3529
Diffstat (limited to 'include/osmocom/bsc/codec_pref.h')
1 files changed, 4 insertions, 0 deletions
diff --git a/include/osmocom/bsc/codec_pref.h b/include/osmocom/bsc/codec_pref.h
index d62d29ff8..51340c118 100644
--- a/include/osmocom/bsc/codec_pref.h
+++ b/include/osmocom/bsc/codec_pref.h
@@ -22,4 +22,8 @@ void gen_bss_supported_codec_list(struct gsm0808_speech_codec_list *scl,
const struct bsc_msc_data *msc,
const struct gsm_bts *bts);
+int calc_amr_rate_intersection(struct gsm48_multi_rate_conf *c,
+ const struct gsm48_multi_rate_conf *b,
+ const struct gsm48_multi_rate_conf *a);
int check_codec_pref(struct llist_head *mscs);