Change in ...osmo-msc[master]: Introduce multiple paging attempts

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

lynxis lazus gerrit-no-reply at lists.osmocom.org
Thu Sep 12 01:53:52 UTC 2019


lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/15494


Change subject: Introduce multiple paging attempts
......................................................................

Introduce multiple paging attempts

Some MS/UE might not be reachable on the first attempt.
E.g. when the MS/UE is moving between channels it might not
respond to paging.

Change-Id: I32c47958939a4a29292832289f9d29905731d7f3
---
M include/osmocom/msc/gsm_data.h
M include/osmocom/msc/paging.h
M src/libmsc/msc_net_init.c
M src/libmsc/msc_vty.c
M src/libmsc/paging.c
5 files changed, 39 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/94/15494/1

diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h
index 11b6e82..faabb88 100644
--- a/include/osmocom/msc/gsm_data.h
+++ b/include/osmocom/msc/gsm_data.h
@@ -124,6 +124,7 @@
 };
 
 #define MSC_PAGING_RESPONSE_TIMER_DEFAULT 10
+#define MSC_PAGING_ATTEMPTS 3
 
 struct gsm_tz {
 	int override; /* if 0, use system's time zone instead. */
@@ -171,6 +172,8 @@
 	struct llist_head trans_list;
 
 	unsigned int paging_response_timer;
+	/* how often a paging should be attempted */
+	unsigned int paging_attempts;
 
 	/* Radio Resource Location Protocol (TS 04.31) */
 	struct {
diff --git a/include/osmocom/msc/paging.h b/include/osmocom/msc/paging.h
index 4de679d..bbe455c 100644
--- a/include/osmocom/msc/paging.h
+++ b/include/osmocom/msc/paging.h
@@ -35,6 +35,7 @@
        /* the callback data */
        paging_cb_t paging_cb;
        struct gsm_trans *trans;
+       int attempts;
 };
 
 struct paging_request *paging_request_start(struct vlr_subscr *vsub, enum paging_cause cause,
diff --git a/src/libmsc/msc_net_init.c b/src/libmsc/msc_net_init.c
index 91b6165..4ab974c 100644
--- a/src/libmsc/msc_net_init.c
+++ b/src/libmsc/msc_net_init.c
@@ -58,6 +58,7 @@
 	net->ncss_guard_timeout = 30;
 
 	net->paging_response_timer = MSC_PAGING_RESPONSE_TIMER_DEFAULT;
+	net->paging_attempts = MSC_PAGING_RESPONSE_TIMER_DEFAULT;
 
 	INIT_LLIST_HEAD(&net->trans_list);
 	INIT_LLIST_HEAD(&net->upqueue);
diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c
index 09aef91..6db2bb1 100644
--- a/src/libmsc/msc_vty.c
+++ b/src/libmsc/msc_vty.c
@@ -564,6 +564,21 @@
 	return CMD_SUCCESS;
 }
 
+DEFUN(cfg_msc_paging_attempts, cfg_msc_paging_attempts_cmd,
+      "paging attempts (default|<1-10>)",
+      "Configure Paging\n"
+      "Set Paging attempts, how often the paging should be attempted before giving up"
+      " BSS or RNC\n"
+      "Set to default attempts (" OSMO_STRINGIFY_VAL(MSC_PAGING_ATTEMPTS) " seconds)\n"
+      "Set paging attempts\n")
+{
+	if (!strcmp(argv[1], "default"))
+		gsmnet->paging_attempts = MSC_PAGING_ATTEMPTS;
+	else
+		gsmnet->paging_attempts = atoi(argv[0]);
+	return CMD_SUCCESS;
+}
+
 DEFUN(cfg_msc_emergency_msisdn, cfg_msc_emergency_msisdn_cmd,
       "emergency-call route-to-msisdn MSISDN",
       "Configure Emergency Call Behaviour\n"
@@ -691,6 +706,9 @@
 	if (gsmnet->paging_response_timer != MSC_PAGING_RESPONSE_TIMER_DEFAULT)
 		vty_out(vty, " paging response-timer %u%s", gsmnet->paging_response_timer, VTY_NEWLINE);
 
+	if (gsmnet->paging_attempts != MSC_PAGING_ATTEMPTS)
+		vty_out(vty, " paging attempts %u%s", gsmnet->paging_attempts, VTY_NEWLINE);
+
 	if (gsmnet->emergency.route_to_msisdn) {
 		vty_out(vty, " emergency-call route-to-msisdn %s%s",
 			gsmnet->emergency.route_to_msisdn, VTY_NEWLINE);
@@ -1990,6 +2008,7 @@
 	install_element(MSC_NODE, &cfg_msc_cs7_instance_a_cmd);
 	install_element(MSC_NODE, &cfg_msc_cs7_instance_iu_cmd);
 	install_element(MSC_NODE, &cfg_msc_paging_response_timer_cmd);
+	install_element(MSC_NODE, &cfg_msc_paging_attempts_cmd);
 	install_element(MSC_NODE, &cfg_msc_emergency_msisdn_cmd);
 	install_element(MSC_NODE, &cfg_msc_sms_over_gsup_cmd);
 	install_element(MSC_NODE, &cfg_msc_no_sms_over_gsup_cmd);
diff --git a/src/libmsc/paging.c b/src/libmsc/paging.c
index 182b036..15481ff 100644
--- a/src/libmsc/paging.c
+++ b/src/libmsc/paging.c
@@ -89,6 +89,7 @@
 		.cause = cause,
 		.paging_cb = paging_cb,
 		.trans = trans,
+		.attempts = 0,
 	};
 
 	if (vsub->cs.is_paging) {
@@ -130,6 +131,7 @@
 
 static void paging_concludes(struct vlr_subscr *vsub, struct msc_a *msc_a)
 {
+	struct gsm_network *net = vsub->vlr->user_ctx;
 	struct paging_request *pr, *pr_next;
 	struct paging_signal_data sig_data;
 
@@ -138,10 +140,21 @@
 	llist_for_each_entry_safe(pr, pr_next, &vsub->cs.requests, entry) {
 		struct gsm_trans *trans = pr->trans;
 		paging_cb_t paging_cb = pr->paging_cb;
+		const char *retry_str = "";
 
-		LOG_PAGING(vsub, pr, LOGL_DEBUG, "Paging Response action (%s)%s\n",
+		pr->attempts++;
+		if (!msc_a && pr->attempts < net->paging_attempts)
+			retry_str = "(retrying)";
+
+		LOG_PAGING(vsub, pr, LOGL_DEBUG, "Paging Response action (%s)%s%s\n",
 			   msc_a ? "success" : "expired",
-			   paging_cb ? "" : " (no action defined)");
+			   paging_cb ? "" : " (no action defined)",
+			   retry_str);
+
+		if (!msc_a && pr->attempts < net->paging_attempts) {
+			msc_paging_request(pr, vsub);
+			continue;
+		}
 
 		/* Remove the paging request before the paging_cb could deallocate e.g. the trans */
 		paging_request_remove(pr);

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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I32c47958939a4a29292832289f9d29905731d7f3
Gerrit-Change-Number: 15494
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190912/452e19c4/attachment.htm>


More information about the gerrit-log mailing list