This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Harald Welte gerrit-no-reply at lists.osmocom.orgHarald Welte has submitted this change and it was merged. Change subject: bsc_vty: Add command to manually issue IPAC MDCX ...................................................................... bsc_vty: Add command to manually issue IPAC MDCX Using this command, one can modify the RTP stream associated with a given logical channel and (re)direct it to a specified IP:Port. Change-Id: I63e03b932038a4e2f6d51c5541b52e4a42df27bf --- M openbsc/src/libbsc/bsc_vty.c 1 file changed, 31 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c index 3ad0b20..f14a205 100644 --- a/openbsc/src/libbsc/bsc_vty.c +++ b/openbsc/src/libbsc/bsc_vty.c @@ -4026,7 +4026,6 @@ vty_out(vty, "%% activating lchan %s%s", gsm_lchan_name(lchan), VTY_NEWLINE); rsl_chan_activate_lchan(lchan, RSL_ACT_TYPE_INITIAL, 0); rsl_ipacc_crcx(lchan); - /* FIXME: MDCX for RTP */ } else { rsl_direct_rf_release(lchan); } @@ -4034,6 +4033,36 @@ return CMD_SUCCESS; } +DEFUN(lchan_mdcx, lchan_mdcx_cmd, + "bts <0-255> trx <0-255> timeslot <0-7> sub-slot <0-7> mdcx A.B.C.D <0-65535>", + "BTS related commands\n" "BTS Number\n" "Transceiver\n" "Transceiver Number\n" + "TRX Timeslot\n" "Timeslot Number\n" "Sub-Slot\n" "Sub-Slot Number\n" + "Modify RTP Connection\n" "MGW IP Address\n" "MGW UDP Port\n") +{ + struct gsm_bts_trx_ts *ts; + struct gsm_lchan *lchan; + int ss_nr = atoi(argv[3]); + int port = atoi(argv[5]); + struct in_addr ia; + inet_aton(argv[4], &ia); + + ts = vty_get_ts(vty, argv[0], argv[1], argv[2]); + if (!ts) + return CMD_WARNING; + + lchan = &ts->lchan[ss_nr]; + + if (ss_nr >= ts_subslots(ts)) { + vty_out(vty, "%% subslot %d >= permitted %d for physical channel %s%s", + ss_nr, ts_subslots(ts), gsm_pchan_name(ts->pchan), VTY_NEWLINE); + return CMD_WARNING; + } + + vty_out(vty, "%% connecting RTP of %s to %s:%u%s", gsm_lchan_name(lchan), + inet_ntoa(ia), port, VTY_NEWLINE); + rsl_ipacc_mdcx(lchan, ntohl(ia.s_addr), port, 0); + return CMD_SUCCESS; +} extern int bsc_vty_init_extra(void); int bsc_vty_init(struct gsm_network *network) @@ -4232,6 +4261,7 @@ install_element(ENABLE_NODE, &restart_bts_cmd); install_element(ENABLE_NODE, &pdch_act_cmd); install_element(ENABLE_NODE, &lchan_act_cmd); + install_element(ENABLE_NODE, &lchan_mdcx_cmd); install_element(ENABLE_NODE, &smscb_cmd_cmd); abis_nm_vty_init(); -- To view, visit https://gerrit.osmocom.org/2767 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I63e03b932038a4e2f6d51c5541b52e4a42df27bf Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Jenkins Builder