aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/vty_interface_layer3.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-07-27 18:27:46 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-07-27 18:27:46 +0800
commite731e1d6dd4a8371ca2d9f8142b9afaeedd012a4 (patch)
tree2dfbd474fa714a5aa2088c065b7fe344f7a4c64d /openbsc/src/vty_interface_layer3.c
parent44d0f197873a9d79b89c524612f20d2e63ab28c9 (diff)
gsm_04_80: Allow to specify the alert pattern for the notification
Allow to specify the level (not the category) of the notification this provides an easy way to test it on the phones.
Diffstat (limited to 'openbsc/src/vty_interface_layer3.c')
-rw-r--r--openbsc/src/vty_interface_layer3.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/openbsc/src/vty_interface_layer3.c b/openbsc/src/vty_interface_layer3.c
index b775af139..55fe1c065 100644
--- a/openbsc/src/vty_interface_layer3.c
+++ b/openbsc/src/vty_interface_layer3.c
@@ -375,9 +375,10 @@ DEFUN(subscriber_silent_call_stop,
DEFUN(subscriber_ussd_notify,
subscriber_ussd_notify_cmd,
- "subscriber " SUBSCR_TYPES " ID ussd-notify .TEXT",
+ "subscriber " SUBSCR_TYPES " ID ussd-notify (0|1|2) .TEXT",
SUBSCR_HELP "USSD Notify\n"
"Subscriber ID\n"
+ "Alerting Level\n"
"Text Message to send\n")
{
char *text;
@@ -385,6 +386,7 @@ DEFUN(subscriber_ussd_notify,
struct gsm_network *gsmnet = gsmnet_from_vty(vty);
struct gsm_subscriber *subscr = get_subscr_by_argv(gsmnet, argv[0], argv[1]);
int rc;
+ int level;
if (!subscr) {
vty_out(vty, "%% No subscriber found for %s %s%s",
@@ -392,7 +394,8 @@ DEFUN(subscriber_ussd_notify,
return CMD_WARNING;
}
- text = argv_concat(argv, argc, 2);
+ level = atoi(argv[2]);
+ text = argv_concat(argv, argc, 3);
if (!text) {
subscr_put(subscr);
return CMD_WARNING;
@@ -407,7 +410,7 @@ DEFUN(subscriber_ussd_notify,
return CMD_WARNING;
}
- gsm0480_send_ussdNotify(conn, text);
+ gsm0480_send_ussdNotify(conn, level, text);
gsm0480_send_releaseComplete(conn);
subscr_put(subscr);