[S] Change in osmo-bsc[master]: mgw: add vty option to send X-Side with CRCX
falconia has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/44050?usp=email ) Change subject: mgw: add vty option to send X-Side with CRCX ...................................................................... mgw: add vty option to send X-Side with CRCX When OsmoBSC operates with IP-based BTS and AoIP-based MSC, it requests rtpbridge/* endpoints from its associated MGW and sends 2 CRCX commands to each such endpoint, one for AoIP side and one for Abis side. Since a similar change in OsmoMSC, we now have ability to add X-Side extension parameter to each CRCX command, indicating which side of rtpbridge is being connected. Add vty option to send these X-Side extension lines, with "AoIP" and "Abis" as side names for BSC-associated rtpbridge endpoints. Standard OsmoMGW ignores these X-Side extension lines, but they are still potentially useful in some scenarios: 1) They aid debugging via packet capture, making it clearly visible in pcap which CRCX and which resulting ConnectionId corresponds to which side of the BSC; 2) Some network operators may wish to replace osmo-mgw with their own custom implementations, and some implementors of such alternative MGWs for OsmoBSC and OsmoMSC strongly prefer to have a known association of each MGCP connection to a specific side from initial CRCX onward. Depends: I713147d6567fb30de09b2272478d717093d6170e (osmo-mgw.git) Change-Id: I8e561dcf06028f8fd5cd154c075c984b4c744738 --- M TODO-RELEASE M include/osmocom/bsc/gsm_data.h M src/osmo-bsc/bsc_subscr_conn_fsm.c M src/osmo-bsc/bsc_vty.c M src/osmo-bsc/lchan_rtp_fsm.c 5 files changed, 39 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/50/44050/1 diff --git a/TODO-RELEASE b/TODO-RELEASE index 510eed7..5f331ea 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -9,3 +9,4 @@ #library what description / commit summary line libosmo-sigtran >2.3.0 OSMO_SCCP_REL_REASON_NSU_*, libosmo-sigtran >2.3.0 OSMO_SCCP_RETURN_REASON_*, osmo_sccp_return_reason_name() +libosmo-mgcp-client >1.16.0 x_side[] in struct mgcp_conn_peer diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index cb19536..99387ed 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -1079,6 +1079,10 @@ /* Timer definitions, the same for all MGW pool members */ struct osmo_tdef *tdefs; + + /* Should we send X-Side extension parameter line to our + * attached MGW, telling it which CRCX is for A vs Abis? */ + bool indicate_side; } mgw; /* Remote BSS resolution sevice (CTRL iface) */ diff --git a/src/osmo-bsc/bsc_subscr_conn_fsm.c b/src/osmo-bsc/bsc_subscr_conn_fsm.c index 4ea0053..99ca8dc 100644 --- a/src/osmo-bsc/bsc_subscr_conn_fsm.c +++ b/src/osmo-bsc/bsc_subscr_conn_fsm.c @@ -842,8 +842,11 @@ } verb = MGCP_VERB_MDCX; - } else + } else { verb = MGCP_VERB_CRCX; + if (bsc_gsmnet->mgw.indicate_side) + OSMO_STRLCPY_ARRAY(mgw_info.x_side, "AoIP"); + } gscon_ensure_mgw_endpoint(conn, for_lchan->activate.info.msc_assigned_cic, for_lchan); diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c index e9dabf9..6cead87 100644 --- a/src/osmo-bsc/bsc_vty.c +++ b/src/osmo-bsc/bsc_vty.c @@ -2731,6 +2731,9 @@ vty_out(vty, " bts-setup-ramping-step-interval %d%s", bsc_gsmnet->bts_setup_ramp.step_interval, VTY_NEWLINE); + if (bsc_gsmnet->mgw.indicate_side) + vty_out(vty, " mgw indicate-side%s", VTY_NEWLINE); + return CMD_SUCCESS; } @@ -3217,6 +3220,28 @@ return CMD_SUCCESS; } +DEFUN_USRATTR(cfg_bsc_mgw_side, + cfg_bsc_mgw_side_cmd, + X(BSC_VTY_ATTR_NEW_LCHAN), + "mgw indicate-side", + MGCP_CLIENT_MGW_STR + "Send X-Side extension parameter with CRCX commands\n") +{ + bsc_gsmnet->mgw.indicate_side = true; + return CMD_SUCCESS; +} + +DEFUN_USRATTR(cfg_bsc_no_mgw_side, + cfg_bsc_no_mgw_side_cmd, + X(BSC_VTY_ATTR_NEW_LCHAN), + "no mgw indicate-side", + NO_STR MGCP_CLIENT_MGW_STR + "Send X-Side extension parameter with CRCX commands\n") +{ + bsc_gsmnet->mgw.indicate_side = false; + return CMD_SUCCESS; +} + DEFUN(bts_unblock_setup_ramping, bts_unblock_setup_ramping_cmd, "bts " BTS_NR_VTY_ARG_VAL " unblock-setup-ramping", @@ -3731,6 +3756,8 @@ install_element(BSC_NODE, &cfg_bsc_no_bts_setup_ramping_cmd); install_element(BSC_NODE, &cfg_bsc_bts_setup_ramping_step_size_cmd); install_element(BSC_NODE, &cfg_bsc_bts_setup_ramping_step_interval_cmd); + install_element(BSC_NODE, &cfg_bsc_mgw_side_cmd); + install_element(BSC_NODE, &cfg_bsc_no_mgw_side_cmd); install_node(&msc_node, config_write_msc); install_element(MSC_NODE, &cfg_net_msc_ncc_cmd); diff --git a/src/osmo-bsc/lchan_rtp_fsm.c b/src/osmo-bsc/lchan_rtp_fsm.c index 4d0217b..d88a7ba 100644 --- a/src/osmo-bsc/lchan_rtp_fsm.c +++ b/src/osmo-bsc/lchan_rtp_fsm.c @@ -196,6 +196,9 @@ break; } + if (bsc_gsmnet->mgw.indicate_side) + OSMO_STRLCPY_ARRAY(crcx_info.x_side, "Abis"); + osmo_mgcpc_ep_ci_request(lchan->mgw_endpoint_ci_bts, MGCP_VERB_CRCX, &crcx_info, fi, LCHAN_RTP_EV_MGW_ENDPOINT_AVAILABLE, LCHAN_RTP_EV_MGW_ENDPOINT_ERROR, 0); -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/44050?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I8e561dcf06028f8fd5cd154c075c984b4c744738 Gerrit-Change-Number: 44050 Gerrit-PatchSet: 1 Gerrit-Owner: falconia <falcon@freecalypso.org>
participants (1)
-
falconia