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/.
neels gerrit-no-reply at lists.osmocom.orgneels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/18498 )
Change subject: drop all BSC originated USSD notification features
......................................................................
drop all BSC originated USSD notification features
The BSC is the wrong network component to originate USSD messaging, as can be
seen in the hacks in the USSD code: for example, the BSC would send a CM
Service Accept message as if an MSC had accepted the connection, dispatch a
USSD and directly send some RR release message (without proper tear down
messaging like the lchan_fsm does these days). This made sense in the osmo-nitb
world, but by now we are aiming for solid 3GPP compliance. The BSC shall not
originate USSD messages.
Drop all VTY and CTRL commands related to USSD, i.e.
VTY
[no] bsc-welcome-text
[no] bsc-msc-lost-text
[no] bsc-grace-text
[no] missing-msc-text
CTRL
ussd-notify-v1
Drop (already unused) ussd.h.
Drop gsm_04_80.h, gsm_04_80_utils.c, and all calling code.
Drop "RF grace" notification, where osmo-bsc was able to notify active
subscribers that the RF was being turned off.
Change-Id: Iaef6f2e01b4dbf2bff0a0bb50d6851f50ae79f6a
---
M doc/manuals/chapters/control.adoc
M include/osmocom/bsc/Makefile.am
M include/osmocom/bsc/bsc_msc_data.h
D include/osmocom/bsc/gsm_04_80.h
M include/osmocom/bsc/gsm_data.h
M include/osmocom/bsc/osmo_bsc.h
D include/osmocom/bsc/ussd.h
M src/osmo-bsc/Makefile.am
D src/osmo-bsc/gsm_04_80_utils.c
M src/osmo-bsc/gsm_08_08.c
M src/osmo-bsc/osmo_bsc_bssap.c
M src/osmo-bsc/osmo_bsc_ctrl.c
M src/osmo-bsc/osmo_bsc_filter.c
M src/osmo-bsc/osmo_bsc_grace.c
M src/osmo-bsc/osmo_bsc_sigtran.c
M src/osmo-bsc/osmo_bsc_vty.c
M tests/bsc/bsc_test.c
M tests/codec_pref/codec_pref_test.c
M tests/handover/Makefile.am
M tests/vty_test_runner.py
20 files changed, 3 insertions(+), 574 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/98/18498/1
diff --git a/doc/manuals/chapters/control.adoc b/doc/manuals/chapters/control.adoc
index 327e5b4..6b1609a 100644
--- a/doc/manuals/chapters/control.adoc
+++ b/doc/manuals/chapters/control.adoc
@@ -25,7 +25,6 @@
|mcc-mnc-apply|WO|No|"<mcc>,<mnc>"|Apply new MCC/MNC values if different from currently used one.
|notification|WO|Yes|Arbitrary value| See <<notif>> for details.
|inform-msc-v1|WO|Yes|Arbitrary value| See <<infomsc>> for details.
-|ussd-notify-v1|WO|No|"<cic>,<alert>,<text>"| See <<ussdnot>> for details.
|rf_locked|RW|No|"0","1"|See <<rfl>> for details.
|number-of-bts|RO|No|"<num>"|Get number of configured BTS.
|bts.N.location-area-code|RW|No|"<lac>"|Set/Get LAC (value between (0, 65535)).
@@ -54,12 +53,6 @@
Setting this variable initiate TRAP "inform-msc-v1" to all connected MSCs
control interfaces with the value supplied in SET operation.
-[[ussdnot]]
-=== ussd-notify-v1
-
-Setting this variable will send USSD Notify message to subscriber specified in
-command parameters with the text specified in command parameters.
-
[[chanlo]]
=== channel-load
diff --git a/include/osmocom/bsc/Makefile.am b/include/osmocom/bsc/Makefile.am
index 509df9a..7a296e4 100644
--- a/include/osmocom/bsc/Makefile.am
+++ b/include/osmocom/bsc/Makefile.am
@@ -17,7 +17,6 @@
debug.h \
e1_config.h \
gsm_04_08_rr.h \
- gsm_04_80.h \
gsm_data.h \
handover.h \
handover_cfg.h \
@@ -49,7 +48,6 @@
signal.h \
system_information.h \
timeslot_fsm.h \
- ussd.h \
vty.h \
gsm_08_08.h \
penalty_timers.h \
diff --git a/include/osmocom/bsc/bsc_msc_data.h b/include/osmocom/bsc/bsc_msc_data.h
index 27eb75d..b497345 100644
--- a/include/osmocom/bsc/bsc_msc_data.h
+++ b/include/osmocom/bsc/bsc_msc_data.h
@@ -133,17 +133,8 @@
enum bsc_lcls_mode lcls_mode;
bool lcls_codec_mismatch_allow;
- /* ussd welcome text */
- char *ussd_welcome_txt;
-
int nr;
- /* ussd msc connection lost text */
- char *ussd_msc_lost_txt;
-
- /* ussd text when MSC has entered the grace period */
- char *ussd_grace_txt;
-
/* structures for keeping rate counters and gauge stats */
struct rate_ctr_group *msc_ctrs;
struct osmo_stat_item_group *msc_statg;
@@ -207,15 +198,11 @@
struct llist_head mscs;
/* rf ctl related bits */
- char *mid_call_txt;
int mid_call_timeout;
char *rf_ctrl_name;
struct osmo_bsc_rf *rf_ctrl;
int auto_off_timeout;
- /* ussd text when there is no MSC available */
- char *ussd_no_msc_txt;
-
struct bsc_cbc_link *cbc;
};
diff --git a/include/osmocom/bsc/gsm_04_80.h b/include/osmocom/bsc/gsm_04_80.h
deleted file mode 100644
index 649ffe1..0000000
--- a/include/osmocom/bsc/gsm_04_80.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#pragma once
-
-struct gsm_subscriber_connection;
-
-int bsc_send_ussd_notify(struct gsm_subscriber_connection *conn, int level,
- const char *text);
-int bsc_send_ussd_release_complete(struct gsm_subscriber_connection *conn);
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 73c0eb3..829295e 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -260,9 +260,6 @@
/* flag to prevent multiple simultaneous ciphering commands */
int ciphering_handled;
- /* state related to welcome USSD */
- uint8_t new_subscriber;
-
/* SCCP connection associatd with this subscriber_connection */
struct {
/* for advanced ping/pong */
diff --git a/include/osmocom/bsc/osmo_bsc.h b/include/osmocom/bsc/osmo_bsc.h
index 8999a2e..afc319b 100644
--- a/include/osmocom/bsc/osmo_bsc.h
+++ b/include/osmocom/bsc/osmo_bsc.h
@@ -2,8 +2,6 @@
#include <osmocom/gsm/protocol/gsm_04_08.h>
-#define BSS_SEND_USSD 1
-
enum bsc_con {
BSC_CON_SUCCESS,
BSC_CON_REJECT_NO_LINK,
@@ -29,7 +27,6 @@
int bsc_scan_bts_msg(struct gsm_subscriber_connection *conn, struct msgb *msg);
int bsc_scan_msc_msg(struct gsm_subscriber_connection *conn, struct msgb *msg);
-int bsc_send_welcome_ussd(struct gsm_subscriber_connection *conn);
int bsc_handle_udt(struct bsc_msc_data *msc, struct msgb *msg, unsigned int length);
int bsc_handle_dt(struct gsm_subscriber_connection *conn, struct msgb *msg, unsigned int len);
diff --git a/include/osmocom/bsc/ussd.h b/include/osmocom/bsc/ussd.h
deleted file mode 100644
index 2665468..0000000
--- a/include/osmocom/bsc/ussd.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef _USSD_H
-#define _USSD_H
-
-/* Handler function for mobile-originated USSD messages */
-
-#include <osmocom/core/msgb.h>
-
-int handle_rcv_ussd(struct gsm_subscriber_connection *conn, struct msgb *msg);
-
-#endif
diff --git a/src/osmo-bsc/Makefile.am b/src/osmo-bsc/Makefile.am
index 6009e1d..51e0e7f9 100644
--- a/src/osmo-bsc/Makefile.am
+++ b/src/osmo-bsc/Makefile.am
@@ -55,7 +55,6 @@
codec_pref.c \
e1_config.c \
gsm_04_08_rr.c \
- gsm_04_80_utils.c \
gsm_data.c \
handover_cfg.c \
handover_decision.c \
diff --git a/src/osmo-bsc/gsm_04_80_utils.c b/src/osmo-bsc/gsm_04_80_utils.c
deleted file mode 100644
index 5ac0226..0000000
--- a/src/osmo-bsc/gsm_04_80_utils.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/* OpenBSC utility functions for 3GPP TS 04.80 */
-
-/* (C) 2016 by sysmocom s.m.f.c. GmbH <info at sysmocom.de>
- *
- * All Rights Reserved
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#include <osmocom/gsm/gsm0480.h>
-#include <osmocom/bsc/bsc_subscr_conn_fsm.h>
-
-int bsc_send_ussd_notify(struct gsm_subscriber_connection *conn, int level,
- const char *text)
-{
- struct msgb *msg = gsm0480_create_ussd_notify(level, text);
- if (!msg)
- return -1;
- gscon_submit_rsl_dtap(conn, msg, 0, 0);
- return 0;
-}
-
-int bsc_send_ussd_release_complete(struct gsm_subscriber_connection *conn)
-{
- /* ugly: we obviously don't know if TID 0 is currently in user for the given subscriber... */
- struct msgb *msg = gsm0480_create_release_complete(0);
- if (!msg)
- return -1;
- gscon_submit_rsl_dtap(conn, msg, 0, 0);
- return 0;
-}
diff --git a/src/osmo-bsc/gsm_08_08.c b/src/osmo-bsc/gsm_08_08.c
index 7295f0c..70559c0 100644
--- a/src/osmo-bsc/gsm_08_08.c
+++ b/src/osmo-bsc/gsm_08_08.c
@@ -26,7 +26,6 @@
#include <osmocom/bsc/gsm_08_08.h>
#include <osmocom/bsc/codec_pref.h>
-#include <osmocom/bsc/gsm_04_80.h>
#include <osmocom/bsc/gsm_04_08_rr.h>
#include <osmocom/bsc/a_reset.h>
@@ -106,50 +105,6 @@
return 0;
}
-static void bsc_send_ussd_no_srv(struct gsm_subscriber_connection *conn,
- struct msgb *msg, const char *text)
-{
- struct gsm48_hdr *gh;
- int8_t pdisc;
- uint8_t mtype;
- int drop_message = 1;
-
- if (!text)
- return;
-
- if (!msg || msgb_l3len(msg) < sizeof(*gh))
- return;
-
- gh = msgb_l3(msg);
- pdisc = gsm48_hdr_pdisc(gh);
- mtype = gsm48_hdr_msg_type(gh);
-
- /* Is CM service request? */
- if (pdisc == GSM48_PDISC_MM && mtype == GSM48_MT_MM_CM_SERV_REQ) {
- struct gsm48_service_request *cm;
-
- cm = (struct gsm48_service_request *) &gh->data[0];
-
- /* Is type SMS or call? */
- if (cm->cm_service_type == GSM48_CMSERV_SMS)
- drop_message = 0;
- else if (cm->cm_service_type == GSM48_CMSERV_MO_CALL_PACKET)
- drop_message = 0;
- }
-
- if (drop_message) {
- LOGP(DMSC, LOGL_DEBUG, "Skipping (not sending) USSD message: '%s'\n", text);
- return;
- }
-
- LOGP(DMSC, LOGL_INFO, "Sending CM Service Accept\n");
- gsm48_tx_mm_serv_ack(conn);
-
- LOGP(DMSC, LOGL_INFO, "Sending USSD message: '%s'\n", text);
- bsc_send_ussd_notify(conn, 1, text);
- bsc_send_ussd_release_complete(conn);
-}
-
static int is_cm_service_for_emerg(struct msgb *msg)
{
struct gsm48_service_request *cm;
@@ -319,7 +274,6 @@
{
struct gsm48_hdr *gh;
struct gsm48_loc_upd_req *lu;
- struct gsm48_loc_area_id lai;
int8_t rc8;
struct gsm_bts *bts = conn_get_bts(conn);
@@ -332,13 +286,6 @@
gh = msgb_l3(msg);
lu = (struct gsm48_loc_upd_req *) gh->data;
- gsm48_generate_lai2(&lai, bts_lai(conn_get_bts(conn)));
-
- if (memcmp(&lai, &lu->lai, sizeof(lai)) != 0) {
- LOGP(DMSC, LOGL_DEBUG, "Marking con for welcome USSD.\n");
- conn->new_subscriber = 1;
- }
-
rc8 = osmo_gsm48_rfpowercap2powerclass(bts->band, lu->classmark1.pwr_lev);
if (rc8 < 0) {
LOGP(DMSC, LOGL_NOTICE,
@@ -405,7 +352,6 @@
{
struct bsc_msc_data *msc;
struct msgb *resp;
- enum bsc_con ret;
struct gsm0808_speech_codec_list scl;
int rc = -2;
@@ -417,25 +363,13 @@
msc = bsc_find_msc(conn, msg);
if (!msc) {
LOGP(DMSC, LOGL_ERROR, "Failed to find a MSC for a connection.\n");
- bsc_send_ussd_no_srv(conn, msg,
- conn_get_bts(conn)->network->bsc_data->ussd_no_msc_txt);
rc = -1;
goto early_fail;
}
/* allocate resource for a new connection */
- ret = osmo_bsc_sigtran_new_conn(conn, msc);
-
- if (ret != BSC_CON_SUCCESS) {
- /* allocation has failed */
- if (ret == BSC_CON_REJECT_NO_LINK)
- bsc_send_ussd_no_srv(conn, msg, msc->ussd_msc_lost_txt);
- else if (ret == BSC_CON_REJECT_RF_GRACE)
- bsc_send_ussd_no_srv(conn, msg, msc->ussd_grace_txt);
+ if (osmo_bsc_sigtran_new_conn(conn, msc) != BSC_CON_SUCCESS)
goto early_fail;
- }
-
- /* check return value, if failed check msg for and send USSD */
bsc_scan_bts_msg(conn, msg);
diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c
index 388ad14..e65d0cf 100644
--- a/src/osmo-bsc/osmo_bsc_bssap.c
+++ b/src/osmo-bsc/osmo_bsc_bssap.c
@@ -29,7 +29,6 @@
#include <osmocom/bsc/bsc_subscriber.h>
#include <osmocom/bsc/paging.h>
#include <osmocom/bsc/gsm_04_08_rr.h>
-#include <osmocom/bsc/gsm_04_80.h>
#include <osmocom/bsc/bsc_subscr_conn_fsm.h>
#include <osmocom/bsc/codec_pref.h>
#include <osmocom/bsc/abis_rsl.h>
@@ -1146,21 +1145,13 @@
return ret;
}
-int bsc_send_welcome_ussd(struct gsm_subscriber_connection *conn)
-{
- bsc_send_ussd_notify(conn, 1, conn->sccp.msc->ussd_welcome_txt);
- bsc_send_ussd_release_complete(conn);
-
- return 0;
-}
-
static int dtap_rcvmsg(struct gsm_subscriber_connection *conn,
struct msgb *msg, unsigned int length)
{
struct dtap_header *header;
struct msgb *gsm48;
uint8_t *data;
- int rc, dtap_rc;
+ int dtap_rc;
struct rate_ctr *ctrs;
LOGP(DMSC, LOGL_DEBUG, "Rx MSC DTAP: %s\n",
@@ -1202,12 +1193,10 @@
memcpy(data, msg->l3h + sizeof(*header), length - sizeof(*header));
/* pass it to the filter for extra actions */
- rc = bsc_scan_msc_msg(conn, gsm48);
+ bsc_scan_msc_msg(conn, gsm48);
/* Store link_id in msgb->cb */
OBSC_LINKID_CB(gsm48) = header->link_id;
dtap_rc = osmo_fsm_inst_dispatch(conn->fi, GSCON_EV_MT_DTAP, gsm48);
- if (rc == BSS_SEND_USSD)
- bsc_send_welcome_ussd(conn);
return dtap_rc;
}
diff --git a/src/osmo-bsc/osmo_bsc_ctrl.c b/src/osmo-bsc/osmo_bsc_ctrl.c
index afe061e..eb82a7c 100644
--- a/src/osmo-bsc/osmo_bsc_ctrl.c
+++ b/src/osmo-bsc/osmo_bsc_ctrl.c
@@ -26,7 +26,6 @@
#include <osmocom/bsc/osmo_bsc_rf.h>
#include <osmocom/bsc/bsc_msc_data.h>
#include <osmocom/bsc/signal.h>
-#include <osmocom/bsc/gsm_04_80.h>
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/signal.h>
@@ -672,70 +671,6 @@
return CTRL_CMD_HANDLED;
}
-CTRL_CMD_DEFINE_WO(net_ussd_notify, "ussd-notify-v1");
-static int set_net_ussd_notify(struct ctrl_cmd *cmd, void *data)
-{
- struct gsm_subscriber_connection *conn;
- struct gsm_network *net;
- char *saveptr = NULL;
- char *cic_str, *alert_str, *text_str;
- int cic, alert;
-
- /* Verify has done the test for us */
- cic_str = strtok_r(cmd->value, ",", &saveptr);
- alert_str = strtok_r(NULL, ",", &saveptr);
- text_str = strtok_r(NULL, ",", &saveptr);
-
- if (!cic_str || !alert_str || !text_str) {
- cmd->reply = "Programming issue. How did this pass verify?";
- return CTRL_CMD_ERROR;
- }
-
- cmd->reply = "No connection found";
-
- cic = atoi(cic_str);
- alert = atoi(alert_str);
-
- net = cmd->node;
- llist_for_each_entry(conn, &net->subscr_conns, entry) {
- if (conn->user_plane.msc_assigned_cic != cic)
- continue;
-
- /*
- * This is a hack. My E71 does not like to immediately
- * receive a release complete on a TCH. So schedule a
- * release complete to clear any previous attempt. The
- * right thing would be to track invokeId and only send
- * the release complete when we get a returnResultLast
- * for this invoke id.
- */
- bsc_send_ussd_release_complete(conn);
- bsc_send_ussd_notify(conn, alert, text_str);
- cmd->reply = "Found a connection";
- break;
- }
-
- return CTRL_CMD_REPLY;
-}
-
-static int verify_net_ussd_notify(struct ctrl_cmd *cmd, const char *value, void *data)
-{
- char *saveptr = NULL;
- char *inp, *cic, *alert, *text;
-
- OSMO_ASSERT(cmd);
- inp = talloc_strdup(cmd, value);
-
- cic = strtok_r(inp, ",", &saveptr);
- alert = strtok_r(NULL, ",", &saveptr);
- text = strtok_r(NULL, ",", &saveptr);
-
- talloc_free(inp);
- if (!cic || !alert || !text)
- return 1;
- return 0;
-}
-
static int msc_signal_handler(unsigned int subsys, unsigned int signal,
void *handler_data, void *signal_data)
{
@@ -791,9 +726,6 @@
rc = ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_inform_msc);
if (rc)
goto end;
- rc = ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_ussd_notify);
- if (rc)
- goto end;
rc = osmo_signal_register_handler(SS_L_INPUT, &bts_connection_status_trap_cb, net);
end:
diff --git a/src/osmo-bsc/osmo_bsc_filter.c b/src/osmo-bsc/osmo_bsc_filter.c
index b4985f2..98b5148 100644
--- a/src/osmo-bsc/osmo_bsc_filter.c
+++ b/src/osmo-bsc/osmo_bsc_filter.c
@@ -21,7 +21,6 @@
#include <osmocom/bsc/osmo_bsc.h>
#include <osmocom/bsc/bsc_msc_data.h>
-#include <osmocom/bsc/gsm_04_80.h>
#include <osmocom/bsc/gsm_04_08_rr.h>
#include <osmocom/bsc/bsc_subscriber.h>
#include <osmocom/bsc/debug.h>
@@ -30,16 +29,6 @@
#include <stdlib.h>
-static int send_welcome_ussd(struct gsm_subscriber_connection *conn)
-{
- if (!conn->sccp.msc->ussd_welcome_txt) {
- LOGP(DMSC, LOGL_DEBUG, "No USSD Welcome text defined.\n");
- return 0;
- }
-
- return BSS_SEND_USSD;
-}
-
static int bsc_patch_mm_info(struct gsm_subscriber_connection *conn,
uint8_t *data, unsigned int length)
{
@@ -150,9 +139,6 @@
gsm48_generate_lai2(lai, bts_lai(conn_get_bts(conn)));
}
}
-
- if (conn->new_subscriber)
- return send_welcome_ussd(conn);
return 0;
} else if (mtype == GSM48_MT_MM_INFO) {
bsc_patch_mm_info(conn, &gh->data[0], length);
diff --git a/src/osmo-bsc/osmo_bsc_grace.c b/src/osmo-bsc/osmo_bsc_grace.c
index 2cc3d1a..9ee84d4 100644
--- a/src/osmo-bsc/osmo_bsc_grace.c
+++ b/src/osmo-bsc/osmo_bsc_grace.c
@@ -21,7 +21,6 @@
#include <osmocom/bsc/osmo_bsc_grace.h>
#include <osmocom/bsc/osmo_bsc_rf.h>
#include <osmocom/bsc/bsc_msc_data.h>
-#include <osmocom/bsc/gsm_04_80.h>
#include <osmocom/bsc/bsc_subscriber.h>
#include <osmocom/bsc/paging.h>
#include <osmocom/bsc/signal.h>
@@ -72,78 +71,3 @@
return paging_request_bts(bts, subscr, chan_needed, msc);
return locked_paging_bts(bts, subscr, chan_needed, msc);
}
-
-static int handle_sub(struct gsm_lchan *lchan, const char *text)
-{
- struct gsm_subscriber_connection *conn;
-
- /* only send it to TCH */
- if (lchan->type != GSM_LCHAN_TCH_H && lchan->type != GSM_LCHAN_TCH_F)
- return -1;
-
- /* only send on the primary channel */
- conn = lchan->conn;
- if (!conn)
- return -1;
-
- if (conn->lchan != lchan)
- return -1;
-
- /* only when active */
- if (lchan->fi->state != LCHAN_ST_ESTABLISHED)
- return -1;
-
- bsc_send_ussd_notify(conn, 0, text);
- bsc_send_ussd_release_complete(conn);
-
- return 0;
-}
-
-/*
- * The place to handle the grace mode. Right now we will send
- * USSD messages to the subscriber, in the future we might start
- * a timer to have different modes for the grace period.
- */
-static int handle_grace(struct gsm_network *network)
-{
- int ts_nr, lchan_nr;
- struct gsm_bts *bts;
- struct gsm_bts_trx *trx;
-
- if (!network->bsc_data->mid_call_txt)
- return 0;
-
- llist_for_each_entry(bts, &network->bts_list, list) {
- llist_for_each_entry(trx, &bts->trx_list, list) {
- for (ts_nr = 0; ts_nr < TRX_NR_TS; ++ts_nr) {
- struct gsm_bts_trx_ts *ts = &trx->ts[ts_nr];
- for (lchan_nr = 0; lchan_nr < TS_MAX_LCHAN; ++lchan_nr) {
- handle_sub(&ts->lchan[lchan_nr],
- network->bsc_data->mid_call_txt);
- }
- }
- }
- }
- return 0;
-}
-
-static int handle_rf_signal(unsigned int subsys, unsigned int signal,
- void *handler_data, void *signal_data)
-{
- struct rf_signal_data *sig;
-
- if (subsys != SS_RF)
- return -1;
-
- sig = signal_data;
-
- if (signal == S_RF_GRACE)
- handle_grace(sig->net);
-
- return 0;
-}
-
-static __attribute__((constructor)) void on_dso_load_grace(void)
-{
- osmo_signal_register_handler(SS_RF, handle_rf_signal, NULL);
-}
diff --git a/src/osmo-bsc/osmo_bsc_sigtran.c b/src/osmo-bsc/osmo_bsc_sigtran.c
index d36c85d..cbf0fec 100644
--- a/src/osmo-bsc/osmo_bsc_sigtran.c
+++ b/src/osmo-bsc/osmo_bsc_sigtran.c
@@ -32,7 +32,6 @@
#include <osmocom/bsc/osmo_bsc_grace.h>
#include <osmocom/bsc/osmo_bsc_sigtran.h>
#include <osmocom/bsc/a_reset.h>
-#include <osmocom/bsc/gsm_04_80.h>
#include <osmocom/bsc/bsc_subscr_conn_fsm.h>
#include <osmocom/bsc/gsm_data.h>
#include <osmocom/mgcp_client/mgcp_common.h>
@@ -426,24 +425,6 @@
return rc;
}
-/* Send an USSD notification in case we loose the connection to the MSC */
-static void bsc_notify_msc_lost(struct gsm_subscriber_connection *conn)
-{
- /* Check if sccp conn is still present */
- if (!conn)
- return;
-
- /* check for config string */
- if (!conn->sccp.msc->ussd_msc_lost_txt)
- return;
- if (conn->sccp.msc->ussd_msc_lost_txt[0] == '\0')
- return;
-
- /* send USSD notification */
- bsc_send_ussd_notify(conn, 1, conn->sccp.msc->ussd_msc_lost_txt);
- bsc_send_ussd_release_complete(conn);
-}
-
/* Close all open sigtran connections and channels */
void osmo_bsc_sigtran_reset(const struct bsc_msc_data *msc)
{
@@ -456,9 +437,6 @@
/* We only may close connections which actually belong to this
* MSC. All other open connections are left untouched */
if (conn->sccp.msc == msc) {
- /* Notify active connection users via USSD that the MSC is down */
- bsc_notify_msc_lost(conn);
-
/* Take down all occopied RF channels */
/* Disconnect all Sigtran connections */
/* Delete subscriber connection */
diff --git a/src/osmo-bsc/osmo_bsc_vty.c b/src/osmo-bsc/osmo_bsc_vty.c
index 7791212..f86da65 100644
--- a/src/osmo-bsc/osmo_bsc_vty.c
+++ b/src/osmo-bsc/osmo_bsc_vty.c
@@ -120,21 +120,6 @@
vty_out(vty, " core-cell-identity %d%s",
msc->core_ci, VTY_NEWLINE);
- if (msc->ussd_welcome_txt)
- vty_out(vty, " bsc-welcome-text %s%s", msc->ussd_welcome_txt, VTY_NEWLINE);
- else
- vty_out(vty, " no bsc-welcome-text%s", VTY_NEWLINE);
-
- if (msc->ussd_msc_lost_txt && msc->ussd_msc_lost_txt[0])
- vty_out(vty, " bsc-msc-lost-text %s%s", msc->ussd_msc_lost_txt, VTY_NEWLINE);
- else
- vty_out(vty, " no bsc-msc-lost-text%s", VTY_NEWLINE);
-
- if (msc->ussd_grace_txt && msc->ussd_grace_txt[0])
- vty_out(vty, " bsc-grace-text %s%s", msc->ussd_grace_txt, VTY_NEWLINE);
- else
- vty_out(vty, " no bsc-grace-text%s", VTY_NEWLINE);
-
if (msc->audio_length != 0) {
int i;
@@ -210,8 +195,6 @@
struct osmo_bsc_data *bsc = osmo_bsc_data(vty);
vty_out(vty, "bsc%s", VTY_NEWLINE);
- if (bsc->mid_call_txt)
- vty_out(vty, " mid-call-text %s%s", bsc->mid_call_txt, VTY_NEWLINE);
vty_out(vty, " mid-call-timeout %d%s", bsc->mid_call_timeout, VTY_NEWLINE);
if (bsc->rf_ctrl_name)
vty_out(vty, " bsc-rf-socket %s%s",
@@ -221,11 +204,6 @@
vty_out(vty, " bsc-auto-rf-off %d%s",
bsc->auto_off_timeout, VTY_NEWLINE);
- if (bsc->ussd_no_msc_txt && bsc->ussd_no_msc_txt[0])
- vty_out(vty, " missing-msc-text %s%s", bsc->ussd_no_msc_txt, VTY_NEWLINE);
- else
- vty_out(vty, " no missing-msc-text%s", VTY_NEWLINE);
-
return CMD_SUCCESS;
}
@@ -339,119 +317,6 @@
return CMD_ERR_INCOMPLETE;
}
-DEFUN(cfg_net_msc_welcome_ussd,
- cfg_net_msc_welcome_ussd_cmd,
- "bsc-welcome-text .TEXT",
- "Set the USSD notification to be sent\n" "Text to be sent\n")
-{
- struct bsc_msc_data *data = bsc_msc_data(vty);
- char *str = argv_concat(argv, argc, 0);
- if (!str)
- return CMD_WARNING;
-
- osmo_talloc_replace_string(osmo_bsc_data(vty), &data->ussd_welcome_txt, str);
- talloc_free(str);
- return CMD_SUCCESS;
-}
-
-DEFUN(cfg_net_msc_no_welcome_ussd,
- cfg_net_msc_no_welcome_ussd_cmd,
- "no bsc-welcome-text",
- NO_STR "Clear the USSD notification to be sent\n")
-{
- struct bsc_msc_data *data = bsc_msc_data(vty);
-
- talloc_free(data->ussd_welcome_txt);
- data->ussd_welcome_txt = NULL;
-
- return CMD_SUCCESS;
-}
-
-DEFUN(cfg_net_msc_lost_ussd,
- cfg_net_msc_lost_ussd_cmd,
- "bsc-msc-lost-text .TEXT",
- "Set the USSD notification to be sent on MSC connection loss\n" "Text to be sent\n")
-{
- struct bsc_msc_data *data = bsc_msc_data(vty);
- char *str = argv_concat(argv, argc, 0);
- if (!str)
- return CMD_WARNING;
-
- osmo_talloc_replace_string(osmo_bsc_data(vty), &data->ussd_msc_lost_txt, str);
- talloc_free(str);
- return CMD_SUCCESS;
-}
-
-DEFUN(cfg_net_msc_no_lost_ussd,
- cfg_net_msc_no_lost_ussd_cmd,
- "no bsc-msc-lost-text",
- NO_STR "Clear the USSD notification to be sent on MSC connection loss\n")
-{
- struct bsc_msc_data *data = bsc_msc_data(vty);
-
- talloc_free(data->ussd_msc_lost_txt);
- data->ussd_msc_lost_txt = 0;
-
- return CMD_SUCCESS;
-}
-
-DEFUN(cfg_net_msc_grace_ussd,
- cfg_net_msc_grace_ussd_cmd,
- "bsc-grace-text .TEXT",
- "Set the USSD notification to be sent when the MSC has entered the grace period\n" "Text to be sent\n")
-{
- struct bsc_msc_data *data = bsc_msc_data(vty);
- char *str = argv_concat(argv, argc, 0);
- if (!str)
- return CMD_WARNING;
-
- osmo_talloc_replace_string(osmo_bsc_data(vty), &data->ussd_grace_txt, str);
- talloc_free(str);
- return CMD_SUCCESS;
-}
-
-DEFUN(cfg_net_msc_no_grace_ussd,
- cfg_net_msc_no_grace_ussd_cmd,
- "no bsc-grace-text",
- NO_STR "Clear the USSD notification to be sent when the MSC has entered the grace period\n")
-{
- struct bsc_msc_data *data = bsc_msc_data(vty);
-
- talloc_free(data->ussd_grace_txt);
- data->ussd_grace_txt = NULL;
-
- return CMD_SUCCESS;
-}
-
-DEFUN(cfg_net_bsc_missing_msc_ussd,
- cfg_net_bsc_missing_msc_ussd_cmd,
- "missing-msc-text .TEXT",
- "Set the USSD notification to be send when a MSC has not been found.\n" "Text to be sent\n")
-{
- struct osmo_bsc_data *data = osmo_bsc_data(vty);
- char *txt = argv_concat(argv, argc, 0);
- if (!txt)
- return CMD_WARNING;
-
- osmo_talloc_replace_string(data, &data->ussd_no_msc_txt, txt);
- talloc_free(txt);
- return CMD_SUCCESS;
-}
-
-DEFUN(cfg_net_bsc_no_missing_msc_text,
- cfg_net_bsc_no_missing_msc_text_cmd,
- "no missing-msc-text",
- NO_STR "Clear the USSD notification to be send when a MSC has not been found.\n")
-{
- struct osmo_bsc_data *data = osmo_bsc_data(vty);
-
- talloc_free(data->ussd_no_msc_txt);
- data->ussd_no_msc_txt = 0;
-
- return CMD_SUCCESS;
-}
-
-
DEFUN(cfg_net_msc_type,
cfg_net_msc_type_cmd,
"type (normal|local)",
@@ -670,22 +535,6 @@
return CMD_SUCCESS;
}
-DEFUN(cfg_net_bsc_mid_call_text,
- cfg_net_bsc_mid_call_text_cmd,
- "mid-call-text .TEXT",
- "Set the USSD notification sent to running calls when switching from Grace to Off.\n"
- "Text to be sent\n")
-{
- struct osmo_bsc_data *data = osmo_bsc_data(vty);
- char *txt = argv_concat(argv, argc, 0);
- if (!txt)
- return CMD_WARNING;
-
- osmo_talloc_replace_string(data, &data->mid_call_txt, txt);
- talloc_free(txt);
- return CMD_SUCCESS;
-}
-
DEFUN(cfg_net_bsc_mid_call_timeout,
cfg_net_bsc_mid_call_timeout_cmd,
"mid-call-timeout NR",
@@ -917,13 +766,10 @@
install_element(CONFIG_NODE, &cfg_net_bsc_cmd);
install_node(&bsc_node, config_write_bsc);
- install_element(BSC_NODE, &cfg_net_bsc_mid_call_text_cmd);
install_element(BSC_NODE, &cfg_net_bsc_mid_call_timeout_cmd);
install_element(BSC_NODE, &cfg_net_rf_socket_cmd);
install_element(BSC_NODE, &cfg_net_rf_off_time_cmd);
install_element(BSC_NODE, &cfg_net_no_rf_off_time_cmd);
- install_element(BSC_NODE, &cfg_net_bsc_missing_msc_ussd_cmd);
- install_element(BSC_NODE, &cfg_net_bsc_no_missing_msc_text_cmd);
install_node(&msc_node, config_write_msc);
install_element(MSC_NODE, &cfg_net_bsc_ncc_cmd);
@@ -934,12 +780,6 @@
install_element(MSC_NODE, &cfg_net_bsc_codec_list_cmd);
install_element(MSC_NODE, &cfg_net_msc_dest_cmd);
install_element(MSC_NODE, &cfg_net_msc_no_dest_cmd);
- install_element(MSC_NODE, &cfg_net_msc_welcome_ussd_cmd);
- install_element(MSC_NODE, &cfg_net_msc_no_welcome_ussd_cmd);
- install_element(MSC_NODE, &cfg_net_msc_lost_ussd_cmd);
- install_element(MSC_NODE, &cfg_net_msc_no_lost_ussd_cmd);
- install_element(MSC_NODE, &cfg_net_msc_grace_ussd_cmd);
- install_element(MSC_NODE, &cfg_net_msc_no_grace_ussd_cmd);
install_element(MSC_NODE, &cfg_net_msc_type_cmd);
install_element(MSC_NODE, &cfg_net_msc_emerg_cmd);
install_element(MSC_NODE, &cfg_net_msc_amr_12_2_cmd);
diff --git a/tests/bsc/bsc_test.c b/tests/bsc/bsc_test.c
index 5d87118..164f78f 100644
--- a/tests/bsc/bsc_test.c
+++ b/tests/bsc/bsc_test.c
@@ -29,7 +29,6 @@
#include <osmocom/bsc/osmo_bsc.h>
#include <osmocom/bsc/bsc_msc_data.h>
-#include <osmocom/bsc/gsm_04_80.h>
#include <osmocom/core/application.h>
#include <osmocom/core/backtrace.h>
diff --git a/tests/codec_pref/codec_pref_test.c b/tests/codec_pref/codec_pref_test.c
index 8bc31cd..f163f35 100644
--- a/tests/codec_pref/codec_pref_test.c
+++ b/tests/codec_pref/codec_pref_test.c
@@ -22,7 +22,6 @@
#include <osmocom/bsc/gsm_data.h>
#include <osmocom/bsc/osmo_bsc.h>
#include <osmocom/bsc/bsc_msc_data.h>
-#include <osmocom/bsc/gsm_04_80.h>
#include <osmocom/core/application.h>
#include <osmocom/bsc/codec_pref.h>
diff --git a/tests/handover/Makefile.am b/tests/handover/Makefile.am
index 901d523..84865a0 100644
--- a/tests/handover/Makefile.am
+++ b/tests/handover/Makefile.am
@@ -63,7 +63,6 @@
$(top_builddir)/src/osmo-bsc/chan_alloc.o \
$(top_builddir)/src/osmo-bsc/codec_pref.o \
$(top_builddir)/src/osmo-bsc/gsm_04_08_rr.o \
- $(top_builddir)/src/osmo-bsc/gsm_04_80_utils.o \
$(top_builddir)/src/osmo-bsc/gsm_data.o \
$(top_builddir)/src/osmo-bsc/handover_cfg.o \
$(top_builddir)/src/osmo-bsc/handover_decision.o \
diff --git a/tests/vty_test_runner.py b/tests/vty_test_runner.py
index a99bf4b..c96965c 100755
--- a/tests/vty_test_runner.py
+++ b/tests/vty_test_runner.py
@@ -135,68 +135,6 @@
self.assertTrue(self.vty.verify("exit", ['']))
self.assertTrue(self.vty.node() is None)
- def testUssdNotificationsMsc(self):
- self.vty.enable()
- self.vty.command("configure terminal")
- self.vty.command("msc")
-
- # Test invalid input
- self.vty.verify("bsc-msc-lost-text", ['% Command incomplete.'])
- self.vty.verify("bsc-welcome-text", ['% Command incomplete.'])
- self.vty.verify("bsc-grace-text", ['% Command incomplete.'])
-
- # Enable USSD notifications
- self.vty.verify("bsc-msc-lost-text MSC disconnected", [''])
- self.vty.verify("bsc-welcome-text Hello MS", [''])
- self.vty.verify("bsc-grace-text In grace period", [''])
-
- # Verify settings
- res = self.vty.command("write terminal")
- self.assertTrue(res.find('bsc-msc-lost-text MSC disconnected') > 0)
- self.assertEqual(res.find('no bsc-msc-lost-text'), -1)
- self.assertTrue(res.find('bsc-welcome-text Hello MS') > 0)
- self.assertEqual(res.find('no bsc-welcome-text'), -1)
- self.assertTrue(res.find('bsc-grace-text In grace period') > 0)
- self.assertEqual(res.find('no bsc-grace-text'), -1)
-
- # Now disable it..
- self.vty.verify("no bsc-msc-lost-text", [''])
- self.vty.verify("no bsc-welcome-text", [''])
- self.vty.verify("no bsc-grace-text", [''])
-
- # Verify settings
- res = self.vty.command("write terminal")
- self.assertEqual(res.find('bsc-msc-lost-text MSC disconnected'), -1)
- self.assertTrue(res.find('no bsc-msc-lost-text') > 0)
- self.assertEqual(res.find('bsc-welcome-text Hello MS'), -1)
- self.assertTrue(res.find('no bsc-welcome-text') > 0)
- self.assertEqual(res.find('bsc-grace-text In grace period'), -1)
- self.assertTrue(res.find('no bsc-grace-text') > 0)
-
- def testUssdNotificationsBsc(self):
- self.vty.enable()
- self.vty.command("configure terminal")
- self.vty.command("bsc")
-
- # Test invalid input
- self.vty.verify("missing-msc-text", ['% Command incomplete.'])
-
- # Enable USSD notifications
- self.vty.verify("missing-msc-text No MSC found", [''])
-
- # Verify settings
- res = self.vty.command("write terminal")
- self.assertTrue(res.find('missing-msc-text No MSC found') > 0)
- self.assertEqual(res.find('no missing-msc-text'), -1)
-
- # Now disable it..
- self.vty.verify("no missing-msc-text", [''])
-
- # Verify settings
- res = self.vty.command("write terminal")
- self.assertEqual(res.find('missing-msc-text No MSC found'), -1)
- self.assertTrue(res.find('no missing-msc-text') > 0)
-
def testNetworkTimezone(self):
self.vty.enable()
self.vty.verify("configure terminal", [''])
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/18498
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Iaef6f2e01b4dbf2bff0a0bb50d6851f50ae79f6a
Gerrit-Change-Number: 18498
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200526/238e5b30/attachment.htm>