Change in osmo-sgsn[master]: vty: add "page imsi"

osmith gerrit-no-reply at lists.osmocom.org
Mon Aug 9 06:40:33 UTC 2021


osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/25161 )

Change subject: vty: add "page imsi"
......................................................................

vty: add "page imsi"

Make it easy to manually test pagings from SGSN to the PCU.

Related: SYS#4878
Change-Id: I8a73caa234f6b841e641be866e22e7fa03152eb7
---
M src/sgsn/sgsn_vty.c
1 file changed, 21 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/src/sgsn/sgsn_vty.c b/src/sgsn/sgsn_vty.c
index 30bd864..e0e2677 100644
--- a/src/sgsn/sgsn_vty.c
+++ b/src/sgsn/sgsn_vty.c
@@ -35,6 +35,7 @@
 #include <osmocom/sgsn/debug.h>
 #include <osmocom/sgsn/sgsn.h>
 #include <osmocom/gprs/gprs_ns2.h>
+#include <osmocom/sgsn/gprs_gb.h>
 #include <osmocom/sgsn/gprs_gmm.h>
 #include <osmocom/sgsn/gprs_sgsn.h>
 #include <osmocom/sgsn/gtp_mme.h>
@@ -1209,6 +1210,25 @@
 	return CMD_SUCCESS;
 }
 
+DEFUN(page_subscr, page_subscr_info_cmd,
+	"page imsi IMSI",
+	"Send a PS paging request to subscriber\n"
+	"Use the IMSI to select the subscriber\n"
+	"The IMSI\n")
+{
+	const char *imsi = argv[0];
+	struct sgsn_mm_ctx *mm;
+
+	mm = sgsn_mm_ctx_by_imsi(imsi);
+	if (!mm) {
+		vty_out(vty, "No MM context for IMSI %s%s", imsi, VTY_NEWLINE);
+		return CMD_WARNING;
+	}
+
+	gprs_gb_page_ps_ra(mm);
+	return CMD_SUCCESS;
+}
+
 DEFUN(cfg_gsup_ipa_name,
 	cfg_gsup_ipa_name_cmd,
 	"gsup ipa-name NAME",
@@ -1675,6 +1695,7 @@
 	install_element(ENABLE_NODE, &update_subscr_cancel_cmd);
 	install_element(ENABLE_NODE, &update_subscr_update_location_result_cmd);
 	install_element(ENABLE_NODE, &update_subscr_update_auth_info_cmd);
+	install_element(ENABLE_NODE, &page_subscr_info_cmd);
 	install_element(ENABLE_NODE, &reset_sgsn_state_cmd);
 
 	install_element(CONFIG_NODE, &cfg_sgsn_cmd);

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/25161
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I8a73caa234f6b841e641be866e22e7fa03152eb7
Gerrit-Change-Number: 25161
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210809/585adf62/attachment.htm>


More information about the gerrit-log mailing list