aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmsc/msc_vty.c
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2017-12-15 03:02:27 +0100
committerNeels Hofmeyr <neels@hofmeyr.de>2017-12-20 23:07:10 +0100
commit2ff5bcdc387a7eb5135e5a54d55027502952c86b (patch)
tree602296791799e12d7f1aab0f635694d211c69ac8 /src/libmsc/msc_vty.c
parentc1d69256f61e6bc7bdcbbd1b4df6a779c7883891 (diff)
fix paging: add timeout to discard unsuccessful paging
Currently, if there is no reply from the BSS / RNC, a subscriber will remain as "already paged" forever, and is never going to be paged again. Even on IMSI Detach, the pending request will keep a ref count on the vlr_subscr. Add a paging timeout, as gsm_network->paging_timeout and in the VTY on the 'msc' node as 'paging timeout (default|<1-65535>'. (There is a 'network' / 'T3113' in OsmoBSC, but to not confuse the two, give this a different name.) Add test_ms_timeout_paging() test to verify the timeout works. I hit this while testing Paging across multiple hNodeB, when a UE lost connection to the hNodeB. I noticed that no matter how long I wait, no Paging is sent out anymore, and found this embarrassing issue. Good grief... The choice of 10 seconds is taken from https://osmocom.org/issues/2756 Change-Id: I2db6f1e2ad341cf9c2cc7a21ec2fca0bae5b2db5
Diffstat (limited to 'src/libmsc/msc_vty.c')
-rw-r--r--src/libmsc/msc_vty.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c
index 14ad19ec1..c1c9f6bcf 100644
--- a/src/libmsc/msc_vty.c
+++ b/src/libmsc/msc_vty.c
@@ -109,6 +109,22 @@ DEFUN(cfg_msc_auth_tuple_reuse_on_error, cfg_msc_auth_tuple_reuse_on_error_cmd,
return CMD_SUCCESS;
}
+DEFUN(cfg_msc_paging_response_timer, cfg_msc_paging_response_timer_cmd,
+ "paging response-timer (default|<1-65535>)",
+ "Configure Paging\n"
+ "Set Paging timeout, the minimum time to pass between (unsuccessful) Pagings sent towards"
+ " BSS or RNC\n"
+ "Set to default timeout (" OSMO_STRINGIFY_VAL(MSC_PAGING_RESPONSE_TIMER_DEFAULT) " seconds)\n"
+ "Set paging timeout in seconds\n")
+{
+ struct gsm_network *gsmnet = gsmnet_from_vty(vty);
+ if (!strcmp(argv[1], "default"))
+ gsmnet->paging_response_timer = MSC_PAGING_RESPONSE_TIMER_DEFAULT;
+ else
+ gsmnet->paging_response_timer = atoi(argv[0]);
+ return CMD_SUCCESS;
+}
+
static int config_write_msc(struct vty *vty)
{
struct gsm_network *gsmnet = gsmnet_from_vty(vty);
@@ -130,6 +146,9 @@ static int config_write_msc(struct vty *vty)
vty_out(vty, " auth-tuple-reuse-on-error 1%s",
VTY_NEWLINE);
+ if (gsmnet->paging_response_timer != MSC_PAGING_RESPONSE_TIMER_DEFAULT)
+ vty_out(vty, " paging response-timer %u%s", gsmnet->paging_response_timer, VTY_NEWLINE);
+
mgcp_client_config_write(vty, " ");
#ifdef BUILD_IU
ranap_iu_vty_config_write(vty, " ");
@@ -186,6 +205,7 @@ void msc_vty_init(struct gsm_network *msc_network)
install_element(MSC_NODE, &cfg_msc_auth_tuple_reuse_on_error_cmd);
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);
mgcp_client_vty_init(msc_network, MSC_NODE, &msc_network->mgw.conf);
#ifdef BUILD_IU