blob: 07c6e135d7b3559fbc3dc5fd2dc6d4382f0798ed [file] [log] [blame]
Neels Hofmeyra99b4272017-11-21 17:13:23 +01001/* Osmocom MSC+VLR end-to-end tests */
2
3/* (C) 2017 by sysmocom - s.f.m.c. GmbH <info@sysmocom.de>
4 *
5 * All Rights Reserved
6 *
7 * Author: Neels Hofmeyr <nhofmeyr@sysmocom.de>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU Affero General Public License as published by
11 * the Free Software Foundation; either version 3 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU Affero General Public License for more details.
18 *
19 * You should have received a copy of the GNU Affero General Public License
20 * along with this program. If not, see <http://www.gnu.org/licenses/>.
21 *
22 */
23
24#include "msc_vlr_tests.h"
25
26#include <osmocom/msc/gsm_04_08.h>
27
Neels Hofmeyr07351d82019-10-21 05:53:58 +020028#define mncc_sends_to_cc(MSG_TYPE, MNCC) do { \
29 (MNCC)->msg_type = MSG_TYPE; \
30 log("MSC <-- MNCC: callref 0x%x: %s\n%s", (MNCC)->callref, \
31 get_mncc_name((MNCC)->msg_type), \
32 (MNCC)->sdp); \
33 mncc_tx_to_cc(net, MNCC); \
34 } while(0)
Neels Hofmeyra99b4272017-11-21 17:13:23 +010035
Neels Hofmeyrc4628a32018-12-07 14:47:34 +010036/*
Neels Hofmeyrcbcf89c2018-03-13 17:52:07 +010037static void on_call_release_mncc_sends_to_cc(uint32_t msg_type, struct gsm_mncc *mncc)
38{
39 mncc->msg_type = msg_type;
40 on_call_release_mncc_sends_to_cc_data = mncc;
41}
Neels Hofmeyrc4628a32018-12-07 14:47:34 +010042*/
Neels Hofmeyrcbcf89c2018-03-13 17:52:07 +010043
Neels Hofmeyra99b4272017-11-21 17:13:23 +010044#define IMSI "901700000010650"
45
Neels Hofmeyr11bf0bc2019-10-21 05:55:49 +020046static void lu_utran_tmsi()
Neels Hofmeyra99b4272017-11-21 17:13:23 +010047{
48 struct vlr_subscr *vsub;
49
50 net->authentication_required = true;
51 net->vlr->cfg.assign_tmsi = true;
Neels Hofmeyr7814a832018-12-26 00:40:18 +010052 rx_from_ran = OSMO_RAT_UTRAN_IU;
Neels Hofmeyra99b4272017-11-21 17:13:23 +010053
54 btw("Location Update request causes a GSUP Send Auth Info request to HLR");
55 lu_result_sent = RES_NONE;
Neels Hofmeyr63b24642019-12-12 01:31:04 +010056 gsup_expect_tx("080108" "09710000000156f0" CN_DOMAIN VLR_TO_HLR);
Neels Hofmeyra99b4272017-11-21 17:13:23 +010057 ms_sends_msg("0508" /* MM LU */
58 "7" /* ciph key seq: no key available */
59 "0" /* LU type: normal */
60 "09f107" "0017" /* LAI, LAC */
61 "57" /* classmark 1: R99, early classmark, no power lvl */
62 "089910070000106005" /* IMSI */
63 "3303575886" /* classmark 2 */
64 );
65 OSMO_ASSERT(gsup_tx_confirmed);
66 VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d");
67
68 btw("from HLR, rx _SEND_AUTH_INFO_RESULT; VLR sends Auth Req to MS");
69 /* based on auc_3g:
70 * K = 'EB215756028D60E3275E613320AEC880',
71 * OPC = 'FB2A3D1B360F599ABAB99DB8669F8308'
72 * SQN = 0
73 */
74 auth_request_sent = false;
75 auth_request_expect_rand = "39fa2f4e3d523d8619a73b4f65c3e14d";
76 auth_request_expect_autn = "8704f5ba55f30000d2ee44b22c8ea919";
77 gsup_rx("0a"
78 /* imsi */
79 "0108" "09710000000156f0"
80 /* 5 auth vectors... */
81 /* TL TL rand */
82 "0362" "2010" "39fa2f4e3d523d8619a73b4f65c3e14d"
83 /* TL sres TL kc */
84 "2104" "9b36efdf" "2208" "059a4f668f6fbe39"
85 /* TL 3G IK */
86 "2310" "27497388b6cb044648f396aa155b95ef"
87 /* TL 3G CK */
88 "2410" "f64735036e5871319c679f4742a75ea1"
89 /* TL AUTN */
90 "2510" "8704f5ba55f30000d2ee44b22c8ea919"
91 /* TL RES */
92 "2708" "e229c19e791f2e41"
93 /* TL TL rand */
94 "0362" "2010" "c187a53a5e6b9d573cac7c74451fd46d"
95 "2104" "85aa3130" "2208" "d3d50a000bf04f6e"
96 "2310" "1159ec926a50e98c034a6b7d7c9f418d"
97 "2410" "df3a03d9ca5335641efc8e36d76cd20b"
98 "2510" "1843a645b98d00005b2d666af46c45d9"
99 "2708" "7db47cf7f81e4dc7"
100 "0362" "2010" "efa9c29a9742148d5c9070348716e1bb"
101 "2104" "69d5f9fb" "2208" "3df176f0c29f1a3d"
102 "2310" "eb50e770ddcc3060101d2f43b6c2b884"
103 "2410" "76542abce5ff9345b0e8947f4c6e019c"
104 "2510" "f9375e6d41e1000096e7fe4ff1c27e39"
105 "2708" "706f996719ba609c"
106 "0362" "2010" "f023d5a3b24726e0631b64b3840f8253"
107 "2104" "d570c03f" "2208" "ec011be8919883d6"
108 "2310" "c4e58af4ba43f3bcd904e16984f086d7"
109 "2410" "0593f65e752e5cb7f473862bda05aa0a"
110 "2510" "541ff1f077270000c5ea00d658bc7e9a"
111 "2708" "3fd26072eaa2a04d"
112 "0362" "2010" "2f8f90c780d6a9c0c53da7ac57b6707e"
113 "2104" "b072446f220823f39f9f425ad6e6"
114 "2310" "65af0527fda95b0dc5ae4aa515cdf32f"
115 "2410" "537c3b35a3b13b08d08eeb28098f45cc"
116 "2510" "4bf4e564f75300009bc796706bc65744"
Neels Hofmeyrc4628a32018-12-07 14:47:34 +0100117 "2708" "0edb0eadbea94ac2"
118 HLR_TO_VLR,
Neels Hofmeyra99b4272017-11-21 17:13:23 +0100119 NULL);
120 VERBOSE_ASSERT(auth_request_sent, == true, "%d");
121 VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d");
122
123 btw("MS sends Authen Response, VLR accepts and sends SecurityModeControl");
Neels Hofmeyrdbabfd32018-03-10 02:06:47 +0100124 expect_security_mode_ctrl(NULL, "27497388b6cb044648f396aa155b95ef");
Neels Hofmeyra99b4272017-11-21 17:13:23 +0100125 ms_sends_msg("0554" "e229c19e" "2104" "791f2e41");
Neels Hofmeyrdbabfd32018-03-10 02:06:47 +0100126 VERBOSE_ASSERT(security_mode_ctrl_sent, == true, "%d");
Neels Hofmeyra99b4272017-11-21 17:13:23 +0100127 VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d");
128
129 btw("MS sends SecurityModeControl acceptance, VLR accepts and sends GSUP LU Req to HLR");
Neels Hofmeyr63b24642019-12-12 01:31:04 +0100130 gsup_expect_tx("04010809710000000156f0" CN_DOMAIN VLR_TO_HLR);
Alexander Couzens2aaff752021-10-19 17:09:11 +0200131 ms_sends_security_mode_complete(1);
Neels Hofmeyra99b4272017-11-21 17:13:23 +0100132 VERBOSE_ASSERT(gsup_tx_confirmed, == true, "%d");
133 VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d");
134
135 btw("HLR sends _INSERT_DATA_REQUEST, VLR responds with _INSERT_DATA_RESULT");
Neels Hofmeyrc4628a32018-12-07 14:47:34 +0100136 gsup_rx("10010809710000000156f00804032443f2" HLR_TO_VLR,
137 "12010809710000000156f0" VLR_TO_HLR);
Neels Hofmeyra99b4272017-11-21 17:13:23 +0100138 VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d");
139
140 btw("HLR also sends GSUP _UPDATE_LOCATION_RESULT");
Neels Hofmeyrc4628a32018-12-07 14:47:34 +0100141 gsup_rx("06010809710000000156f0" HLR_TO_VLR, NULL);
Neels Hofmeyra99b4272017-11-21 17:13:23 +0100142
143 VERBOSE_ASSERT(lu_result_sent, == RES_ACCEPT, "%d");
144
145 btw("a LU Accept with a new TMSI was sent, waiting for TMSI Realloc Compl");
146 EXPECT_CONN_COUNT(1);
147 EXPECT_ACCEPTED(false);
148
149 btw("MS sends TMSI Realloc Complete");
150 iu_release_expected = true;
151 iu_release_sent = false;
152 ms_sends_msg("055b");
153 VERBOSE_ASSERT(iu_release_sent, == true, "%d"); \
154
155 btw("LU was successful, and the conn has already been closed");
Neels Hofmeyrc4628a32018-12-07 14:47:34 +0100156 ran_sends_clear_complete();
Neels Hofmeyra99b4272017-11-21 17:13:23 +0100157 EXPECT_CONN_COUNT(0);
158
Neels Hofmeyr7c5346c2019-02-19 02:36:35 +0100159 vsub = vlr_subscr_find_by_imsi(net->vlr, IMSI, __func__);
Neels Hofmeyra99b4272017-11-21 17:13:23 +0100160 VERBOSE_ASSERT(vsub != NULL, == true, "%d");
161 VERBOSE_ASSERT(strcmp(vsub->imsi, IMSI), == 0, "%d");
Max7d41d872018-12-19 11:48:33 +0100162 VAL_ASSERT("LAC", vsub->cgi.lai.lac, == 23, "%u");
Neels Hofmeyr7c5346c2019-02-19 02:36:35 +0100163 vlr_subscr_put(vsub, __func__);
Neels Hofmeyra99b4272017-11-21 17:13:23 +0100164}
165
Neels Hofmeyrf3d81f62018-03-02 01:05:38 +0100166static void test_call_mo()
Neels Hofmeyra99b4272017-11-21 17:13:23 +0100167{
168 struct gsm_mncc mncc = {
169 .imsi = IMSI,
170 };
171
Neels Hofmeyrdfdc61d2018-03-02 00:40:58 +0100172 comment_start();
Neels Hofmeyra99b4272017-11-21 17:13:23 +0100173
174 fake_time_start();
175
Neels Hofmeyr11bf0bc2019-10-21 05:55:49 +0200176 lu_utran_tmsi();
Neels Hofmeyra99b4272017-11-21 17:13:23 +0100177
178 BTW("after a while, a new conn sends a CM Service Request. VLR responds with Auth Req, 2nd auth vector");
179 auth_request_sent = false;
180 auth_request_expect_rand = "c187a53a5e6b9d573cac7c74451fd46d";
181 auth_request_expect_autn = "1843a645b98d00005b2d666af46c45d9";
182 cm_service_result_sent = RES_NONE;
Neels Hofmeyrc4628a32018-12-07 14:47:34 +0100183 ms_sends_msg("052471"
Neels Hofmeyra99b4272017-11-21 17:13:23 +0100184 "03575886" /* classmark 2 */
185 "089910070000106005" /* IMSI */);
Neels Hofmeyra99b4272017-11-21 17:13:23 +0100186 VERBOSE_ASSERT(cm_service_result_sent, == RES_NONE, "%d");
187 VERBOSE_ASSERT(auth_request_sent, == true, "%d");
188
189 btw("needs auth, not yet accepted");
190 EXPECT_ACCEPTED(false);
191
192 /* On UTRAN */
193 btw("MS sends Authen Response, VLR accepts and sends SecurityModeControl");
Neels Hofmeyrdbabfd32018-03-10 02:06:47 +0100194 expect_security_mode_ctrl(NULL, "1159ec926a50e98c034a6b7d7c9f418d");
Neels Hofmeyra99b4272017-11-21 17:13:23 +0100195 ms_sends_msg("0554" "7db47cf7" "2104" "f81e4dc7"); /* 2nd vector's res, s.a. */
Neels Hofmeyrdbabfd32018-03-10 02:06:47 +0100196 VERBOSE_ASSERT(security_mode_ctrl_sent, == true, "%d");
Neels Hofmeyra99b4272017-11-21 17:13:23 +0100197 VERBOSE_ASSERT(cm_service_result_sent, == RES_NONE, "%d");
198
199 btw("MS sends SecurityModeControl acceptance, VLR accepts; above Ciphering is an implicit CM Service Accept");
Alexander Couzens2aaff752021-10-19 17:09:11 +0200200 ms_sends_security_mode_complete(1);
Neels Hofmeyra99b4272017-11-21 17:13:23 +0100201 VERBOSE_ASSERT(cm_service_result_sent, == RES_NONE, "%d");
202
203 BTW("a call is initiated");
204
Neels Hofmeyrbd5f8e92022-01-13 23:18:02 +0100205 btw("CC SETUP causes CRCX towards CN");
206 expect_crcx(RTP_TO_CN);
207 expect_crcx(RTP_TO_RAN);
Neels Hofmeyra99b4272017-11-21 17:13:23 +0100208 ms_sends_msg("0385" /* CC, seq = 2 -> 0x80 | CC Setup = 0x5 */
209 "0406600402000581" /* Bearer Capability */
210 "5e038121f3" /* Called Number BCD */
211 "15020100" /* CC Capabilities */
212 "4008" /* Supported Codec List */
213 "04026000" /* UMTS: AMR 2 | AMR */
214 "00021f00" /* GSM: HR AMR | FR AMR | GSM EFR | GSM HR | GSM FR */
215 );
Neels Hofmeyrbd5f8e92022-01-13 23:18:02 +0100216 OSMO_ASSERT(crcx_scheduled(RTP_TO_CN));
217 OSMO_ASSERT(crcx_scheduled(RTP_TO_RAN));
218
219 btw("As soon as the MGW port towards CN is created, MNCC_SETUP_IND is triggered");
220 cc_to_mncc_expect_tx(IMSI, MNCC_SETUP_IND);
221 crcx_ok(RTP_TO_CN);
Neels Hofmeyra99b4272017-11-21 17:13:23 +0100222 OSMO_ASSERT(cc_to_mncc_tx_confirmed);
223 mncc.callref = cc_to_mncc_tx_got_callref;
224
Neels Hofmeyr3f391dd2019-08-29 03:53:11 +0200225 btw("MNCC replies with MNCC_RTP_CREATE, causing MGW endpoint CRCX to RAN");
Neels Hofmeyr3f391dd2019-08-29 03:53:11 +0200226 mncc_sends_to_cc(MNCC_RTP_CREATE, &mncc);
Neels Hofmeyr3f391dd2019-08-29 03:53:11 +0200227
228 btw("MGW acknowledges the CRCX, triggering Assignment");
229 expect_iu_rab_assignment();
230 crcx_ok(RTP_TO_RAN);
231 OSMO_ASSERT(iu_rab_assignment_sent);
232
Neels Hofmeyrbd5f8e92022-01-13 23:18:02 +0100233 btw("Assignment succeeds, triggering MNCC_RTP_CREATE ack to MNCC");
Neels Hofmeyr3f391dd2019-08-29 03:53:11 +0200234 cc_to_mncc_expect_tx("", MNCC_RTP_CREATE);
Neels Hofmeyrbd5f8e92022-01-13 23:18:02 +0100235 ms_sends_assignment_complete("AMR");
236 OSMO_ASSERT(cc_to_mncc_tx_confirmed);
Neels Hofmeyr3f391dd2019-08-29 03:53:11 +0200237
Neels Hofmeyra99b4272017-11-21 17:13:23 +0100238 btw("MNCC says that's fine");
239 dtap_expect_tx("8302" /* CC: Call Proceeding */);
240 mncc_sends_to_cc(MNCC_CALL_PROC_REQ, &mncc);
241 OSMO_ASSERT(dtap_tx_confirmed);
242
243 fake_time_passes(1, 23);
244
245 btw("The other call leg got established (not shown here), MNCC tells us so");
246 dtap_expect_tx("8301" /* CC: Call Alerting */);
247 mncc_sends_to_cc(MNCC_ALERT_REQ, &mncc);
248 OSMO_ASSERT(dtap_tx_confirmed);
249
250 dtap_expect_tx("8307" /* CC: Connect */);
251 mncc_sends_to_cc(MNCC_SETUP_RSP, &mncc);
252 OSMO_ASSERT(dtap_tx_confirmed);
253
254 fake_time_passes(1, 23);
255
256 cc_to_mncc_expect_tx("", MNCC_SETUP_COMPL_IND);
257 ms_sends_msg("03cf" /* CC: Connect Acknowledge */);
258 OSMO_ASSERT(cc_to_mncc_tx_confirmed);
259
260 BTW("RTP stream goes ahead, not shown here.");
261 fake_time_passes(123, 45);
262
263 BTW("Call ends");
264 cc_to_mncc_expect_tx("", MNCC_DISC_IND);
265 ms_sends_msg("032502e090" /* CC: Disconnect, cause: Normal Call Clearing */);
266 OSMO_ASSERT(cc_to_mncc_tx_confirmed);
267
268 dtap_expect_tx("832d" /* CC: Release */);
269 mncc_sends_to_cc(MNCC_REL_REQ, &mncc);
270 OSMO_ASSERT(dtap_tx_confirmed);
271
272 cc_to_mncc_expect_tx("", MNCC_REL_CNF);
273 expect_iu_release();
274 ms_sends_msg("036a" /* CC: Release Complete */);
275 OSMO_ASSERT(cc_to_mncc_tx_confirmed);
276 OSMO_ASSERT(iu_release_sent);
277
Neels Hofmeyrc4628a32018-12-07 14:47:34 +0100278 ran_sends_clear_complete();
Neels Hofmeyra99b4272017-11-21 17:13:23 +0100279 EXPECT_CONN_COUNT(0);
280 clear_vlr();
Neels Hofmeyrdfdc61d2018-03-02 00:40:58 +0100281 comment_end();
Neels Hofmeyra99b4272017-11-21 17:13:23 +0100282}
283
Neels Hofmeyrf3d81f62018-03-02 01:05:38 +0100284static void test_call_mt()
Neels Hofmeyra99b4272017-11-21 17:13:23 +0100285{
286 struct gsm_mncc mncc = {
287 .imsi = IMSI,
288 .callref = 0x423,
Neels Hofmeyr8dd16462022-01-13 20:06:53 +0100289 .fields = MNCC_F_BEARER_CAP,
290 .bearer_cap = {
291 .speech_ver = {
292 GSM48_BCAP_SV_AMR_F,
293 GSM48_BCAP_SV_EFR,
294 GSM48_BCAP_SV_FR,
295 GSM48_BCAP_SV_AMR_H,
296 GSM48_BCAP_SV_HR,
297 -1 },
298 },
299 /* NOTE: below SDP includes only AMR, above bearer_cap includes more codecs. Ideally, these would match,
300 * but in reality the bearer cap in MNCC was never implemented properly. This test shows that above
301 * bearer_cap is ignored when SDP is present: In the CC Setup below, the Bearer Capability is only
302 * "04 04 60 04 05 8b" with speech versions '04' == GSM48_BCAP_SV_AMR_F and '05' == GSM48_BCAP_SV_AMR_H.
303 */
304 .sdp = "v=0\r\n"
305 "o=OsmoMSC 0 0 IN IP4 10.23.23.1\r\n"
306 "s=GSM Call\r\n"
307 "c=IN IP4 10.23.23.1\r\n"
308 "t=0 0\r\n"
309 "m=audio 23 RTP/AVP 112\r\n"
310 "a=rtpmap:112 AMR/8000\r\n"
311 "a=fmtp:112 octet-align=1\r\n"
312 "a=ptime:20\r\n",
Neels Hofmeyra99b4272017-11-21 17:13:23 +0100313 };
314
Neels Hofmeyrdfdc61d2018-03-02 00:40:58 +0100315 comment_start();
Neels Hofmeyra99b4272017-11-21 17:13:23 +0100316
317 fake_time_start();
318
Neels Hofmeyr11bf0bc2019-10-21 05:55:49 +0200319 lu_utran_tmsi();
Neels Hofmeyra99b4272017-11-21 17:13:23 +0100320
321 BTW("after a while, MNCC asks us to setup a call, causing Paging");
Neels Hofmeyrc4628a32018-12-07 14:47:34 +0100322
Neels Hofmeyra99b4272017-11-21 17:13:23 +0100323 paging_expect_imsi(IMSI);
324 paging_sent = false;
325 mncc_sends_to_cc(MNCC_SETUP_REQ, &mncc);
Neels Hofmeyr8dd16462022-01-13 20:06:53 +0100326 mncc.sdp[0] = '\0';
Neels Hofmeyra99b4272017-11-21 17:13:23 +0100327
328 VERBOSE_ASSERT(paging_sent, == true, "%d");
Neels Hofmeyra99b4272017-11-21 17:13:23 +0100329
330 btw("MS replies with Paging Response, and VLR sends Auth Request");
331 auth_request_sent = false;
332 auth_request_expect_rand = "c187a53a5e6b9d573cac7c74451fd46d";
333 auth_request_expect_autn = "1843a645b98d00005b2d666af46c45d9";
334 ms_sends_msg("062707"
335 "03575886" /* classmark 2 */
336 "089910070000106005" /* IMSI */);
337 VERBOSE_ASSERT(auth_request_sent, == true, "%d");
338
339 btw("MS sends Authen Response, VLR accepts and sends SecurityModeControl");
Neels Hofmeyrdbabfd32018-03-10 02:06:47 +0100340 expect_security_mode_ctrl(NULL, "1159ec926a50e98c034a6b7d7c9f418d");
Neels Hofmeyra99b4272017-11-21 17:13:23 +0100341 ms_sends_msg("0554" "7db47cf7" "2104" "f81e4dc7"); /* 2nd vector's res, s.a. */
Neels Hofmeyrdbabfd32018-03-10 02:06:47 +0100342 VERBOSE_ASSERT(security_mode_ctrl_sent, == true, "%d");
Neels Hofmeyra99b4272017-11-21 17:13:23 +0100343
344 btw("MS sends SecurityModeControl acceptance, VLR accepts, sends CC Setup");
Neels Hofmeyr8dd16462022-01-13 20:06:53 +0100345 dtap_expect_tx("0305" /* CC: Setup */ "04 04 60 04 05 8b" /* Bearer Cap, speech ver of AMR-FR and AMR-HR */);
Alexander Couzens2aaff752021-10-19 17:09:11 +0200346 ms_sends_security_mode_complete(1);
Neels Hofmeyra99b4272017-11-21 17:13:23 +0100347
Neels Hofmeyr3f391dd2019-08-29 03:53:11 +0200348 btw("MS confirms call, we create a RAN-side RTP and forward MNCC_CALL_CONF_IND");
Neels Hofmeyrbd5f8e92022-01-13 23:18:02 +0100349 expect_crcx(RTP_TO_CN);
Neels Hofmeyr3f391dd2019-08-29 03:53:11 +0200350 expect_crcx(RTP_TO_RAN);
Neels Hofmeyra99b4272017-11-21 17:13:23 +0100351 cc_to_mncc_expect_tx(IMSI, MNCC_CALL_CONF_IND);
352 ms_sends_msg("8348" /* CC: Call Confirmed */
353 "0406600402000581" /* Bearer Capability */
354 "15020100" /* Call Control Capabilities */
355 "40080402600400021f00" /* Supported Codec List */);
Neels Hofmeyrbd5f8e92022-01-13 23:18:02 +0100356 OSMO_ASSERT(crcx_scheduled(RTP_TO_CN));
Neels Hofmeyr81938fd2022-01-14 03:39:58 +0100357 OSMO_ASSERT(crcx_scheduled(RTP_TO_RAN));
Neels Hofmeyr3f391dd2019-08-29 03:53:11 +0200358 OSMO_ASSERT(cc_to_mncc_tx_confirmed);
359
Neels Hofmeyr3f391dd2019-08-29 03:53:11 +0200360 btw("MGW acknowledges the CRCX to RAN, triggering Assignment");
361 expect_iu_rab_assignment();
362 crcx_ok(RTP_TO_RAN);
363 OSMO_ASSERT(iu_rab_assignment_sent);
364
365 btw("Assignment completes, triggering CRCX to CN");
366 expect_crcx(RTP_TO_CN);
Neels Hofmeyrcec51b32023-03-01 03:47:45 +0100367 ms_sends_assignment_complete("AMR");
Neels Hofmeyr3f391dd2019-08-29 03:53:11 +0200368
Neels Hofmeyrbd5f8e92022-01-13 23:18:02 +0100369 btw("MNCC sends MNCC_RTP_CREATE, which first waits for the CN side RTP");
370 mncc_sends_to_cc(MNCC_RTP_CREATE, &mncc);
371
372 btw("When the CN side RTP address is known, ack MNCC_RTP_CREATE with full SDP");
Neels Hofmeyr3f391dd2019-08-29 03:53:11 +0200373 cc_to_mncc_expect_tx("", MNCC_RTP_CREATE);
374 crcx_ok(RTP_TO_CN);
Neels Hofmeyrbd5f8e92022-01-13 23:18:02 +0100375 OSMO_ASSERT(cc_to_mncc_tx_confirmed);
Neels Hofmeyra99b4272017-11-21 17:13:23 +0100376
377 fake_time_passes(1, 23);
378
379 cc_to_mncc_expect_tx("", MNCC_ALERT_IND);
380 ms_sends_msg("8381" /* CC: Alerting */);
Neels Hofmeyrbd5f8e92022-01-13 23:18:02 +0100381 OSMO_ASSERT(cc_to_mncc_tx_confirmed);
Neels Hofmeyra99b4272017-11-21 17:13:23 +0100382
383 fake_time_passes(1, 23);
384
385 cc_to_mncc_expect_tx(IMSI, MNCC_SETUP_CNF);
386 ms_sends_msg("83c7" /* CC: Connect */);
Neels Hofmeyrbd5f8e92022-01-13 23:18:02 +0100387 OSMO_ASSERT(cc_to_mncc_tx_confirmed);
Neels Hofmeyra99b4272017-11-21 17:13:23 +0100388
389 dtap_expect_tx("030f" /* CC: Connect Acknowledge */);
390 mncc_sends_to_cc(MNCC_SETUP_COMPL_REQ, &mncc);
391
392 BTW("RTP stream goes ahead, not shown here.");
393 fake_time_passes(123, 45);
394
395 BTW("Call ends");
396 cc_to_mncc_expect_tx("", MNCC_DISC_IND);
397 ms_sends_msg("832502e090" /* CC: Disconnect, cause: Normal Call Clearing */);
398 OSMO_ASSERT(cc_to_mncc_tx_confirmed);
399
400 dtap_expect_tx("032d" /* CC: Release */);
401 mncc_sends_to_cc(MNCC_REL_REQ, &mncc);
402 OSMO_ASSERT(dtap_tx_confirmed);
403
404 cc_to_mncc_expect_tx("", MNCC_REL_CNF);
405 expect_iu_release();
406 ms_sends_msg("836a" /* CC: Release Complete */);
407 OSMO_ASSERT(cc_to_mncc_tx_confirmed);
408 OSMO_ASSERT(iu_release_sent);
409
Neels Hofmeyrc4628a32018-12-07 14:47:34 +0100410 ran_sends_clear_complete();
Neels Hofmeyra99b4272017-11-21 17:13:23 +0100411 EXPECT_CONN_COUNT(0);
412 clear_vlr();
Neels Hofmeyrdfdc61d2018-03-02 00:40:58 +0100413 comment_end();
Neels Hofmeyra99b4272017-11-21 17:13:23 +0100414}
415
Neels Hofmeyrcbcf89c2018-03-13 17:52:07 +0100416static void test_call_mt2()
417{
418 struct gsm_mncc mncc = {
419 .imsi = IMSI,
420 .callref = 0x423,
Neels Hofmeyr8dd16462022-01-13 20:06:53 +0100421 .fields = MNCC_F_BEARER_CAP,
422 .bearer_cap = {
423 .speech_ver = { GSM48_BCAP_SV_FR, -1, },
424 },
425 /* NOTE: below SDP includes only AMR, above bearer_cap includes only GSM-FR. Ideally, these would match,
426 * but in reality the bearer cap in MNCC was never implemented properly. This test shows that above
427 * bearer_cap is ignored when SDP is present: In the CC Setup below, the Bearer Capability is only
428 * "04 04 60 04 05 8b" with speech versions '04' == GSM48_BCAP_SV_AMR_F and '05' == GSM48_BCAP_SV_AMR_H.
429 */
430 .sdp = "v=0\r\n"
431 "o=OsmoMSC 0 0 IN IP4 10.23.23.1\r\n"
432 "s=GSM Call\r\n"
433 "c=IN IP4 10.23.23.1\r\n"
434 "t=0 0\r\n"
435 "m=audio 23 RTP/AVP 112\r\n"
436 "a=rtpmap:112 AMR/8000\r\n"
437 "a=fmtp:112 octet-align=1\r\n"
438 "a=ptime:20\r\n",
Neels Hofmeyrcbcf89c2018-03-13 17:52:07 +0100439 };
440
441 comment_start();
442
443 fake_time_start();
444
Neels Hofmeyr11bf0bc2019-10-21 05:55:49 +0200445 lu_utran_tmsi();
Neels Hofmeyrcbcf89c2018-03-13 17:52:07 +0100446
447 BTW("after a while, MNCC asks us to setup a call, causing Paging");
Neels Hofmeyrc4628a32018-12-07 14:47:34 +0100448
Neels Hofmeyrcbcf89c2018-03-13 17:52:07 +0100449 paging_expect_imsi(IMSI);
450 paging_sent = false;
451 mncc_sends_to_cc(MNCC_SETUP_REQ, &mncc);
452
453 VERBOSE_ASSERT(paging_sent, == true, "%d");
Neels Hofmeyrcbcf89c2018-03-13 17:52:07 +0100454
455 btw("MS replies with Paging Response, and VLR sends Auth Request");
456 auth_request_sent = false;
457 auth_request_expect_rand = "c187a53a5e6b9d573cac7c74451fd46d";
458 auth_request_expect_autn = "1843a645b98d00005b2d666af46c45d9";
459 ms_sends_msg("062707"
460 "03575886" /* classmark 2 */
461 "089910070000106005" /* IMSI */);
462 VERBOSE_ASSERT(auth_request_sent, == true, "%d");
463
464 btw("MS sends Authen Response, VLR accepts and sends SecurityModeControl");
465 expect_security_mode_ctrl(NULL, "1159ec926a50e98c034a6b7d7c9f418d");
466 ms_sends_msg("0554" "7db47cf7" "2104" "f81e4dc7"); /* 2nd vector's res, s.a. */
467 VERBOSE_ASSERT(security_mode_ctrl_sent, == true, "%d");
468
469 btw("MS sends SecurityModeControl acceptance, VLR accepts, sends CC Setup");
Neels Hofmeyr8dd16462022-01-13 20:06:53 +0100470 dtap_expect_tx("0305" /* CC: Setup */ "04 04 60 04 05 8b" /* Bearer Cap, speech ver of AMR-FR and AMR-HR */);
Alexander Couzens2aaff752021-10-19 17:09:11 +0200471 ms_sends_security_mode_complete(1);
Neels Hofmeyrcbcf89c2018-03-13 17:52:07 +0100472
Neels Hofmeyr3f391dd2019-08-29 03:53:11 +0200473 btw("MS confirms call, we create a RAN-side RTP and forward MNCC_CALL_CONF_IND");
Neels Hofmeyrbd5f8e92022-01-13 23:18:02 +0100474 expect_crcx(RTP_TO_CN);
Neels Hofmeyr3f391dd2019-08-29 03:53:11 +0200475 expect_crcx(RTP_TO_RAN);
Neels Hofmeyrcbcf89c2018-03-13 17:52:07 +0100476 cc_to_mncc_expect_tx(IMSI, MNCC_CALL_CONF_IND);
477 ms_sends_msg("8348" /* CC: Call Confirmed */
478 "0406600402000581" /* Bearer Capability */
479 "15020100" /* Call Control Capabilities */
480 "40080402600400021f00" /* Supported Codec List */);
Neels Hofmeyrbd5f8e92022-01-13 23:18:02 +0100481 OSMO_ASSERT(crcx_scheduled(RTP_TO_CN));
Neels Hofmeyr81938fd2022-01-14 03:39:58 +0100482 OSMO_ASSERT(crcx_scheduled(RTP_TO_RAN));
Neels Hofmeyrcbcf89c2018-03-13 17:52:07 +0100483 OSMO_ASSERT(cc_to_mncc_tx_confirmed);
484
Neels Hofmeyrbd5f8e92022-01-13 23:18:02 +0100485 btw("MNCC sends MNCC_RTP_CREATE, which first waits for the CN side RTP");
Neels Hofmeyr3f391dd2019-08-29 03:53:11 +0200486 mncc_sends_to_cc(MNCC_RTP_CREATE, &mncc);
487
488 btw("MGW acknowledges the CRCX to RAN, triggering Assignment");
489 expect_iu_rab_assignment();
490 crcx_ok(RTP_TO_RAN);
491 OSMO_ASSERT(iu_rab_assignment_sent);
492
493 btw("Assignment completes, triggering CRCX to CN");
Neels Hofmeyrcec51b32023-03-01 03:47:45 +0100494 ms_sends_assignment_complete("AMR");
Neels Hofmeyr3f391dd2019-08-29 03:53:11 +0200495
Neels Hofmeyrbd5f8e92022-01-13 23:18:02 +0100496 btw("When the CN side RTP address is known, ack MNCC_RTP_CREATE with full SDP");
Neels Hofmeyr3f391dd2019-08-29 03:53:11 +0200497 cc_to_mncc_expect_tx("", MNCC_RTP_CREATE);
498 crcx_ok(RTP_TO_CN);
Neels Hofmeyrbd5f8e92022-01-13 23:18:02 +0100499 OSMO_ASSERT(cc_to_mncc_tx_confirmed);
500
Neels Hofmeyrcbcf89c2018-03-13 17:52:07 +0100501 fake_time_passes(1, 23);
502
503 cc_to_mncc_expect_tx("", MNCC_ALERT_IND);
504 ms_sends_msg("8381" /* CC: Alerting */);
505 OSMO_ASSERT(cc_to_mncc_tx_confirmed);
506
507 fake_time_passes(15, 23);
508
509 btw("The call failed, the BSC sends a BSSMAP Clear Request");
Vadim Yanitskiydd466cf2021-02-05 19:17:31 +0100510 cc_to_mncc_expect_tx("", MNCC_REL_IND);
Keith Whyteff17f8f2019-08-01 12:20:25 +0200511 dtap_expect_tx("032d0802e1af"); /* CC: Release */
Neels Hofmeyrcbcf89c2018-03-13 17:52:07 +0100512 expect_iu_release();
Neels Hofmeyrc4628a32018-12-07 14:47:34 +0100513 msc_a_release_cn(msub_msc_a(g_msub));
514 OSMO_ASSERT(dtap_tx_confirmed);
Neels Hofmeyrcbcf89c2018-03-13 17:52:07 +0100515 OSMO_ASSERT(cc_to_mncc_tx_confirmed);
516 OSMO_ASSERT(iu_release_sent);
517
Neels Hofmeyrc4628a32018-12-07 14:47:34 +0100518 ran_sends_clear_complete();
Neels Hofmeyrcbcf89c2018-03-13 17:52:07 +0100519 EXPECT_CONN_COUNT(0);
520
521 /* Make sure a pending release timer doesn't fire later to access freed data */
522 fake_time_passes(15, 23);
523
524 clear_vlr();
525 comment_end();
526}
527
Neels Hofmeyreb1cfdb2018-03-15 13:42:10 +0100528static void test_call_mo_to_unknown()
529{
530 struct gsm_mncc mncc = {
531 .imsi = IMSI,
532 };
533
534 comment_start();
535
536 fake_time_start();
537
Neels Hofmeyr11bf0bc2019-10-21 05:55:49 +0200538 lu_utran_tmsi();
Neels Hofmeyreb1cfdb2018-03-15 13:42:10 +0100539
540 BTW("after a while, a new conn sends a CM Service Request. VLR responds with Auth Req, 2nd auth vector");
541 auth_request_sent = false;
542 auth_request_expect_rand = "c187a53a5e6b9d573cac7c74451fd46d";
543 auth_request_expect_autn = "1843a645b98d00005b2d666af46c45d9";
544 cm_service_result_sent = RES_NONE;
Neels Hofmeyrc4628a32018-12-07 14:47:34 +0100545 ms_sends_msg("052471"
Neels Hofmeyreb1cfdb2018-03-15 13:42:10 +0100546 "03575886" /* classmark 2 */
547 "089910070000106005" /* IMSI */);
Neels Hofmeyreb1cfdb2018-03-15 13:42:10 +0100548 VERBOSE_ASSERT(cm_service_result_sent, == RES_NONE, "%d");
549 VERBOSE_ASSERT(auth_request_sent, == true, "%d");
550
551 btw("needs auth, not yet accepted");
552 EXPECT_ACCEPTED(false);
553
554 /* On UTRAN */
555 btw("MS sends Authen Response, VLR accepts and sends SecurityModeControl");
556 expect_security_mode_ctrl(NULL, "1159ec926a50e98c034a6b7d7c9f418d");
557 ms_sends_msg("0554" "7db47cf7" "2104" "f81e4dc7"); /* 2nd vector's res, s.a. */
558 VERBOSE_ASSERT(security_mode_ctrl_sent, == true, "%d");
559 VERBOSE_ASSERT(cm_service_result_sent, == RES_NONE, "%d");
560
561 btw("MS sends SecurityModeControl acceptance, VLR accepts; above Ciphering is an implicit CM Service Accept");
Alexander Couzens2aaff752021-10-19 17:09:11 +0200562 ms_sends_security_mode_complete(1);
Neels Hofmeyreb1cfdb2018-03-15 13:42:10 +0100563 VERBOSE_ASSERT(cm_service_result_sent, == RES_NONE, "%d");
564
565 BTW("a call is initiated");
566
Neels Hofmeyrbd5f8e92022-01-13 23:18:02 +0100567 btw("CC SETUP causes CRCX towards CN");
568 expect_crcx(RTP_TO_CN);
569 expect_crcx(RTP_TO_RAN);
Neels Hofmeyreb1cfdb2018-03-15 13:42:10 +0100570 ms_sends_msg("0385" /* CC, seq = 2 -> 0x80 | CC Setup = 0x5 */
571 "0406600402000581" /* Bearer Capability */
572 "5e038121f3" /* Called Number BCD */
573 "15020100" /* CC Capabilities */
574 "4008" /* Supported Codec List */
575 "04026000" /* UMTS: AMR 2 | AMR */
576 "00021f00" /* GSM: HR AMR | FR AMR | GSM EFR | GSM HR | GSM FR */
577 );
Neels Hofmeyrbd5f8e92022-01-13 23:18:02 +0100578 OSMO_ASSERT(crcx_scheduled(RTP_TO_CN));
579 OSMO_ASSERT(crcx_scheduled(RTP_TO_RAN));
580
581 btw("As soon as the MGW port towards CN is created, MNCC_SETUP_IND is triggered");
582 cc_to_mncc_expect_tx(IMSI, MNCC_SETUP_IND);
583 crcx_ok(RTP_TO_CN);
Neels Hofmeyreb1cfdb2018-03-15 13:42:10 +0100584 OSMO_ASSERT(cc_to_mncc_tx_confirmed);
585 mncc.callref = cc_to_mncc_tx_got_callref;
586
Neels Hofmeyr3f391dd2019-08-29 03:53:11 +0200587 btw("MNCC replies with MNCC_RTP_CREATE, causing MGW endpoint CRCX to RAN");
Neels Hofmeyr3f391dd2019-08-29 03:53:11 +0200588 mncc_sends_to_cc(MNCC_RTP_CREATE, &mncc);
Neels Hofmeyr3f391dd2019-08-29 03:53:11 +0200589
590 btw("MGW acknowledges the CRCX, triggering Assignment");
591 expect_iu_rab_assignment();
592 crcx_ok(RTP_TO_RAN);
593 OSMO_ASSERT(iu_rab_assignment_sent);
594
Neels Hofmeyrbd5f8e92022-01-13 23:18:02 +0100595 btw("Assignment succeeds, triggering MNCC_RTP_CREATE ack to MNCC");
Neels Hofmeyr3f391dd2019-08-29 03:53:11 +0200596 cc_to_mncc_expect_tx("", MNCC_RTP_CREATE);
Neels Hofmeyrbd5f8e92022-01-13 23:18:02 +0100597 ms_sends_assignment_complete("AMR");
598 OSMO_ASSERT(cc_to_mncc_tx_confirmed);
Neels Hofmeyr3f391dd2019-08-29 03:53:11 +0200599
Neels Hofmeyreb1cfdb2018-03-15 13:42:10 +0100600 btw("MNCC says that's fine");
601 dtap_expect_tx("8302" /* CC: Call Proceeding */);
602 mncc_sends_to_cc(MNCC_CALL_PROC_REQ, &mncc);
603 OSMO_ASSERT(dtap_tx_confirmed);
604
605 btw("But the other side's MSISDN could not be resolved, MNCC tells us to cancel");
606 dtap_expect_tx("832d" /* CC: Release Request */);
607 mncc_sends_to_cc(MNCC_REL_REQ, &mncc);
608
609 dtap_expect_tx("832d" /* CC: Release Request */);
610 fake_time_passes(10, 23);
611
612 expect_iu_release();
613 cc_to_mncc_expect_tx("", MNCC_REL_CNF);
614 ms_sends_msg("036a" /* CC: Release Complete */);
Neels Hofmeyreb1cfdb2018-03-15 13:42:10 +0100615 OSMO_ASSERT(iu_release_sent);
616 OSMO_ASSERT(cc_to_mncc_tx_confirmed);
617
Neels Hofmeyrc4628a32018-12-07 14:47:34 +0100618 ran_sends_clear_complete();
Neels Hofmeyreb1cfdb2018-03-15 13:42:10 +0100619 EXPECT_CONN_COUNT(0);
620 clear_vlr();
621 comment_end();
622}
623
624static void test_call_mo_to_unknown_timeout()
625{
626 struct gsm_mncc mncc = {
627 .imsi = IMSI,
628 };
629
630 comment_start();
631
632 fake_time_start();
633
Neels Hofmeyr11bf0bc2019-10-21 05:55:49 +0200634 lu_utran_tmsi();
Neels Hofmeyreb1cfdb2018-03-15 13:42:10 +0100635
636 BTW("after a while, a new conn sends a CM Service Request. VLR responds with Auth Req, 2nd auth vector");
637 auth_request_sent = false;
638 auth_request_expect_rand = "c187a53a5e6b9d573cac7c74451fd46d";
639 auth_request_expect_autn = "1843a645b98d00005b2d666af46c45d9";
640 cm_service_result_sent = RES_NONE;
Neels Hofmeyrc4628a32018-12-07 14:47:34 +0100641 ms_sends_msg("052471"
Neels Hofmeyreb1cfdb2018-03-15 13:42:10 +0100642 "03575886" /* classmark 2 */
643 "089910070000106005" /* IMSI */);
Neels Hofmeyreb1cfdb2018-03-15 13:42:10 +0100644 VERBOSE_ASSERT(cm_service_result_sent, == RES_NONE, "%d");
645 VERBOSE_ASSERT(auth_request_sent, == true, "%d");
646
647 btw("needs auth, not yet accepted");
648 EXPECT_ACCEPTED(false);
649
650 /* On UTRAN */
651 btw("MS sends Authen Response, VLR accepts and sends SecurityModeControl");
652 expect_security_mode_ctrl(NULL, "1159ec926a50e98c034a6b7d7c9f418d");
653 ms_sends_msg("0554" "7db47cf7" "2104" "f81e4dc7"); /* 2nd vector's res, s.a. */
654 VERBOSE_ASSERT(security_mode_ctrl_sent, == true, "%d");
655 VERBOSE_ASSERT(cm_service_result_sent, == RES_NONE, "%d");
656
657 btw("MS sends SecurityModeControl acceptance, VLR accepts; above Ciphering is an implicit CM Service Accept");
Alexander Couzens2aaff752021-10-19 17:09:11 +0200658 ms_sends_security_mode_complete(1);
Neels Hofmeyreb1cfdb2018-03-15 13:42:10 +0100659 VERBOSE_ASSERT(cm_service_result_sent, == RES_NONE, "%d");
660
661 BTW("a call is initiated");
662
Neels Hofmeyrbd5f8e92022-01-13 23:18:02 +0100663 btw("CC SETUP causes CRCX towards CN");
664 expect_crcx(RTP_TO_CN);
665 expect_crcx(RTP_TO_RAN);
Neels Hofmeyreb1cfdb2018-03-15 13:42:10 +0100666 ms_sends_msg("0385" /* CC, seq = 2 -> 0x80 | CC Setup = 0x5 */
667 "0406600402000581" /* Bearer Capability */
668 "5e038121f3" /* Called Number BCD */
669 "15020100" /* CC Capabilities */
670 "4008" /* Supported Codec List */
671 "04026000" /* UMTS: AMR 2 | AMR */
672 "00021f00" /* GSM: HR AMR | FR AMR | GSM EFR | GSM HR | GSM FR */
673 );
Neels Hofmeyrbd5f8e92022-01-13 23:18:02 +0100674 OSMO_ASSERT(crcx_scheduled(RTP_TO_CN));
675 OSMO_ASSERT(crcx_scheduled(RTP_TO_RAN));
676
677 btw("As soon as the MGW port towards CN is created, MNCC_SETUP_IND is triggered");
678 cc_to_mncc_expect_tx(IMSI, MNCC_SETUP_IND);
679 crcx_ok(RTP_TO_CN);
Neels Hofmeyreb1cfdb2018-03-15 13:42:10 +0100680 OSMO_ASSERT(cc_to_mncc_tx_confirmed);
681 mncc.callref = cc_to_mncc_tx_got_callref;
682
Neels Hofmeyr3f391dd2019-08-29 03:53:11 +0200683 btw("MNCC replies with MNCC_RTP_CREATE, causing MGW endpoint CRCX to RAN");
Neels Hofmeyr3f391dd2019-08-29 03:53:11 +0200684 mncc_sends_to_cc(MNCC_RTP_CREATE, &mncc);
Neels Hofmeyr3f391dd2019-08-29 03:53:11 +0200685
686 btw("MGW acknowledges the CRCX, triggering Assignment");
687 expect_iu_rab_assignment();
688 crcx_ok(RTP_TO_RAN);
689 OSMO_ASSERT(iu_rab_assignment_sent);
690
Neels Hofmeyrbd5f8e92022-01-13 23:18:02 +0100691 btw("Assignment succeeds, triggering MNCC_RTP_CREATE ack to MNCC");
Neels Hofmeyr3f391dd2019-08-29 03:53:11 +0200692 cc_to_mncc_expect_tx("", MNCC_RTP_CREATE);
Neels Hofmeyrbd5f8e92022-01-13 23:18:02 +0100693 ms_sends_assignment_complete("AMR");
694 OSMO_ASSERT(cc_to_mncc_tx_confirmed);
Neels Hofmeyr3f391dd2019-08-29 03:53:11 +0200695
Neels Hofmeyreb1cfdb2018-03-15 13:42:10 +0100696 btw("MNCC says that's fine");
697 dtap_expect_tx("8302" /* CC: Call Proceeding */);
698 mncc_sends_to_cc(MNCC_CALL_PROC_REQ, &mncc);
699 OSMO_ASSERT(dtap_tx_confirmed);
700
701 btw("But the other side's MSISDN could not be resolved, MNCC tells us to cancel");
702 dtap_expect_tx("832d" /* CC: Release Request */);
703 mncc_sends_to_cc(MNCC_REL_REQ, &mncc);
704
705 btw("Despite our repeated CC Release Requests, the MS does not respond anymore");
706 dtap_expect_tx("832d" /* CC: Release Request */);
707 fake_time_passes(10, 23);
708
709 btw("The CC Release times out and we still properly clear the conn");
Neels Hofmeyreb1cfdb2018-03-15 13:42:10 +0100710 cc_to_mncc_expect_tx("", MNCC_REL_CNF);
Neels Hofmeyrd6a769b2018-03-12 23:59:07 +0100711 expect_iu_release();
Neels Hofmeyreb1cfdb2018-03-15 13:42:10 +0100712 fake_time_passes(10, 23);
713 OSMO_ASSERT(cc_to_mncc_tx_confirmed);
Neels Hofmeyreb1cfdb2018-03-15 13:42:10 +0100714 OSMO_ASSERT(iu_release_sent);
Neels Hofmeyreb1cfdb2018-03-15 13:42:10 +0100715
Neels Hofmeyrc4628a32018-12-07 14:47:34 +0100716 ran_sends_clear_complete();
Neels Hofmeyrd6a769b2018-03-12 23:59:07 +0100717 EXPECT_CONN_COUNT(0);
Neels Hofmeyreb1cfdb2018-03-15 13:42:10 +0100718 clear_vlr();
719 comment_end();
720}
721
722
Neels Hofmeyra99b4272017-11-21 17:13:23 +0100723msc_vlr_test_func_t msc_vlr_tests[] = {
724 test_call_mo,
725 test_call_mt,
Neels Hofmeyrcbcf89c2018-03-13 17:52:07 +0100726 test_call_mt2,
Neels Hofmeyreb1cfdb2018-03-15 13:42:10 +0100727 test_call_mo_to_unknown,
728 test_call_mo_to_unknown_timeout,
Neels Hofmeyra99b4272017-11-21 17:13:23 +0100729 NULL
730};