aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmsc/msc_vty.c
diff options
context:
space:
mode:
authorKeith Whyte <keith@rhizomatica.org>2019-08-08 15:43:40 +0200
committergsmevent admin <admin@gsmevent.box>2019-08-24 15:48:42 +0200
commit5b47ac2bf6c97cc4fbbbd5567bcec61478a2eb55 (patch)
treed24d641c9b77c0b58539e3cc28ba695a05021198 /src/libmsc/msc_vty.c
parent9e6ec575879050db9878e31fe801017222be5542 (diff)
Implement a global switch on the network to disable call waiting.cccamp2019
Add a network -> callwaiting VTY command as boolean. When this is enabled (default) there is no change to operation previous to this commit. When this switch is disabled with "no call-waiting" in vty then when a call arrives, we will check if we have an active call transaction for this subscriber, no matter if it is establishing, established, or alerting, in any of these cases we will return USER BUSY to the calling party. Change-Id: I3eb6f23f7103e3002874fb5d3a30c9de952202ae
Diffstat (limited to 'src/libmsc/msc_vty.c')
-rw-r--r--src/libmsc/msc_vty.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c
index 4674e2e68..09aef9168 100644
--- a/src/libmsc/msc_vty.c
+++ b/src/libmsc/msc_vty.c
@@ -330,6 +330,29 @@ DEFUN(cfg_net_no_per_loc_upd, cfg_net_no_per_loc_upd_cmd,
return CMD_SUCCESS;
}
+DEFUN(cfg_net_call_wait, cfg_net_call_wait_cmd,
+ "call-waiting",
+ "Enable Call Waiting on the Network\n")
+{
+ struct gsm_network *net = vty->index;
+
+ net->call_waiting = true;
+
+ return CMD_SUCCESS;
+}
+
+DEFUN(cfg_net_no_call_wait, cfg_net_no_call_wait_cmd,
+ "no call-waiting",
+ NO_STR
+ "Disable Call Waiting on the Network\n")
+{
+ struct gsm_network *net = vty->index;
+
+ net->call_waiting = false;
+
+ return CMD_SUCCESS;
+}
+
static int config_write_net(struct vty *vty)
{
int i;
@@ -376,6 +399,9 @@ static int config_write_net(struct vty *vty)
gsmnet->emergency.route_to_msisdn, VTY_NEWLINE);
}
+ if (!gsmnet->call_waiting)
+ vty_out(vty, " no call-waiting%s", VTY_NEWLINE);
+
return CMD_SUCCESS;
}
@@ -1946,6 +1972,8 @@ void msc_vty_init(struct gsm_network *msc_network)
install_element(GSMNET_NODE, &cfg_net_no_timezone_cmd);
install_element(GSMNET_NODE, &cfg_net_per_loc_upd_cmd);
install_element(GSMNET_NODE, &cfg_net_no_per_loc_upd_cmd);
+ install_element(GSMNET_NODE, &cfg_net_call_wait_cmd);
+ install_element(GSMNET_NODE, &cfg_net_no_call_wait_cmd);
install_element(CONFIG_NODE, &cfg_msc_cmd);
install_node(&msc_node, config_write_msc);