diff options
author | Philipp Maier <pmaier@sysmocom.de> | 2018-09-21 14:21:50 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2018-10-05 07:58:22 +0000 |
commit | c9a4f697d38b35680938f20928544a734739b185 (patch) | |
tree | 02447f24c7f99783e2f1bf8dd2b6fd690b5a2bb9 /src/osmo-bsc/osmo_bsc_bssap.c | |
parent | 2043db02362ff94463fb8a797724f36bef3e0090 (diff) |
codec_pref: handle S0-S15 in ASSIGNMENT REQUEST
Opposed to all other codecs that are common in GSM, AMR requires a codec
configuration that is expressed by a bitmask (S0 to S15) in the speech
codec list in the ASSIGNMENT REQUEST. Also the BSC acknowledges those
configuration in the ASSIGNMENT COMPLETE message.
At the moment osmo-bsc ignores all incoming configuration bits. The bits
in the ASSIGNMENT COMPLETE speech codec (choosen) field are hardcoded.
- Store the configuration bits while parsing the ASSIGNMENT COMPLETE
- Create an intersection with the configuration that is actually
supported by the BSS
- Return the resulting (chosen) configuration bits with the assignment
complete message.
- Use the (highest of the) agreed codec rates in RSL channel activation.
Change-Id: I2d8ded51b3eb4c003fe2da6f2d6f48d001b73737
Related: OS#3529
Diffstat (limited to 'src/osmo-bsc/osmo_bsc_bssap.c')
-rw-r--r-- | src/osmo-bsc/osmo_bsc_bssap.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index 97daa5cf7..537b85168 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -603,6 +603,7 @@ static int bssmap_handle_assignm_req(struct gsm_subscriber_connection *conn, uint16_t cic = 0; enum gsm48_chan_mode chan_mode = GSM48_CMODE_SIGN; bool full_rate = false; + uint16_t s15_s0 = 0; bool aoip = false; struct sockaddr_storage rtp_addr; struct gsm0808_channel_type ct; @@ -706,9 +707,8 @@ static int bssmap_handle_assignm_req(struct gsm_subscriber_connection *conn, /* Match codec information from the assignment command against the * local preferences of the BSC and BTS */ - rc = match_codec_pref(&chan_mode, &full_rate, &ct, &conn->codec_list, - msc->audio_support, msc->audio_length, - &conn_get_bts(conn)->codec); + rc = match_codec_pref(&chan_mode, &full_rate, &s15_s0, &ct, &conn->codec_list, + msc, conn_get_bts(conn)); if (rc < 0) { LOGP(DMSC, LOGL_ERROR, "No supported audio type found for channel_type =" " { ch_indctr=0x%x, ch_rate_type=0x%x, perm_spch=[ %s] }\n", @@ -730,6 +730,7 @@ static int bssmap_handle_assignm_req(struct gsm_subscriber_connection *conn, .msc_assigned_cic = cic, .chan_mode = chan_mode, .full_rate = full_rate, + .s15_s0 = s15_s0 }; if (aoip) { unsigned int rc = osmo_sockaddr_to_str_and_uint(req.msc_rtp_addr, |