aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libmsc/smpp_vty.c
diff options
context:
space:
mode:
authorKeith <keith@rhizomatica.org>2019-01-17 00:24:19 +0000
committerKeith <keith@rhizomatica.org>2019-01-17 01:29:07 +0100
commit4365ca3ffd23572286101a28057fc555b0a4a219 (patch)
treee517157d0cbeda980a661150018f67449aeed4bf /openbsc/src/libmsc/smpp_vty.c
parent32ece274bf42880f9e89809c8266aa69f41a44bb (diff)
Make alert notifications vty configurable per ESME
OSMO-MSC backport Adds (no) alert-notifications as a per-esme vty command, in order to allow some ESMEs to be excluded from alerts. The default is still to send alert notifications to all esme, so no changes are required to the config file to maintain identical operation after this patch. Change-Id: I2b52f2778b24eebc82b2e5e2fb3c2250b1f9e5b0
Diffstat (limited to 'openbsc/src/libmsc/smpp_vty.c')
-rw-r--r--openbsc/src/libmsc/smpp_vty.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/openbsc/src/libmsc/smpp_vty.c b/openbsc/src/libmsc/smpp_vty.c
index 0a8435808..ff0314e15 100644
--- a/openbsc/src/libmsc/smpp_vty.c
+++ b/openbsc/src/libmsc/smpp_vty.c
@@ -499,6 +499,28 @@ DEFUN(cfg_esme_no_dcs_transp, cfg_esme_no_dcs_transp_cmd,
return CMD_SUCCESS;
}
+DEFUN(cfg_esme_alert_notif, cfg_esme_alert_notif_cmd,
+ "alert-notifications",
+ "Disable sending of SMPP Alert Notifications for this ESME")
+{
+ struct osmo_smpp_acl *acl = vty->index;
+
+ acl->alert_notifications = 1;
+
+ return CMD_SUCCESS;
+}
+
+DEFUN(cfg_esme_no_alert_notif, cfg_esme_no_alert_notif_cmd,
+ "no alert-notifications", NO_STR
+ "Disable sending of SMPP Alert Notifications for this ESME")
+{
+ struct osmo_smpp_acl *acl = vty->index;
+
+ acl->alert_notifications = 0;
+
+ return CMD_SUCCESS;
+}
+
static void dump_one_esme(struct vty *vty, struct osmo_esme *esme)
{
@@ -560,6 +582,8 @@ static void config_write_esme_single(struct vty *vty, struct osmo_smpp_acl *acl)
vty_out(vty, " osmocom-extensions%s", VTY_NEWLINE);
if (acl->dcs_transparent)
vty_out(vty, " dcs-transparent%s", VTY_NEWLINE);
+ if (acl->alert_notifications)
+ vty_out(vty, " alert-notifications%s", VTY_NEWLINE);
llist_for_each_entry(r, &acl->route_list, list)
write_esme_route_single(vty, r);
@@ -603,6 +627,8 @@ int smpp_vty_init(void)
install_element(SMPP_ESME_NODE, &cfg_esme_no_osmo_ext_cmd);
install_element(SMPP_ESME_NODE, &cfg_esme_dcs_transp_cmd);
install_element(SMPP_ESME_NODE, &cfg_esme_no_dcs_transp_cmd);
+ install_element(SMPP_ESME_NODE, &cfg_esme_alert_notif_cmd);
+ install_element(SMPP_ESME_NODE, &cfg_esme_no_alert_notif_cmd);
install_element_ve(&show_esme_cmd);