From 948747b38519ea3605060c6227280123737fa3c0 Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Tue, 2 Apr 2019 15:22:33 +0200 Subject: MSC_Tests: add function to check if a subscriber is in VLR The control interface of osmo-msc is able to return a list with all active subscribers from the VLR. Lets add a function, so that we can check from TTCN3 if a specified subscriber is known by the VLR or not. Change-Id: I7661ae55afe34795c3701d59795331b32d64c988 Related: OS#3614 --- msc/MSC_Tests.ttcn | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'msc') diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index 6b2b2597..a15fa57d 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -63,6 +63,8 @@ import from SS_Templates all; import from USSD_Helpers all; import from DNS_Helpers all; +import from TCCConversion_Functions all; + const integer NUM_BSC := 2; type record of BSSAP_Configuration BSSAP_Configurations; @@ -3540,6 +3542,21 @@ testcase TC_cipher_complete_with_invalid_cipher() runs on MTC_CT { * too long / short TLV values */ +/* Check if a subscriber exists in the VLR */ +private function f_ctrl_subscr_in_vlr(charstring imsi_or_msisdn) runs on BSC_ConnHdlr return boolean { + + var CtrlValue active_subsribers; + var integer rc; + active_subsribers := f_ctrl_get(IPA_CTRL, "subscriber-list-active-v1"); + + rc := f_strstr(active_subsribers, imsi_or_msisdn); + if (rc < 0) { + return false; + } + + return true; +} + /* Perform a location updatye at the A-Interface and run some checks to confirm * that everything is back to normal. */ private function f_sgsap_bssmap_screening() runs on BSC_ConnHdlr { -- cgit v1.2.3