osmith has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-bsc/+/31553 )
Change subject: requires_voice_stream -> requires_rtp_stream
......................................................................
requires_voice_stream -> requires_rtp_stream
The stream may not only carry voice, but also circuit switched data.
Rename it so it's clear that this cannot be used to distinct between
speech and data.
Related: OS#4393
Change-Id: I832ca268f5703fd35781d1fdf4f1e669b3d0ef9b
---
M doc/lchan.msc
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/handover_fsm.c
M src/osmo-bsc/lchan_fsm.c
M src/osmo-bsc/osmo_bsc_bssap.c
8 files changed, 51 insertions(+), 37 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/53/31553/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_data.h b/include/osmocom/bsc/gsm_data.h
index b77a16e..5efa981 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;
+ bool requires_rtp_stream;
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 1fd1771..4eb9704 100644
--- a/include/osmocom/bsc/lchan.h
+++ b/include/osmocom/bsc/lchan.h
@@ -119,7 +119,7 @@
struct gsm_subscriber_connection *for_conn;
struct channel_mode_and_rate ch_mode_rate;
struct gsm_encr encr;
- bool requires_voice_stream;
+ bool requires_rtp_stream;
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
@@ -156,7 +156,7 @@
struct lchan_modify_info {
enum lchan_modify_for modify_for;
struct channel_mode_and_rate ch_mode_rate;
- bool requires_voice_stream;
+ bool requires_rtp_stream;
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
diff --git a/src/osmo-bsc/assignment_fsm.c b/src/osmo-bsc/assignment_fsm.c
index d23d726..08c8c77 100644
--- a/src/osmo-bsc/assignment_fsm.c
+++ b/src/osmo-bsc/assignment_fsm.c
@@ -195,7 +195,7 @@
}
/* Generate voice related fields */
- if (conn->assignment.requires_voice_stream) {
+ if (conn->assignment.requires_rtp_stream) {
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) && conn->assignment.requires_rtp_stream &&
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.requires_rtp_stream = (req->ch_indctr != GSM0808_CHAN_SIGN);
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,
+ .requires_rtp_stream = conn->assignment.requires_rtp_stream,
.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 (conn->assignment.requires_rtp_stream)
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(conn->assignment.requires_rtp_stream);
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,
+ .requires_rtp_stream = conn->assignment.requires_rtp_stream,
.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..a0df405 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),
+ .requires_rtp_stream = (lchan->fi_rtp != NULL),
.vamos = vamos,
.tsc_set = {
.present = (tsc_set >= 0),
@@ -1625,7 +1625,7 @@
}
info.activ_for = ACTIVATE_FOR_VTY;
- info.requires_voice_stream = false;
+ info.requires_rtp_stream = false;
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/handover_fsm.c b/src/osmo-bsc/handover_fsm.c
index 251ea5b..35e396a 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,
+ .requires_rtp_stream = conn->lchan->mgw_endpoint_ci_bts ? true : false,
.msc_assigned_cic = conn->ho.inter_bsc_in.msc_assigned_cic,
.re_use_mgw_endpoint_from_lchan = conn->lchan,
.wait_before_switching_rtp = true,
@@ -739,7 +739,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),
+ .requires_rtp_stream = chan_mode_is_tch(ch_mode_rate.chan_mode),
.msc_assigned_cic = req->msc_assigned_cic,
};
@@ -943,7 +943,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 (ho->new_lchan->activate.info.requires_rtp_stream) {
/* 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 +1129,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 (ho->new_lchan->activate.info.requires_rtp_stream
&& (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..fcc8703 100644
--- a/src/osmo-bsc/lchan_fsm.c
+++ b/src/osmo-bsc/lchan_fsm.c
@@ -767,8 +767,8 @@
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",
lchan_activate_mode_name(lchan->activate.info.activ_for),
- lchan->activate.info.requires_voice_stream ? "yes" : "no",
- lchan->activate.info.requires_voice_stream ?
+ lchan->activate.info.requires_rtp_stream ? "yes" : "no",
+ lchan->activate.info.requires_rtp_stream ?
(use_mgwep_ci ? osmo_mgcpc_ep_ci_name(use_mgwep_ci) : "new")
: "none",
gsm_chan_t_name(lchan->type),
@@ -782,7 +782,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 (lchan->activate.info.requires_rtp_stream)
lchan_rtp_fsm_start(lchan);
if (lchan->activate.info.imm_ass_time == IMM_ASS_TIME_PRE_TS_ACK) {
@@ -1025,13 +1025,13 @@
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 (lchan->activate.info.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->activate.info.requires_rtp_stream) {
lchan_fsm_state_chg(LCHAN_ST_ESTABLISHED);
}
}
@@ -1042,11 +1042,11 @@
switch (event) {
case LCHAN_EV_RLL_ESTABLISH_IND:
- if (!lchan->activate.info.requires_voice_stream
+ if (!lchan->activate.info.requires_rtp_stream
|| lchan_rtp_established(lchan)) {
LOG_LCHAN(lchan, LOGL_DEBUG,
"%s\n",
- (lchan->activate.info.requires_voice_stream ?
+ (lchan->activate.info.requires_rtp_stream ?
"RTP already established earlier" : "no voice stream
required"));
lchan_fsm_state_chg(LCHAN_ST_ESTABLISHED);
}
@@ -1125,7 +1125,7 @@
lchan->tsc = lchan->modify.tsc;
lchan->vamos.enabled = lchan->modify.info.vamos;
- if (lchan->modify.info.requires_voice_stream
+ if (lchan->modify.info.requires_rtp_stream
&& !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. */
@@ -1133,7 +1133,7 @@
.activ_for = ACTIVATE_FOR_MODE_MODIFY_RTP,
.for_conn = lchan->conn,
.ch_mode_rate = lchan->modify.ch_mode_rate,
- .requires_voice_stream = true,
+ .requires_rtp_stream = true,
.msc_assigned_cic = lchan->modify.info.msc_assigned_cic,
};
if (lchan_activate_set_ch_mode_rate_and_mr_config(lchan))
@@ -1306,8 +1306,8 @@
LOG_LCHAN(lchan, LOGL_INFO,
"Modification requested: %s voice=%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 ?
+ lchan->modify.info.requires_rtp_stream ? "yes" : "no",
+ lchan->modify.info.requires_rtp_stream ?
(use_mgwep_ci ? osmo_mgcpc_ep_ci_name(use_mgwep_ci) : "new")
: "none",
gsm_chan_t_name(lchan->type),
@@ -1809,9 +1809,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,rtp_ready=%s)",
(lchan->sapis[0] != LCHAN_SAPI_UNUSED) ? "yes" : "no",
- lchan->activate.info.requires_voice_stream ? "yes" : "no",
+ lchan->activate.info.requires_rtp_stream ? "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 48f0b87..e4c475c 100644
--- a/src/osmo-bsc/osmo_bsc_bssap.c
+++ b/src/osmo-bsc/osmo_bsc_bssap.c
@@ -1617,7 +1617,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) && new_lchan->activate.info.requires_rtp_stream) {
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;
@@ -1692,7 +1692,7 @@
};
/* speech_codec_chosen */
- if (ho->new_lchan->activate.info.requires_voice_stream &&
gscon_is_aoip(conn)) {
+ if (ho->new_lchan->activate.info.requires_rtp_stream &&
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
https://gerrit.osmocom.org/c/osmo-bsc/+/31553
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I832ca268f5703fd35781d1fdf4f1e669b3d0ef9b
Gerrit-Change-Number: 31553
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange