aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bsc/assignment_fsm.c
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2018-09-21 14:21:50 +0200
committerHarald Welte <laforge@gnumonks.org>2018-10-05 07:58:22 +0000
commitc9a4f697d38b35680938f20928544a734739b185 (patch)
tree02447f24c7f99783e2f1bf8dd2b6fd690b5a2bb9 /src/osmo-bsc/assignment_fsm.c
parent2043db02362ff94463fb8a797724f36bef3e0090 (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/assignment_fsm.c')
-rw-r--r--src/osmo-bsc/assignment_fsm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/osmo-bsc/assignment_fsm.c b/src/osmo-bsc/assignment_fsm.c
index 2410adb43..3f553ff3c 100644
--- a/src/osmo-bsc/assignment_fsm.c
+++ b/src/osmo-bsc/assignment_fsm.c
@@ -169,8 +169,8 @@ static void send_assignment_complete(struct gsm_subscriber_connection *conn)
* assignment complete message. */
if (gscon_is_aoip(conn)) {
/* Extrapolate speech codec from speech mode */
- /* FIXME: AMR codec configuration must be derived from lchan1! */
gsm0808_speech_codec_from_chan_type(&sc, perm_spch);
+ sc.cfg = conn->assignment.req.s15_s0;
sc_ptr = &sc;
}
}
@@ -382,6 +382,7 @@ void assignment_fsm_start(struct gsm_subscriber_connection *conn, struct gsm_bts
.activ_for = FOR_ASSIGNMENT,
.for_conn = conn,
.chan_mode = req->chan_mode,
+ .s15_s0 = req->s15_s0,
.requires_voice_stream = conn->assignment.requires_voice_stream,
.msc_assigned_cic = req->msc_assigned_cic,
.old_lchan = conn->lchan,