Commit Graph

118 Commits

Author SHA1 Message Date
Vadim Yanitskiy 7093a5d9a2 msc: as_{iu_release,clear_cmd}_compl_disc: remove no-op timer arguments
Change-Id: I1d3dcf4399dccd353702e4d6c53fe8e26e16ea9b
2024-03-27 16:55:40 +07:00
Pau Espin 1158cc629c Move SDP templates to its own SDP_Templates.ttcn file
SDP is used in other protocols than MGCP, eg. SIP.

Change-Id: I0610b4cf5533e46a3401c65e60c7cce975c85412
2024-03-22 11:28:51 +01:00
Pau Espin 8f1403a471 Move templates from GSUP_Types.ttcn to GSUP_Templates.ttcn
Follow similar structure that we have for other protocols.

Change-Id: I54cc8c99d1e91d57c3d5a92f6529ef2055e9d4ed
2024-01-18 20:22:34 +01:00
Andreas Eversberg 1733de3393 ASCI: Add tests for voice group/broadcast calls at MSC
Related: OS#4854
Change-Id: I4bbe739ea55ecf9f7ebf9ee413df69f29aa642f8
2023-08-30 09:18:55 +00:00
Oliver Smith 44424db278 msc: TC_ho_inter_bsc_csd: new test
Related: OS#4394
Change-Id: I391856282d046e915c374e0efb06d4da870bff1f
2023-08-25 13:18:45 +00:00
Oliver Smith 90f31bbd4b msc/BSC_Conn…: ass req/compl: check/use CSD codec
Verify that the MSC sends the CSData codec in the Assignment Request and
send this codec in the Assignment Complete towards the MSC.

Related: OS#4394
Change-Id: I7906e6fdb82c27f071aa55f2f73ba4108bfb46db
2023-08-25 09:34:22 +00:00
Andreas Eversberg 5ada75dd89 ASCI: Add GCC and BCC service requests to BSC_ConnectionHandler.ttcn
Related: OS#4854
Change-Id: Ic4875fde45dfc8d6928a48c0f6edc91d994bfa97
2023-07-28 15:15:51 +02:00
Andreas Eversberg e5a6ef1d31 ASCI: Rename handoverRequest to n_connect in RAN_Emulation.ttcnpp
The expectation table is used to deliver new connections with Handover
Request as well as with VGCS/VBS Setup and VGCS/VBS Assignment Request.
"handoverRequest" is renamed to "n_connect".

Related: OS#4854
Change-Id: I941c5db5235785841f3368ef908a409bbb12150e
2023-07-28 15:14:48 +02:00
Oliver Smith 98e24bcfa8 msc: TC_lu_and_mt/mo_csd: reduce call open time
Related: OS#4394
Change-Id: Ie733028f7953d5d9fa1907efdb19485dee93ece9
2023-07-18 09:33:52 +00:00
Oliver Smith 9c417f2066 msc: TC_lu_and_mo_csd: test multiple bearer services
Related: OS#4394
Change-Id: I74f983e1f5c0fef61018a9a5b92ed3b3cdbdfb5f
2023-07-18 09:33:52 +00:00
Oliver Smith 6f546a9a90 msc: f_call_hangup: add missing rx MNCC_REL_cnf
Add the missing rx of MNCC_REL_cnf to f_call_hangup for the MO case
(called with release_by_ms = false, see f_mo_call()).

This is in preparation for running f_mo_call several times in a row to
test multiple bearer services in a CSD test (follow up patch). Without
this patch, calling f_mo_call_establish() for the second time fails to
rx the MNCC_RTP_CREATE because the REL cnf is still in the port. This
leads to a timeout of X2 and OsmoMSC sending a CC RELEASE.

Adjust the log numbers next to f_call_hangup to re-use numbers 2 and 3
from above, as only one of the two code paths gets executed (similar to
numbers 5 and 6 below).

Related: OS#4394
Change-Id: Ia2ed7ce092e73e17c4243e83bfd239ead8266b49
2023-07-18 09:33:52 +00:00
Oliver Smith 8cf75abec9 msc: TC_lu_and_mt_csd: test multiple bearer services
Related: OS#4394
Depends: osmo-msc I7297cc481fbe36355b5231ca800cf566a1ee93c0
Change-Id: Idf6502c826a441b8dd18257c85f9a3323883825e
2023-07-18 09:33:52 +00:00
Oliver Smith 3a33e5595b msc/BSC_ConnHdlr: f_mt_call: unregister IMSI
Fix the missing call to f_ran_unregister_imsi when running f_mt_call.

