From 991bb422d417d24b25c40dbca5b312c385a5a668 Mon Sep 17 00:00:00 2001 From: Keith Whyte Date: Thu, 8 Aug 2019 15:43:40 +0200 Subject: Implement a global switch on the network to disable call waiting. 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 --- src/libmsc/msc_vty.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'src/libmsc/msc_vty.c') 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); -- cgit v1.2.3