summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2011-06-08 16:28:04 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2011-08-25 23:17:56 +0200
commit45a833b4cd0cc0f1d11a6467466ecf3d93407b33 (patch)
tree81baf1080b9909a4da501f162958bea42b7fd6f9
parent7c3524922b872cd5461dc16b8fca6753a4bb35e6 (diff)
bsc: Add vty function for the MSC type
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_vty.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_vty.c b/openbsc/src/osmo-bsc/osmo_bsc_vty.c
index dfbdaa2..356ed28 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_vty.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_vty.c
@@ -114,6 +114,9 @@ static void write_msc(struct vty *vty, struct osmo_msc_data *msc)
llist_for_each_entry(dest, &msc->dests, list)
vty_out(vty, " dest %s %d %d%s", dest->ip, dest->port,
dest->dscp, VTY_NEWLINE);
+
+ vty_out(vty, " type %s%s", msc->type == MSC_CON_TYPE_NORMAL ?
+ "normal" : "local", VTY_NEWLINE);
}
static int config_write_msc(struct vty *vty)
@@ -332,6 +335,22 @@ DEFUN(cfg_net_msc_welcome_ussd,
return CMD_SUCCESS;
}
+DEFUN(cfg_net_msc_type,
+ cfg_net_msc_type_cmd,
+ "type (normal|local)",
+ "Select the MSC type\n"
+ "Plain GSM MSC\n" "Special MSC for local call routing\n")
+{
+ struct osmo_msc_data *data = osmo_msc_data(vty);
+
+ if (strcmp(argv[0], "normal") == 0)
+ data->type = MSC_CON_TYPE_NORMAL;
+ else if (strcmp(argv[0], "local") == 0)
+ data->type = MSC_CON_TYPE_LOCAL;
+
+ return CMD_SUCCESS;
+}
+
DEFUN(cfg_net_bsc_mid_call_text,
cfg_net_bsc_mid_call_text_cmd,
"mid-call-text .TEXT",
@@ -402,6 +421,7 @@ int bsc_vty_init_extra(void)
install_element(MSC_NODE, &cfg_net_msc_ping_time_cmd);
install_element(MSC_NODE, &cfg_net_msc_pong_time_cmd);
install_element(MSC_NODE, &cfg_net_msc_welcome_ussd_cmd);
+ install_element(MSC_NODE, &cfg_net_msc_type_cmd);
install_element_ve(&show_statistics_cmd);