aboutsummaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2019-10-15 16:54:37 +0200
committerlaforge <laforge@osmocom.org>2019-11-23 07:59:07 +0000
commit3c89a6bce60bca8d50bed9f95bee0ff9ffd97440 (patch)
tree8dc220365845b55984c7167b6cd43c51cb9df7c7 /library
parent06b859ca314f53a902329ed95848dbafef1d4f87 (diff)
msc: overhaul voice call testing
* Semantic: We don't really know which side the MSC first creates a CRCX for. Instead of assuming that the RAN side is always CRCX'd first, simply handle a "first" and a "second" CRCX, not making any assumptions which is for which side. Notably, there still are quite a few places assuming which CRCX corresponds to the RAN/CN side, but the changes are sufficient to still pass the tests when osmo-msc swaps the CRCX order; sometimes for slightly obscure reasons, for example because it doesn't matter that the wrong port number is returned during a subsequent MDCX... Cleaning up the rest is still todo for later. Remove code dup from call establishing code, particularly for MGCP. Use f_mo_call_establish() and f_mt_call() where ever possible, to make all of the call establishing tests handle upcoming changes in osmo-msc's order of messages, without re-implementing the changes for each test individually. The X-Osmux parameter was so far expected to appear in the first CRCX received, assuming that this first CRCX is for the RAN. Instead, detect whether X-Osmux is contained in a CRCX, and reply with an Osmux CID if so, regardless of it being the first or second CRCX. Count the number of X-Osmux parameters received in CRCX messages, and compare after call setup to verify X-Osmux presence. Since f_mo_call_establish() can't handle RANAP assignment, a few Iu tests that worked with the older code dup will break by this patch. This is fixed by a subsequent patch, see I0ead36333ab665147b8d222070ea5cf8afc555ec. * Details, per patch chunk: Change ts_BSSMAP_IE_AoIP_TLA4 to a non-value template, so that we can use a wildcard for the assigned port number from MGCP (depending on RAN or CN CRCX first, the RAN port number can be one or the other). In CallParameters, move MGCP handling instructions into a separate record "CrcxResponse", and have two of them for handling the first and the second CRCX, replacing mgw_rtp_{ip,port}_{bss,mss} and mgcp_connection_id_{bss,mss}. In CallParameters, add some flags for early-exiting call establishment with a particular desired behavior, for specialized tests. In CallParameters, use common default values and don't repeat them in each and every call establishing test. Set cpars.mo_call := {true,false} implicitly when f_{mo,mt}_call_establish() are invoked. Remove CRCX comments implying RAN or CN side, instead just talk of the "first" and the "second" CRCX. Implement one common f_handle_crcx() function, which is used by f_mo_call_establish(), f_mt_call_complete(), as_optional_mgcp_crcx(), and implicitly uses the first/second CRCX handling. For Assigment, use a wildcard RTP port so that we don't have to assume which CRCX was for the RAN side. In f_mo_call_establish(), insert special case conditions to make it enact errors at specific times, for individual tests. That saves re-implementing the entire call establishment (code dup). For error cases, add expectation of a CC Release message in the call establishment. This should not apply for normal successful operation, but because interleave does not support conditionals, add flags got_mncc_setup_compl_ind and got_cc_connect to break the interleave when establishing is complete, so that the CC Release is skipped. A CC Release always breaks the interleave, at whatever time it arrives. Tests adopting f_{mo,mt}_call instead of code dup: f_tc_mo_setup_and_nothing() f_tc_mo_crcx_ran_timeout() f_tc_mo_crcx_ran_reject() f_tc_mo_release_timeout() f_tc_mo_cc_bssmap_clear() Change-Id: I8b82476f55a98f7a94d5c4f1cd80eac427b2d20f
Diffstat (limited to 'library')
-rw-r--r--library/BSSMAP_Templates.ttcn13
1 files changed, 13 insertions, 0 deletions
diff --git a/library/BSSMAP_Templates.ttcn b/library/BSSMAP_Templates.ttcn
index 41755db0..406dfc5b 100644
--- a/library/BSSMAP_Templates.ttcn
+++ b/library/BSSMAP_Templates.ttcn
@@ -420,6 +420,19 @@ template (value) BSSMAP_IE_AoIP_TransportLayerAddress ts_BSSMAP_IE_AoIP_TLA4(OCT
template (value) BSSMAP_IE_AoIP_TransportLayerAddress ts_BSSMAP_IE_AoIP_TLA6(OCT16 ip, uint16_t pt) :=
ts_BSSMAP_IE_AoIP_TLA({ipv6:=ip}, pt, 18);
+template BSSMAP_IE_AoIP_TransportLayerAddress tr_BSSMAP_IE_AoIP_TLA(template BSSMAP_FIELD_IPAddress addr,
+ template uint16_t udp_port,
+ template integer len := ?) := {
+ elementIdentifier := '7C'O,
+ lengthIndicator := len,
+ ipAddress := addr,
+ uDPPortValue := udp_port
+}
+template BSSMAP_IE_AoIP_TransportLayerAddress tr_BSSMAP_IE_AoIP_TLA4(template OCT4 ip, template uint16_t pt) :=
+ tr_BSSMAP_IE_AoIP_TLA({ipv4:=ip}, pt, 6);
+template BSSMAP_IE_AoIP_TransportLayerAddress tr_BSSMAP_IE_AoIP_TLA6(template OCT16 ip, template uint16_t pt) :=
+ tr_BSSMAP_IE_AoIP_TLA({ipv6:=ip}, pt, 18);
+
template (value) BSSMAP_IE_KC128 ts_BSSMAP_IE_Kc128(OCT16 kc128) := {
elementIdentifier := '83'O,
kC128_Value := kc128