aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bsc/lchan_rtp_fsm.c
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2020-06-26 10:53:16 +0200
committerlaforge <laforge@osmocom.org>2020-08-06 15:52:16 +0000
commit7a11fce61170f23351daee18ef6d6afc6c35c152 (patch)
tree795b87b30f11bfe64de1ade061e6aa99614cd74b /src/osmo-bsc/lchan_rtp_fsm.c
parente1ec35a1f68cbfbe87f9491f17c813b5da8fa789 (diff)
lchan_rtp_fsm: use E1 endpoints if the BTS is not ipaccess type
When the BTS is is not an ipaccess BTS, the BTS can only be an E1 bts. In that case E1 endpoints must be used and there will be no RTP stream setup towards the BTS. Change-Id: I4f1f39bf90b0a7c9ea448dab255daf99cd36bb4a Related: OS#2547
Diffstat (limited to 'src/osmo-bsc/lchan_rtp_fsm.c')
-rw-r--r--src/osmo-bsc/lchan_rtp_fsm.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/osmo-bsc/lchan_rtp_fsm.c b/src/osmo-bsc/lchan_rtp_fsm.c
index 24a714702..1fe545286 100644
--- a/src/osmo-bsc/lchan_rtp_fsm.c
+++ b/src/osmo-bsc/lchan_rtp_fsm.c
@@ -141,6 +141,12 @@ static void lchan_rtp_fsm_wait_mgw_endpoint_available_onenter(struct osmo_fsm_in
struct osmo_mgcpc_ep_ci *use_mgwep_ci = lchan_use_mgw_endpoint_ci_bts(lchan);
struct mgcp_conn_peer crcx_info = {};
+ if (!is_ipaccess_bts(lchan->ts->trx->bts)) {
+ LOG_LCHAN_RTP(lchan, LOGL_DEBUG, "Audio link to-BTS via E1, skipping IPACC\n");
+ lchan_rtp_fsm_state_chg(LCHAN_RTP_ST_WAIT_LCHAN_READY);
+ return;
+ }
+
if (use_mgwep_ci) {
LOG_LCHAN_RTP(lchan, LOGL_DEBUG, "MGW endpoint already available: %s\n",
osmo_mgcpc_ep_ci_name(use_mgwep_ci));
@@ -148,7 +154,7 @@ static void lchan_rtp_fsm_wait_mgw_endpoint_available_onenter(struct osmo_fsm_in
return;
}
- mgwep = gscon_ensure_mgw_endpoint(lchan->conn, lchan->activate.info.msc_assigned_cic);
+ mgwep = gscon_ensure_mgw_endpoint(lchan->conn, lchan->activate.info.msc_assigned_cic, lchan);
if (!mgwep) {
lchan_rtp_fail("Internal error: cannot obtain MGW endpoint handle for conn");
return;
@@ -248,7 +254,7 @@ static void lchan_rtp_fsm_post_lchan_ready(struct osmo_fsm_inst *fi)
if (is_ipaccess_bts(lchan->ts->trx->bts))
lchan_rtp_fsm_state_chg(LCHAN_RTP_ST_WAIT_IPACC_CRCX_ACK);
else
- lchan_rtp_fsm_switch_rtp(fi);
+ lchan_rtp_fsm_state_chg(LCHAN_RTP_ST_WAIT_MGW_ENDPOINT_CONFIGURED);
}
static void lchan_rtp_fsm_wait_ipacc_crcx_ack_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state)
@@ -445,6 +451,12 @@ static void lchan_rtp_fsm_wait_mgw_endpoint_configured_onenter(struct osmo_fsm_i
return;
}
+ if (!is_ipaccess_bts(lchan->ts->trx->bts)) {
+ LOG_LCHAN_RTP(lchan, LOGL_DEBUG, "Audio link to-BTS via E1, skipping IPACC\n");
+ lchan_rtp_fsm_state_chg(LCHAN_RTP_ST_READY);
+ return;
+ }
+
/* At this point, we are taking over an old lchan's MGW endpoint (if any). */
if (!lchan->mgw_endpoint_ci_bts && old_lchan) {
/* The old lchan shall forget the endpoint now. We might put it back upon ROLLBACK */
@@ -521,7 +533,11 @@ static void lchan_rtp_fsm_rollback_onenter(struct osmo_fsm_inst *fi, uint32_t pr
osmo_fsm_inst_term(fi, OSMO_FSM_TERM_REQUEST, 0);
return;
}
- connect_mgw_endpoint_to_lchan(fi, lchan->mgw_endpoint_ci_bts, old_lchan);
+
+ if (is_ipaccess_bts(lchan->ts->trx->bts))
+ connect_mgw_endpoint_to_lchan(fi, lchan->mgw_endpoint_ci_bts, old_lchan);
+ else
+ osmo_fsm_inst_dispatch(fi, LCHAN_RTP_EV_MGW_ENDPOINT_CONFIGURED, 0);
}
static void lchan_rtp_fsm_rollback(struct osmo_fsm_inst *fi, uint32_t event, void *data)