This is in preparation for calling f_mt_call multiple times during one
test, to test various CSD bearer services. Without this patch, it will
result in a "No space left in ImsiTable" error.

I've also considered adding it to f_call_hangup instead, but this gets
called by f_mo_call (mo instead of mt) as well, which does not run
f_ran_register_imsi.

Related: OS#4394
Change-Id: Ie9b180b95348d7e84650c14a331c5091a1e67d1f
2023-07-09 07:53:30 +00:00
Oliver Smith f89620db26 msc: BSC_ConnectionHandler: fix cpars.csd
Fix for:
BSC_ConnectionHandler.ttcn:1546 Dynamic test case error: Using the value of an unbound boolean variable.

Fixes: 92b280c8 ("msc: new test: TC_lu_and_mo_csd")
Change-Id: I733db4dbc3ba3dd52ba501901b8b0ed36ff13344
2023-06-21 18:21:25 +02:00
Oliver Smith c1dd36a71b msc: new test: TC_lu_and_mt_csd
Related: OS#4394
Change-Id: Ie1701546e3dc18a5b0da4608b44a580237c979a6
2023-06-20 13:20:19 +00:00
Oliver Smith 92b280c8a6 msc: new test: TC_lu_and_mo_csd
Related: OS#4394
Depends: https://gitlab.eclipse.org/eclipse/titan/titan.ProtocolModules.MobileL3_v13.4.0/-/merge_requests/3
Change-Id: Ia863a63a318a9b0a8b4bfc1dc425cbc0235256b3
2023-06-20 13:20:19 +00:00
Oliver Smith d6c90065c4 msc: f_mo_call_establish: improve AoIP IE check
Check if the AoIP Transport Layer IE is present before checking its
value. This gives a more meaningful error than Dynamic Testcase Error if
it is not present.

Change-Id: I52fc829b017848b6afe7e637f1911a0976f9c91d
2023-06-20 07:51:42 +00:00
Oliver Smith 97dc91f14f msc: f_mt_call_initiate: fix typo
Change-Id: Idfa381a036efcc21044700d069db434150fcaadf
2023-06-19 13:09:11 +00:00
Neels Hofmeyr c47ce855c1 msc: detect RTP to CN failure in call tests
When CN RTP is missing, the X2 timer will fire after all other call
signalling looks successful. So far we establish an MT call, wait three
seconds and directly disconnect, long before X2 or X2427 can fire.

Make X2 shorter. (By means of f_vty_config() from ttcn, so that we don't
need to edit various osmo-msc.cfg in various repositories. The short
timer is always critical for the test to be accurate.)

Add proper function to detect premature disconnect. Otherwise we just
get a cryptic message like "Couldn't find MnccExpect for incoming call"
because of MNCC messaging after the unexpected release event.

Change-Id: I3ccf541360cc8440e664f0e29494b9ce7b6f8943
2023-03-14 20:19:48 +00:00
Neels Hofmeyr e860fc49d9 msc: test auth options, and fall-back to no-auth
Test 12 permutations of
(auth optional,required) x (a5 '0', '0 3', '3') x (hlr has auth info)

In TC_auth_options_2(), expect behavior after implementing OS#4830: if
the HLR fails to return auth info and auth + ciph are configured
optional, fall back to no authentication. This test will start
succeeding starting with commit
I5feda196fa481dd8a46b0e4721c64b7c6600f0d1 in osmo-msc.git.

All other tests yield the current behavior of osmo-msc.

Related: I5feda196fa481dd8a46b0e4721c64b7c6600f0d1 (osmo-msc)
Related: OS#4830
Change-Id: I8e3b02ca83e56ef5349d85f08407509e19fa353c
2022-10-26 15:35:12 +00:00
Neels Hofmeyr 02d513efd8 msc: call: allow using MGW conn IPs in either order
So far, the first CRCX dispatched by osmo-msc is used for the RAN side,
and the second one for the CN side. Upcoming changes to osmo-msc move
the CN side CRCX to an earlier point in time, reversing that order.

Allow both RTP addresses from the two MGCP CRCX OK to appear in the
Assignment Request message to RAN, so that the test succeeds for both
the current osmo-msc and the upcoming patch (see below).

