osmith has uploaded this change for review.
requires_voice_stream -> ch_indctr
Use the full gsm0808_chan_indicator value throughout the lchan related
structs (assignment_fsm_data, gsm_lchan, lchan_activate_info,
lchan_modify_info) instead of reducing it to the boolean
requires_voice_stream.
This is needed so we don't lose the information whether an lchan was
requested for data or speech (both need an rtp stream).
Add a new bsc_requires_rtp_stream function and use it in conditionals like
the previous requires_voice_stream.
Related: OS#4393
Change-Id: I1538c1e6d5cd61559af7c1e2860afd0269dda367
---
M doc/lchan.msc
M include/osmocom/bsc/gsm_08_08.h
M include/osmocom/bsc/gsm_data.h
M include/osmocom/bsc/lchan.h
M src/osmo-bsc/assignment_fsm.c
M src/osmo-bsc/bsc_vty.c
M src/osmo-bsc/gsm_08_08.c
M src/osmo-bsc/handover_fsm.c
M src/osmo-bsc/lchan_fsm.c
M src/osmo-bsc/osmo_bsc_bssap.c
10 files changed, 92 insertions(+), 56 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/22/31622/1
diff --git a/doc/lchan.msc b/doc/lchan.msc
index b35c310..124037e 100644
--- a/doc/lchan.msc
+++ b/doc/lchan.msc
@@ -15,7 +15,7 @@
ts note ts [label="A dyn TS may be in PDCH mode and will asynchronously switch off PDCH first. A
non-dynamic TS is ready immediately."];
|||;
- --- [label="IF requires_voice_stream"];
+ --- [label="IF requires_rtp_stream"];
lchan -> rtp [label="lchan_rtp_fsm_start()"];
rtp abox rtp [label="allocate\n LCHAN_RTP_ST_\nWAIT_MGW_ENDPOINT_\nAVAILABLE"];
--- [label="IF no endpoint-CI yet"];
@@ -29,7 +29,7 @@
rtp note mgwep [label="The CRCX OK has assigned us a new endpoint CI number"];
rtp abox rtp [label="LCHAN_RTP_ST_WAIT_LCHAN_READY"];
--- [label="END: no endpoint-CI yet"];
- --- [label="END: requires_voice_stream"];
+ --- [label="END: requires_rtp_stream"];
|||;
...;
ts -> lchan [label="LCHAN_EV_TS_READY"];
@@ -60,7 +60,7 @@
lchan abox lchan [label="LCHAN_ST_WAIT_\nRLL_RTP_ESTABLISH\nT3101"];
|||;
|||;
- --- [label="IF requires_voice_stream"];
+ --- [label="IF requires_rtp_stream"];
lchan -> rtp [label="LCHAN_RTP_EV_LCHAN_READY"];
|||;
--- [label="IF ip.access style BTS"];
@@ -99,7 +99,7 @@
...;
lchan -> rtp [label="LCHAN_RTP_EV_ESTABLISHED\nvia gscon_change_primary_lchan()"];
rtp abox rtp [label="LCHAN_RTP_ST_\nESTABLISHED"];
- --- [label="END: requires_voice_stream"];
+ --- [label="END: requires_rtp_stream"];
|||;
|||;
@@ -116,7 +116,7 @@
lchan rbox lchan [label="dispatch\nHO_EV_LCHAN_ESTABLISHED\n(see Handover FSM diagrams)"];
--- [label="END"];
...;
- --- [label="IF requires_voice_stream"];
+ --- [label="IF requires_rtp_stream"];
lchan rbox lchan [label="Assignment or Handover FSM:"];
lchan -> mgwep [label="CRCX/MDCX to-MSC"];
...;
@@ -125,7 +125,7 @@
lchan -> rtp [label="LCHAN_RTP_EV_ESTABLISHED"];
rtp abox rtp [label="LCHAN_RTP_ST_\nESTABLISHED"];
rtp box rtp [label="Forget any Rollback info"];
- --- [label="END: requires_voice_stream"];
+ --- [label="END: requires_rtp_stream"];
...;
...;
diff --git a/include/osmocom/bsc/gsm_08_08.h b/include/osmocom/bsc/gsm_08_08.h
index 07f0821..21f92a7 100644
--- a/include/osmocom/bsc/gsm_08_08.h
+++ b/include/osmocom/bsc/gsm_08_08.h
@@ -13,3 +13,4 @@
void bsc_cm_update(struct gsm_subscriber_connection *conn,
const uint8_t *cm2, uint8_t cm2_len,
const uint8_t *cm3, uint8_t cm3_len);
+bool bsc_requires_rtp_stream(enum gsm0808_chan_indicator ch_indctr);
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index b77a16e..2747234 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -179,7 +179,7 @@
*/
struct assignment_request req;
- bool requires_voice_stream;
+ enum gsm0808_chan_indicator ch_indctr;
struct channel_mode_and_rate selected_ch_mode_rate;
struct osmo_fsm_inst *fi;
diff --git a/include/osmocom/bsc/lchan.h b/include/osmocom/bsc/lchan.h
index eef3140..a1eacef 100644
--- a/include/osmocom/bsc/lchan.h
+++ b/include/osmocom/bsc/lchan.h
@@ -122,7 +122,7 @@
struct gsm_subscriber_connection *for_conn;
struct channel_mode_and_rate ch_mode_rate;
struct gsm_encr encr;
- bool requires_voice_stream;
+ enum gsm0808_chan_indicator ch_indctr;
bool wait_before_switching_rtp; /*< true = requires LCHAN_EV_READY_TO_SWITCH_RTP */
uint16_t msc_assigned_cic;
/* During intra-BSC handover, we keep the MGW endpoint intact and just re-route to the new lchan. This
@@ -159,7 +159,7 @@
struct lchan_modify_info {
enum lchan_modify_for modify_for;
struct channel_mode_and_rate ch_mode_rate;
- bool requires_voice_stream;
+ enum gsm0808_chan_indicator ch_indctr;
uint16_t msc_assigned_cic;
/* The TSC Set to use if 'use' is true, otherwise automatically determine the TSC Set value to use. Valid range
@@ -216,6 +216,7 @@
struct channel_mode_and_rate ch_mode_rate;
struct gsm48_multi_rate_conf mr_conf_filtered;
+ enum gsm0808_chan_indicator ch_indctr;
bool activ_ack; /*< true as soon as RSL Chan Activ Ack is received */
bool immediate_assignment_sent;
/*! This flag ensures that when an lchan activation has succeeded, and we have already
@@ -239,6 +240,7 @@
struct channel_mode_and_rate ch_mode_rate;
struct gsm48_multi_rate_conf mr_conf_filtered;
+ enum gsm0808_chan_indicator ch_indctr;
/* Actually used TSC Set. */
int tsc_set;
/* Actually used TSC. */
@@ -324,6 +326,7 @@
* channel_mode_and_rate. */
struct channel_mode_and_rate current_ch_mode_rate;
struct gsm48_multi_rate_conf current_mr_conf;
+ enum gsm0808_chan_indicator current_ch_indctr;
/* Circuit-Switched TSC Set in use, or -1 if no specific TSC Set was requested. The valid range is 1-4 as
* described in the spec 3GPP TS 45.002. */
diff --git a/src/osmo-bsc/assignment_fsm.c b/src/osmo-bsc/assignment_fsm.c
index d23d726..4a26d41 100644
--- a/src/osmo-bsc/assignment_fsm.c
+++ b/src/osmo-bsc/assignment_fsm.c
@@ -194,8 +194,8 @@
return;
}
- /* Generate voice related fields */
- if (conn->assignment.requires_voice_stream) {
+ /* Generate rtp related fields */
+ if (bsc_requires_rtp_stream(conn->assignment.ch_indctr)) {
perm_spch = gsm0808_permitted_speech(lchan->type, lchan->current_ch_mode_rate.chan_mode);
if (gscon_is_aoip(conn)) {
@@ -238,7 +238,7 @@
return;
}
- if (gscon_is_aoip(conn) && conn->assignment.requires_voice_stream &&
+ if (gscon_is_aoip(conn) && bsc_requires_rtp_stream(conn->assignment.ch_indctr) &&
conn->assignment.req.use_osmux)
_gsm0808_ass_compl_extend_osmux(resp, osmux_cid);
@@ -523,7 +523,7 @@
if (check_chan_mode_rate_against_ch_indctr(conn) < 0)
return;
- conn->assignment.requires_voice_stream = (req->ch_indctr != GSM0808_CHAN_SIGN);
+ conn->assignment.ch_indctr = req->ch_indctr;
if (!req->target_lchan && reuse_existing_lchan(conn)) {
/* The already existing lchan is suitable for this mode */
@@ -648,7 +648,7 @@
.for_conn = conn,
.ch_mode_rate = conn->assignment.selected_ch_mode_rate,
.encr = conn->lchan->encr,
- .requires_voice_stream = conn->assignment.requires_voice_stream,
+ .ch_indctr = conn->assignment.ch_indctr,
.msc_assigned_cic = req->msc_assigned_cic,
.re_use_mgw_endpoint_from_lchan = conn->lchan,
.ta = conn->lchan->last_ta,
@@ -764,7 +764,7 @@
static void assignment_fsm_post_lchan_established(struct osmo_fsm_inst *fi)
{
struct gsm_subscriber_connection *conn = assignment_fi_conn(fi);
- if (conn->assignment.requires_voice_stream)
+ if (bsc_requires_rtp_stream(conn->assignment.ch_indctr))
assignment_fsm_state_chg(ASSIGNMENT_ST_WAIT_MGW_ENDPOINT_TO_MSC);
else
assignment_success(conn);
@@ -774,7 +774,7 @@
{
struct gsm_subscriber_connection *conn = assignment_fi_conn(fi);
- OSMO_ASSERT(conn->assignment.requires_voice_stream);
+ OSMO_ASSERT(bsc_requires_rtp_stream(conn->assignment.ch_indctr));
LOG_ASSIGNMENT(conn, LOGL_DEBUG,
"Connecting MGW endpoint to the MSC's RTP port: %s:%u\n",
@@ -838,7 +838,7 @@
struct lchan_modify_info modif_info = {
.modify_for = MODIFY_FOR_ASSIGNMENT,
.ch_mode_rate = conn->assignment.selected_ch_mode_rate,
- .requires_voice_stream = conn->assignment.requires_voice_stream,
+ .ch_indctr = conn->assignment.ch_indctr,
.msc_assigned_cic = req->msc_assigned_cic,
/* keep previous training sequence code. TSC is always present, TSC Set may or may not be an explicit
* value. */
diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c
index 4b7f24c..8eb2e44 100644
--- a/src/osmo-bsc/bsc_vty.c
+++ b/src/osmo-bsc/bsc_vty.c
@@ -862,7 +862,7 @@
struct lchan_modify_info info = {
.modify_for = MODIFY_FOR_VTY,
.ch_mode_rate = lchan->current_ch_mode_rate,
- .requires_voice_stream = (lchan->fi_rtp != NULL),
+ .ch_indctr = lchan->current_ch_indctr,
.vamos = vamos,
.tsc_set = {
.present = (tsc_set >= 0),
@@ -1625,7 +1625,7 @@
}
info.activ_for = ACTIVATE_FOR_VTY;
- info.requires_voice_stream = false;
+ info.ch_indctr = GSM0808_CHAN_SIGN;
info.ch_mode_rate.chan_rate = chan_t_to_chan_rate(lchan_t);
if (activate == 2 || lchan->vamos.is_secondary) {
diff --git a/src/osmo-bsc/gsm_08_08.c b/src/osmo-bsc/gsm_08_08.c
index a2bab4b..75c0cb1 100644
--- a/src/osmo-bsc/gsm_08_08.c
+++ b/src/osmo-bsc/gsm_08_08.c
@@ -607,3 +607,14 @@
if (rc != 0)
msgb_free(resp);
}
+
+bool bsc_requires_rtp_stream(enum gsm0808_chan_indicator ch_indctr)
+{
+ switch (ch_indctr) {
+ case GSM0808_CHAN_SPEECH:
+ case GSM0808_CHAN_DATA:
+ return true;
+ default:
+ return false;
+ }
+}
diff --git a/src/osmo-bsc/handover_fsm.c b/src/osmo-bsc/handover_fsm.c
index 251ea5b..2c74e20 100644
--- a/src/osmo-bsc/handover_fsm.c
+++ b/src/osmo-bsc/handover_fsm.c
@@ -409,7 +409,7 @@
.for_conn = conn,
.ch_mode_rate = conn->lchan->current_ch_mode_rate,
.encr = conn->lchan->encr,
- .requires_voice_stream = conn->lchan->mgw_endpoint_ci_bts ? true : false,
+ .ch_indctr = conn->lchan->current_ch_indctr,
.msc_assigned_cic = conn->ho.inter_bsc_in.msc_assigned_cic,
.re_use_mgw_endpoint_from_lchan = conn->lchan,
.wait_before_switching_rtp = true,
@@ -630,18 +630,6 @@
return true;
}
-static bool chan_mode_is_tch(enum gsm48_chan_mode mode)
-{
- switch (gsm48_chan_mode_to_non_vamos(mode)) {
- case GSM48_CMODE_SPEECH_V1:
- case GSM48_CMODE_SPEECH_EFR:
- case GSM48_CMODE_SPEECH_AMR:
- return true;
- default:
- return false;
- }
-}
-
void handover_start_inter_bsc_in(struct gsm_subscriber_connection *conn,
struct msgb *ho_request_msg)
{
@@ -739,7 +727,7 @@
.activ_for = ACTIVATE_FOR_HANDOVER,
.for_conn = conn,
.ch_mode_rate = ch_mode_rate,
- .requires_voice_stream = chan_mode_is_tch(ch_mode_rate.chan_mode),
+ .ch_indctr = req->ct.ch_indctr,
.msc_assigned_cic = req->msc_assigned_cic,
};
@@ -943,7 +931,7 @@
ho_perf_params.chosen_encr_alg = ALG_A5_NR_TO_BSSAP(lchan->encr.alg_a5_n);
ho_perf_params.chosen_encr_alg_present = true;
- if (ho->new_lchan->activate.info.requires_voice_stream) {
+ if (bsc_requires_rtp_stream(ho->new_lchan->activate.info.ch_indctr)) {
/* Speech Version (chosen) 3.2.2.51 */
ho_perf_params.speech_version_chosen = gsm0808_permitted_speech(lchan->type,
lchan->current_ch_mode_rate.chan_mode);
@@ -1129,7 +1117,7 @@
* So create an MSC side endpoint CI only if a voice lchan is established for an incoming inter-BSC
* handover on AoIP. Otherwise go on to send a Handover Command and wait for the Detect.
*/
- if (ho->new_lchan->activate.info.requires_voice_stream
+ if (bsc_requires_rtp_stream(ho->new_lchan->activate.info.ch_indctr)
&& (ho->scope & HO_INTER_BSC_IN)
&& gscon_is_aoip(conn))
ho_fsm_state_chg(HO_ST_WAIT_MGW_ENDPOINT_TO_MSC);
diff --git a/src/osmo-bsc/lchan_fsm.c b/src/osmo-bsc/lchan_fsm.c
index ab3fbdd..297a94a 100644
--- a/src/osmo-bsc/lchan_fsm.c
+++ b/src/osmo-bsc/lchan_fsm.c
@@ -35,6 +35,7 @@
#include <osmocom/bsc/abis_rsl.h>
#include <osmocom/bsc/bsc_rll.h>
#include <osmocom/bsc/gsm_04_08_rr.h>
+#include <osmocom/bsc/gsm_08_08.h>
#include <osmocom/bsc/assignment_fsm.h>
#include <osmocom/bsc/handover_fsm.h>
#include <osmocom/bsc/bsc_msc_data.h>
@@ -692,6 +693,8 @@
return -EINVAL;
}
}
+
+ lchan->activate.ch_indctr = lchan->activate.info.ch_indctr;
return 0;
}
@@ -720,6 +723,7 @@
struct gsm_lchan *old_lchan = lchan->activate.info.re_use_mgw_endpoint_from_lchan;
struct lchan_activate_info *info = &lchan->activate.info;
int ms_power_dbm = bts->ms_max_power;
+ bool requires_rtp_stream;
if (lchan->release.requested) {
lchan_fail("Release requested while activating");
@@ -763,12 +767,13 @@
lchan->activate.tsc = lchan->activate.info.tsc.present ? lchan->activate.info.tsc.val : gsm_ts_tsc(lchan->ts);
use_mgwep_ci = lchan_use_mgw_endpoint_ci_bts(lchan);
+ requires_rtp_stream = bsc_requires_rtp_stream(lchan->activate.info.ch_indctr);
LOG_LCHAN(lchan, LOGL_INFO,
- "Activation requested: %s voice=%s MGW-ci=%s type=%s tch-mode=%s encr-alg=A5/%u ck=%s\n",
+ "Activation requested: %s rtp=%s MGW-ci=%s type=%s tch-mode=%s encr-alg=A5/%u ck=%s\n",
lchan_activate_mode_name(lchan->activate.info.activ_for),
- lchan->activate.info.requires_voice_stream ? "yes" : "no",
- lchan->activate.info.requires_voice_stream ?
+ requires_rtp_stream ? "yes" : "no",
+ requires_rtp_stream ?
(use_mgwep_ci ? osmo_mgcpc_ep_ci_name(use_mgwep_ci) : "new")
: "none",
gsm_chan_t_name(lchan->type),
@@ -782,7 +787,7 @@
osmo_fsm_inst_dispatch(lchan->ts->fi, TS_EV_LCHAN_REQUESTED, lchan);
/* Prepare an MGW endpoint CI if appropriate. */
- if (lchan->activate.info.requires_voice_stream)
+ if (requires_rtp_stream)
lchan_rtp_fsm_start(lchan);
if (lchan->activate.info.imm_ass_time == IMM_ASS_TIME_PRE_TS_ACK) {
@@ -941,6 +946,7 @@
{
lchan->current_ch_mode_rate = lchan->activate.ch_mode_rate;
lchan->current_mr_conf = lchan->activate.mr_conf_filtered;
+ lchan->current_ch_indctr = lchan->activate.ch_indctr;
lchan->vamos.enabled = lchan->activate.info.vamos;
lchan->tsc_set = lchan->activate.tsc_set;
lchan->tsc = lchan->activate.tsc;
@@ -1022,16 +1028,17 @@
static void lchan_fsm_wait_rll_rtp_establish_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state)
{
struct gsm_lchan *lchan = lchan_fi_lchan(fi);
+ bool requires_rtp_stream = bsc_requires_rtp_stream(lchan->activate.info.ch_indctr);
+
if (lchan->fi_rtp)
osmo_fsm_inst_dispatch(lchan->fi_rtp, LCHAN_RTP_EV_LCHAN_READY, 0);
/* Prepare an MGW endpoint CI if appropriate (late). */
- else if (lchan->activate.info.requires_voice_stream)
+ else if (requires_rtp_stream)
lchan_rtp_fsm_start(lchan);
/* When activating a channel for VTY, skip waiting for activity from
- * lchan_rtp_fsm, but only if no voice stream is required. */
- if (lchan->activate.info.activ_for == ACTIVATE_FOR_VTY &&
- !lchan->activate.info.requires_voice_stream) {
+ * lchan_rtp_fsm, but only if no rtp stream is required. */
+ if (lchan->activate.info.activ_for == ACTIVATE_FOR_VTY && !requires_rtp_stream) {
lchan_fsm_state_chg(LCHAN_ST_ESTABLISHED);
}
}
@@ -1039,14 +1046,15 @@
static void lchan_fsm_wait_rll_rtp_establish(struct osmo_fsm_inst *fi, uint32_t event, void *data)
{
struct gsm_lchan *lchan = lchan_fi_lchan(fi);
+ bool requires_rtp_stream = bsc_requires_rtp_stream(lchan->activate.info.ch_indctr);
+
switch (event) {
case LCHAN_EV_RLL_ESTABLISH_IND:
- if (!lchan->activate.info.requires_voice_stream
- || lchan_rtp_established(lchan)) {
+ if (!requires_rtp_stream || lchan_rtp_established(lchan)) {
LOG_LCHAN(lchan, LOGL_DEBUG,
"%s\n",
- (lchan->activate.info.requires_voice_stream ?
+ (requires_rtp_stream ?
"RTP already established earlier" : "no voice stream required"));
lchan_fsm_state_chg(LCHAN_ST_ESTABLISHED);
}
@@ -1121,19 +1129,19 @@
/* The Channel Mode Modify was ACKed, now the requested values become the accepted and used values. */
lchan->current_ch_mode_rate = lchan->modify.ch_mode_rate;
lchan->current_mr_conf = lchan->modify.mr_conf_filtered;
+ lchan->current_ch_indctr = lchan->modify.ch_indctr;
lchan->tsc_set = lchan->modify.tsc_set;
lchan->tsc = lchan->modify.tsc;
lchan->vamos.enabled = lchan->modify.info.vamos;
- if (lchan->modify.info.requires_voice_stream
- && !lchan->fi_rtp) {
+ if (bsc_requires_rtp_stream(lchan->modify.info.ch_indctr) && !lchan->fi_rtp) {
/* Continue with RTP stream establishing as done in lchan_activate(). Place the requested values in
* lchan->activate.info and continue with voice stream setup. */
lchan->activate.info = (struct lchan_activate_info){
.activ_for = ACTIVATE_FOR_MODE_MODIFY_RTP,
.for_conn = lchan->conn,
.ch_mode_rate = lchan->modify.ch_mode_rate,
- .requires_voice_stream = true,
+ .ch_indctr = lchan->modify.info.ch_indctr,
.msc_assigned_cic = lchan->modify.info.msc_assigned_cic,
};
if (lchan_activate_set_ch_mode_rate_and_mr_config(lchan))
@@ -1242,6 +1250,7 @@
struct gsm_lchan *lchan = lchan_fi_lchan(fi);
struct lchan_modify_info *modif_info;
struct osmo_mgcpc_ep_ci *use_mgwep_ci;
+ bool requires_rtp_stream = bsc_requires_rtp_stream(lchan->modify.info.ch_indctr);
switch (event) {
case LCHAN_EV_RLL_ESTABLISH_IND:
@@ -1292,6 +1301,8 @@
}
}
+ lchan->modify.ch_indctr = lchan->modify.info.ch_indctr;
+
/* If enabling VAMOS mode and no specific TSC Set was selected, make sure to select a sane TSC Set by
* default: Set 1 for the primary and Set 2 for the shadow lchan. For non-VAMOS lchans, TSC Set 1. */
if (lchan->modify.info.tsc_set.present)
@@ -1304,10 +1315,10 @@
lchan->modify.tsc = lchan->modify.info.tsc.present ? lchan->modify.info.tsc.val : gsm_ts_tsc(lchan->ts);
LOG_LCHAN(lchan, LOGL_INFO,
- "Modification requested: %s voice=%s MGW-ci=%s type=%s tch-mode=%s tsc=%d/%u\n",
+ "Modification requested: %s rtp=%s MGW-ci=%s type=%s tch-mode=%s tsc=%d/%u\n",
lchan_modify_for_name(lchan->modify.info.modify_for),
- lchan->modify.info.requires_voice_stream ? "yes" : "no",
- lchan->modify.info.requires_voice_stream ?
+ requires_rtp_stream ? "yes" : "no",
+ requires_rtp_stream ?
(use_mgwep_ci ? osmo_mgcpc_ep_ci_name(use_mgwep_ci) : "new")
: "none",
gsm_chan_t_name(lchan->type),
@@ -1809,9 +1820,9 @@
lchan->release.rsl_error_cause = RSL_ERR_INTERWORKING;
lchan->release.rr_cause = bsc_gsm48_rr_cause_from_rsl_cause(lchan->release.rsl_error_cause);
if (fi->state == LCHAN_ST_WAIT_RLL_RTP_ESTABLISH) {
- lchan_fail("Timeout (rll_ready=%s,voice_require=%s,voice_ready=%s)",
+ lchan_fail("Timeout (rll_ready=%s,rtp_require=%s,voice_ready=%s)",
(lchan->sapis[0] != LCHAN_SAPI_UNUSED) ? "yes" : "no",
- lchan->activate.info.requires_voice_stream ? "yes" : "no",
+ bsc_requires_rtp_stream(lchan->activate.info.ch_indctr) ? "yes" : "no",
lchan_rtp_established(lchan) ? "yes" : "no");
} else {
lchan_fail("Timeout");
diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c
index 7ec10c3..7dbe03f 100644
--- a/src/osmo-bsc/osmo_bsc_bssap.c
+++ b/src/osmo-bsc/osmo_bsc_bssap.c
@@ -29,6 +29,7 @@
#include <osmocom/bsc/bsc_subscriber.h>
#include <osmocom/bsc/paging.h>
#include <osmocom/bsc/gsm_04_08_rr.h>
+#include <osmocom/bsc/gsm_08_08.h>
#include <osmocom/bsc/bsc_subscr_conn_fsm.h>
#include <osmocom/bsc/codec_pref.h>
#include <osmocom/bsc/data_rate_pref.h>
@@ -1618,7 +1619,7 @@
new_lchan->current_ch_mode_rate.chan_mode),
};
- if (gscon_is_aoip(conn) && new_lchan->activate.info.requires_voice_stream) {
+ if (gscon_is_aoip(conn) && bsc_requires_rtp_stream(new_lchan->activate.info.ch_indctr)) {
struct osmo_sockaddr_str to_msc_rtp;
const struct mgcp_conn_peer *rtp_info = osmo_mgcpc_ep_ci_get_rtp_info(conn->user_plane.mgw_endpoint_ci_msc);
int rc;
@@ -1693,7 +1694,7 @@
};
/* speech_codec_chosen */
- if (ho->new_lchan->activate.info.requires_voice_stream && gscon_is_aoip(conn)) {
+ if (bsc_requires_rtp_stream(ho->new_lchan->activate.info.ch_indctr) && gscon_is_aoip(conn)) {
int perm_spch = gsm0808_permitted_speech(lchan->type, lchan->current_ch_mode_rate.chan_mode);
params.speech_codec_chosen_present = true;
rc = gsm0808_speech_codec_from_chan_type(¶ms.speech_codec_chosen, perm_spch);
To view, visit change 31622. To unsubscribe, or for help writing mail filters, visit settings.