aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bsc/osmo_bsc_msc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/osmo-bsc/osmo_bsc_msc.c')
-rw-r--r--src/osmo-bsc/osmo_bsc_msc.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/osmo-bsc/osmo_bsc_msc.c b/src/osmo-bsc/osmo_bsc_msc.c
index e00c9ef81..71931e615 100644
--- a/src/osmo-bsc/osmo_bsc_msc.c
+++ b/src/osmo-bsc/osmo_bsc_msc.c
@@ -64,6 +64,7 @@ struct bsc_msc_data *osmo_msc_data_find(struct gsm_network *net, int nr)
struct bsc_msc_data *osmo_msc_data_alloc(struct gsm_network *net, int nr)
{
struct bsc_msc_data *msc_data;
+ unsigned int i;
/* check if there is already one */
msc_data = osmo_msc_data_find(net, nr);
@@ -94,6 +95,27 @@ struct bsc_msc_data *osmo_msc_data_alloc(struct gsm_network *net, int nr)
/* Defaults for the audio setup */
msc_data->amr_conf.m5_90 = 1;
+ /* Allow the full set of possible codecs by default */
+ msc_data->audio_length = 5;
+ msc_data->audio_support =
+ talloc_zero_array(msc_data, struct gsm_audio_support *,
+ msc_data->audio_length);
+ for (i = 0; i < msc_data->audio_length; i++) {
+ msc_data->audio_support[i] =
+ talloc_zero(msc_data->audio_support,
+ struct gsm_audio_support);
+ }
+ msc_data->audio_support[0]->ver = 1;
+ msc_data->audio_support[0]->hr = 0;
+ msc_data->audio_support[1]->ver = 1;
+ msc_data->audio_support[1]->hr = 1;
+ msc_data->audio_support[2]->ver = 2;
+ msc_data->audio_support[2]->hr = 0;
+ msc_data->audio_support[3]->ver = 3;
+ msc_data->audio_support[3]->hr = 0;
+ msc_data->audio_support[4]->ver = 3;
+ msc_data->audio_support[4]->hr = 1;
+
return msc_data;
}