Related: SYS#5066
Related: Ie433db1ba0c46d4b97538a969233c155cefac21c (osmo-msc)
Change-Id: Id0c98bc267daff352fc7db7712f967111970fd4d
2022-08-07 15:48:17 +02:00
Eric Wild 49888a65dc ran emulation: allow multiple reset attempts
bsc-nat introduces a delay that will lead to failed tests, since the
reset attempt happens too early and times out, and the tests do not
retry.

Change-Id: I9f6db2a24e984eef31e76f9d42a80eb6a1bb6928
2022-03-31 17:49:10 +00:00
Vadim Yanitskiy 172bc6ebd2 msc/BSC_ConnectionHandler: fix early return in f_mm_ciph_geran()
In [1] I forgot to invert an if statement.  This regression caused
most of GERAN specific test cases to fail due to "Tguard timeout".

Change-Id: I8cbaff00abfd9eb252dc3011df848e2e24fe5a1e
Fixes: [1] Ib7ebe8fd675295beb02cadebb19d8465dffeb732
Related: OS#5333
2021-12-06 17:55:26 +03:00
Vadim Yanitskiy 0649d1c0db msc/BSC_ConnectionHandler: refactor and split f_mm_common()
Reduce nesting and improve readability by splitting GERAN/UTRAN
specific CMC/SMC message handling into separate functions.

Change-Id: Ib7ebe8fd675295beb02cadebb19d8465dffeb732
Related: OS#5333
2021-12-04 11:01:57 +00:00
Neels Hofmeyr f797d298a5 msc: add a COORD port for inter-component coordination
Also provide a blank receive template for CallParameters which is
needed to receive a CallParameters record via the COORD port.

Will be used by MSC_Tests.TC_call_re_establishment in
Ifdff5573eeb3b3d41e8599b9b0228411d2576864

Change-Id: Iba3a5304fa40159bc2c31cdc3a71ee56ed08bd12
2021-08-06 14:03:28 +00:00
Neels Hofmeyr b00c5b095d msc: add vec_keep to lock the AuthVector
Next to AuthVector vec, add boolean vec_keep. When set to true,
as_GSUP_SAI() skips the vector regeneration.

An upcoming patch adds encryption to inter-BSC handover, which will use
vec_keep := true. (See I57e43c60d4389bd301d0195179321a34401bd1dc )

Rationale:

Usually, a random auth vector is generated during as_GSUP_SAI(). For
inter-BSC handover, there are two separate virt-BSC components running.
But to be able to verify that the correct key is passed on from the old
to the new BSS, both titan components need to have the same AuthVector
data. The easiest solution is to generate the AuthVector before
launching the components, and then prevent that it is changed by
as_GSUP_SAI().

Related: SYS#5324
Related: I57e43c60d4389bd301d0195179321a34401bd1dc
Change-Id: I4bca739c2aad8342915e00a218f90fc19be7eafe
2021-06-29 16:17:54 +02:00
Neels Hofmeyr f6eff81417 msc: generate Milenage ck in f_get_expected_encryption()
Instead of overwriting the ck of the original auth vector, generate the
Milenage-on-GERAN Ck key only for the expected ciphering IEs, centrally
in f_get_expected_encryption().

Related: SYS#5324
Change-Id: Iec618ba7fddb2290fc0137d99a9b8d5e2b428b98
2021-06-29 16:17:54 +02:00
Neels Hofmeyr f7831cbcd9 msc: cipher mode: move cipher expect to new function
Move the ciphering calculations from f_mm_common() to new function
f_get_expected_encryption(), so that it can be re-used for ciphering in
inter-BSC handover (upcoming patch).

Add tr_BSSMAP_CipherModeCmd2() to conveniently use the values returned
by f_get_expected_encryption().

To verify the Ciphering Mode Command in f_mm_common(), use the new
tr_BSSMAP_CipherModeCmd2(), and rely on template matching instead of
checking each IE individually.

Related: SYS#5324
Change-Id: I1f775889fb801d441ea6c8b0f0c34718b814c09e
2021-06-29 16:17:54 +02:00
Neels Hofmeyr 0d6fd3eff2 msc: f_auth3g_kc(): take vec as argument, drop "runs on"
It is more elegant to have one arg and not require a "runs on".

Related: SYS#5324
Change-Id: Iec21710edaa6ad3d20e23c7ee055909c642e8220
2021-06-23 23:53:06 +02:00
Eric Wild 26f4a62642 msc: add first a5/4 tests
All msc tests involving classmarks suffer from the same problem: if a
existing subscriber is reused the old classmarks will stick, since the
msc only overwrites updated parts of the cm when receiving a new cm, so
"downgrading" the existing classmark information is not possible.

This is circumvented here here by using different imsi suffixes,
the last param passed to f_start_handler.

Additionally the handler will now properly respond to cm requests
by the msc, i.e. in case the early cm is not sufficient for a5/4
because it lacks cm3, so the msc attempts once to query the cm,
hoping to get a cm3.

Related: SYS#5324
Change-Id: Idc055a006b325f58a5eafa88bc4415181b3500a2
2021-05-19 17:49:52 +00:00
Pau Espin e979c40e4b msc: Verify CommonID contains LastUsedEutranPLMNId when in CSFB
Validate in test that MSC sends Last Used E-UTRAN PLLMN Id IE when call
is started by SGs (CSFB).

Related: SYS#5337
Change-Id: I161529fd9c8cacb7d17ea18660998df06bb0b575
2021-05-11 16:15:31 +02:00
Pau Espin 174fac25a3 msc: Get rid of several uneeded module params
These params are not needed anymore since new releases used in -latest don't
need to disable it.

Change-Id: I16575ae4f615bf7c42d5921917003007ba4872a0
Related: OS#5042
2021-02-26 13:20:10 +01:00
Pau Espin 9a5b8ffc5b CTRL: Introduce support to run osmocom CTRL server
Change-Id: I37db9962f51baf2c63bd58ec47ec89f773d7a255
2021-01-07 15:06:39 +01:00
Pau Espin 956bfd247d msc: Validate RTP addr+port passed from MNCC to MGCP MDCX
Change-Id: I0b53643ed3a8f8550b2ea6e8832068d603a676e1
2020-09-16 10:36:44 +00:00
Pau Espin 563b3d013b mncc: Support IPv6 addresses (new version mncc 7)
Apparently commit 06b859ca31 forgot to
bump the MNCC_SOCK_VERSION field from 5 to 6.

Change-Id: I5448ff931ec33f24f4837a51376f1703fe97683b
2020-09-16 10:36:44 +00:00
Pau Espin 833174e7fb msc: Introduce tests to verify BSSAP and MGCP handling with IPv6
It tests IPv6 Transport Address are passed correctly through BSSAP, and
forwards handles them correctly as an MGCP client too.

Change-Id: Id616926dd4a9febc4268eea2ee1e377b2d22753a
2020-09-09 12:48:32 +02:00
Pau Espin cb4c59d131 msc: Fix wrong mgcp conn expected in several places
Change-Id: I0bb15881e640fe49552108679894d5df15339fc8
2020-09-07 08:05:28 +00:00
Harald Welte 79f1e45436 msc: Expect CommonID from MSC by default
As of osmo-msc Change-Id I2552736477663adb250c55728093500e8ae83ebb,
osmo-msc is always sending BSSMAP CommonID to the BSC.  Let's adjust our
test expectation, while allowing the user to start the tests with
BSC_ConnectionHandler.mp_expect_common_id := false
to get the existing behavior (expect no bSSMAP CommonId) can be
restored, e.g. for testing 'latest'.

Change-Id: I4976d9bb1f07c8ab4ffa02848414f8ddd1bdfd3f
Related: OS#2969
2020-08-19 08:59:13 +02:00
Neels Hofmeyr 4e18cccb9c msc: verify conn and VLR cell id in most tests
osmo-msc failed to record the Complete Layer 3 Information LAC and CI in the
MSC-A as well as the VLR record. Since osmo-msc
Iee1781985fb25b21ce27526c6a3768bf70d4dc9a and
I194271af2acb37b4f8cc2d106ab2fd2b0d443589, osmo-msc properly records these for
successful Complete Layer 3 procedures.

Incorporate verification of the LAC and CI in all tests calling f_perform_lu()
and f_expect_clear(). Implement by scraping the output of vty
	'show subscriber imsi 1234 conn'

Some tests model a failure to attach, or expire the VLR record: for those, add
parameter verify_cell_id to g_pars, and pass it as false, to skip checking the
LAC and CI.

Disable CI checking for all Iu tests globally in f_verify_vty_lac_ci(), see
OS#4634.

For the latest build, which does not yet record LAC and CI properly, provide
mp_enable_cell_id_test, which skips all cell id verification if set to false.
Put to effect by docker-playground I052fea208021509e12826c50474b96474e7a58c2.

Related: OS#4627
Depends: Iee1781985fb25b21ce27526c6a3768bf70d4dc9a (osmo-msc)
Change-Id: Ie410714a96353f74a52a104c56fa0a08683e0004
2020-07-08 01:45:09 +00:00
Neels Hofmeyr b58d974ea5 msc: add tests for SMS and voice call while Paging
Start a second
- MT SMS
- MT call
while a Paging is already ongoing.

The second trans being an SMS works.

The second trans being a call fails with current osmo-msc master; a fix is in
the related patch (s.b.).

Related: Idd4537b5f4817d17e5c87d9a93775a32aee0e7be
Change-Id: Ieeae6322d4e80893ea3408c6b74bf8e32bea8e46
2020-05-11 17:33:05 +00:00
Vadim Yanitskiy 98bb2d5eea library/GSM_RR_Types: do not duplicate Mobile Identity records
All the records related to Mobile Identity IE (see 3GPP TS 24.008,
section 10.5.1.4) are defined in [1], so there is no real need to
dumplicate them. Moreover, most of the related templates in
library/L3_Templates.ttcn are based on these records.

[1] titan.ProtocolModules.MobileL3_v13.4.0/src/MobileL3_CommonIE_Types.ttcn

Change-Id: I27c2743c59db770d6f7e9447dc8c1f539b228ced
2020-03-28 03:29:22 +07:00
Vadim Yanitskiy 2dd9661220 MSC/GSUP: make session ID for MT SS/USSD configurable
This would allow to run multiple SS/USSD transactions in parallel.

Change-Id: I326b5e47f4c1e9f9209efa64c143c3dc64132edb
2020-01-07 21:49:45 +01:00
Vadim Yanitskiy afb15a8424 MSC: fix SM-RP-OA (SMSC Address) expectations for MT SMS
Since [1] we started to match the SMSC Address in f_mt_sms_expect().
That change caused test case failures because OsmoMSC hard-codes
a different SMSC Address. Let's fix this.

[1] Ib467eeca6439bc6cce72293fbb5bb48f6d233db9

Change-Id: I3bdb6a74c8b02e4bf8dc88634e2380c924242b4b
2020-01-05 21:06:43 +01:00
Vadim Yanitskiy 04dd5f7aa0 MSC_Tests.ttcn: fix: verify the contents of SM-RP-DA/OA for MO/MT SMS
Change-Id: Ib467eeca6439bc6cce72293fbb5bb48f6d233db9
Related: OS#4324
2020-01-03 12:27:17 +00:00
Vadim Yanitskiy 437b5a6c7d MSC/BSC_ConnectionHandler: only keep SMSC address in SmsParametersRp
When sending MO or MT SMS, we never include both SM-RP-DA/OA IEs
at the same time. In case of MO SMS, SM-RP-OA is omitted, and in
case of MT SMS - SM-RP-DA is omitted.

Change-Id: Ia60bdd2498034b6b849f874cf1eee272abef2b47
2020-01-03 12:27:17 +00:00
Pau Espin d3d54a91fa msc: Introduce test TC_lu_imsi_timeout_tmsi_realloc
Related: OS#4336, OS#4337
Change-Id: I603b2b2b1ae7edd6360ea38c6bbbfedc46e9fa5d
2020-01-01 16:12:20 +00:00
Pau Espin 7e9178df28 msc: Remove trailing whitespace
Change-Id: I934dd3504fa91e2006fbc9b1133836060eb0591e
2019-12-17 17:52:42 +01:00
Neels Hofmeyr 8df6962dec msc: add f_tc_invalid_mgcp_crash
Make sure that osmo-msc doesn't crash if a successful CRCX response contains an
invalid IP address.

Originally/recently, osmo-msc did not validate the IP addresses at all. In an
intermediate patch I added error handling, releasing the call. That uncovered a
use-after-free problem in libosmo-mgcp-client. This problem is fixed by
osmo_fsm_set_dealloc_ctx() and an osmo-mgw fix (see
I7df2e9202b04e7ca7366bb0a8ec53cf3bb14faf3 in osmo-mgw).

Add this test to make sure the crash is not re-introduced.

Change-Id: I0c76b0a7a33a96a39a242ecd387ba3769161cf7a
2019-11-23 07:59:07 +00:00
Neels Hofmeyr ba960a140d msc: log tweaks for call / call hangup
Change-Id: I06474e3d592195a8c422493166d9f042da1ac7e6
2019-11-23 07:59:07 +00:00
Neels Hofmeyr 8fe8a90da2 msc: add and fix Iu mt call
Change-Id: I3ce29f3d9254656dc295674e8cec72a741b7764a
2019-11-23 07:59:07 +00:00