bsc: Don't create MSC-side MGCP connection in IPA/SCCPlite case

In IPA/SCCPlite, the MSC is handling MGCP to the BSC-MGW directly
and the BSC only takes care of the BTS-side MGCP connection.  We
achieve this by transitioning directly from WAIT_MDCX_BTS into ACTIVE
in this case.

Change-Id: I96179b4324b976bded36023a8ccbdc007b6b3e05
Related: OS#2544
This commit is contained in:
Harald Welte 2018-05-25 18:23:30 +02:00
parent 200a0e2d0a
commit 7b897dfea5
1 changed files with 19 additions and 9 deletions

View File

@ -678,17 +678,27 @@ static void gscon_fsm_wait_mdcx_bts(struct osmo_fsm_inst *fi, uint32_t event, vo
* BTS connection. */
osmo_strlcpy(conn_peer.endpoint, conn->user_plane.mgw_endpoint, sizeof(conn_peer.endpoint));
switch (conn->sccp.msc->a.asp_proto) {
case OSMO_SS7_ASP_PROT_IPA:
/* Send assignment complete message to the MSC */
send_ass_compl(conn->lchan, fi, true);
osmo_fsm_inst_state_chg(fi, ST_ACTIVE, 0, 0);
break;
default:
/* (Pre)Change state and create the connection */
osmo_fsm_inst_state_chg(fi, ST_WAIT_CRCX_MSC, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR);
conn->user_plane.fi_msc =
mgcp_conn_create(conn->network->mgw.client, fi, GSCON_EV_MGW_FAIL_MSC, GSCON_EV_MGW_CRCX_RESP_MSC,
&conn_peer);
osmo_fsm_inst_state_chg(fi, ST_WAIT_CRCX_MSC, MGCP_MGW_TIMEOUT,
MGCP_MGW_TIMEOUT_TIMER_NR);
conn->user_plane.fi_msc = mgcp_conn_create(conn->network->mgw.client, fi,
GSCON_EV_MGW_FAIL_MSC,
GSCON_EV_MGW_CRCX_RESP_MSC, &conn_peer);
if (!conn->user_plane.fi_msc) {
resp = gsm0808_create_assignment_failure(GSM0808_CAUSE_EQUIPMENT_FAILURE, NULL);
sigtran_send(conn, resp, fi);
osmo_fsm_inst_state_chg(fi, ST_ACTIVE, 0, 0);
return;
}
break;
}
break;
case GSCON_EV_MO_DTAP: