blob: 1de34a0ffeb948b644b198b7be92d08cbf0b2bee [file] [log] [blame]
Harald Welte34b5a952019-05-27 11:54:11 +02001/* Osmocom MNCC type definitions in TTCN-3
2 * (C) 2017-2019 Harald Welte <laforge@gnumonks.org>
3 * contributions by sysmocom -s.f.m.c. GmbH
4 * (C) 2018 Vadim Yanitskiy <axilirator@gmail.com>
5 * All rights reserved.
6 *
7 * Released under the terms of GNU General Public License, Version 2 or
8 * (at your option) any later version.
9 *
10 * SPDX-License-Identifier: GPL-2.0-or-later
11 */
12
Harald Welte474fd7d2017-12-29 16:01:39 +010013module MNCC_Types {
14
15import from Osmocom_Types all;
16
17/* for architectures where 'int' is 32bit like x86_64 */
18type integer int with { variant "FIELDLENGTH(32)" };
19
20
21/* GSM 04.08 Bearer Capability: Rate Adaption */
22type enumerated GSM48_bcap_ra {
23 GSM48_BCAP_RA_NONE (0),
24 GSM48_BCAP_RA_V110_X30 (1),
25 GSM48_BCAP_RA_X31 (2),
26 GSM48_BCAP_RA_OTHER (3)
27};
28
29/* GSM 04.08 Bearer Capability: Signalling access protocol */
30type enumerated GSM48_bcap_sig_access {
Harald Welteec3d0652018-01-22 02:54:13 +010031 GSM48_BCAP_SA_NONE (0),
Harald Welte474fd7d2017-12-29 16:01:39 +010032 GSM48_BCAP_SA_I440_I450 (1),
33 GSM48_BCAP_SA_X21 (2),
34 GSM48_BCAP_SA_X28_DP_IN (3),
35 GSM48_BCAP_SA_X28_DP_UN (4),
36 GSM48_BCAP_SA_X28_NDP (5),
37 GSM48_BCAP_SA_X32 (6)
38};
39
40/* GSM 04.08 Bearer Capability: User Rate */
41type enumerated GSM48_bcap_user_rate {
Harald Welteec3d0652018-01-22 02:54:13 +010042 GSM48_BCAP_UR_NONE (0),
Harald Welte474fd7d2017-12-29 16:01:39 +010043 GSM48_BCAP_UR_300 (1),
44 GSM48_BCAP_UR_1200 (2),
45 GSM48_BCAP_UR_2400 (3),
46 GSM48_BCAP_UR_4800 (4),
47 GSM48_BCAP_UR_9600 (5),
48 GSM48_BCAP_UR_12000 (6),
49 GSM48_BCAP_UR_1200_75 (7)
50};
51
52/* GSM 04.08 Bearer Capability: Parity */
53type enumerated GSM48_bcap_parity {
54 GSM48_BCAP_PAR_ODD (0),
55 GSM48_BCAP_PAR_EVEN (2),
56 GSM48_BCAP_PAR_NONE (3),
57 GSM48_BCAP_PAR_ZERO (4),
58 GSM48_BCAP_PAR_ONE (5)
59};
60
61/* GSM 04.08 Bearer Capability: Intermediate Rate */
62type enumerated GSM48_bcap_interm_rate {
Harald Welteec3d0652018-01-22 02:54:13 +010063 GSM48_BCAP_IR_NONE (0),
Harald Welte474fd7d2017-12-29 16:01:39 +010064 GSM48_BCAP_IR_8k (2),
65 GSM48_BCAP_IR_16k (3)
66};
67
68/* GSM 04.08 Bearer Capability: Transparency */
69type enumerated GSM48_bcap_transp {
70 GSM48_BCAP_TR_TRANSP (0),
71 GSM48_BCAP_TR_RLP (1),
72 GSM48_BCAP_TR_TR_PREF (2),
73 GSM48_BCAP_TR_RLP_PREF (3)
74};
75
76/* GSM 04.08 Bearer Capability: Modem Type */
77type enumerated GSM48_bcap_modem_type {
78 GSM48_BCAP_MT_NONE (0),
79 GSM48_BCAP_MT_V21 (1),
80 GSM48_BCAP_MT_V22 (2),
81 GSM48_BCAP_MT_V22bis (3),
82 GSM48_BCAP_MT_V23 (4),
83 GSM48_BCAP_MT_V26ter (5),
84 GSM48_BCAP_MT_V32 (6),
85 GSM48_BCAP_MT_UNDEF (7),
86 GSM48_BCAP_MT_AUTO_1 (8)
87};
88
89type enumerated MNCC_MsgType {
90 MNCC_SETUP_REQ ('0101'O),
91 MNCC_SETUP_IND ('0102'O),
92 MNCC_SETUP_RSP ('0103'O),
93 MNCC_SETUP_CNF ('0104'O),
94 MNCC_SETUP_COMPL_REQ ('0105'O),
95 MNCC_SETUP_COMPL_IND ('0106'O),
96 MNCC_CALL_CONF_IND ('0107'O),
97 MNCC_CALL_PROC_REQ ('0108'O),
98 MNCC_PROGRESS_REQ ('0109'O),
99 MNCC_ALERT_REQ ('010a'O),
100 MNCC_ALERT_IND ('010b'O),
101 MNCC_NOTIFY_REQ ('010c'O),
102 MNCC_NOTIFY_IND ('010d'O),
103 MNCC_DISC_REQ ('010e'O),
104 MNCC_DISC_IND ('010f'O),
105 MNCC_REL_REQ ('0110'O),
106 MNCC_REL_IND ('0111'O),
107 MNCC_REL_CNF ('0112'O),
108 MNCC_FACILITY_REQ ('0113'O),
109 MNCC_FACILITY_IND ('0114'O),
110 MNCC_START_DTMF_IND ('0115'O),
111 MNCC_START_DTMF_RSP ('0116'O),
112 MNCC_START_DTMF_REJ ('0117'O),
113 MNCC_STOP_DTMF_IND ('0118'O),
114 MNCC_STOP_DTMF_RSP ('0119'O),
115 MNCC_MODIFY_REQ ('011a'O),
116 MNCC_MODIFY_IND ('011b'O),
117 MNCC_MODIFY_RSP ('011c'O),
118 MNCC_MODIFY_CNF ('011d'O),
119 MNCC_MODIFY_REJ ('011e'O),
120 MNCC_HOLD_IND ('011f'O),
121 MNCC_HOLD_CNF ('0120'O),
122 MNCC_HOLD_REJ ('0121'O),
123 MNCC_RETRIEVE_IND ('0122'O),
124 MNCC_RETRIEVE_CNF ('0123'O),
125 MNCC_RETRIEVE_REJ ('0124'O),
126 MNCC_USERINFO_REQ ('0125'O),
127 MNCC_USERINFO_IND ('0126'O),
128 MNCC_REJ_REQ ('0127'O),
129 MNCC_REJ_IND ('0128'O),
Vadim Yanitskiye0bb4f02018-11-01 03:40:38 +0700130 MNCC_PROGRESS_IND ('0129'O),
131 MNCC_CALL_PROC_IND ('012a'O),
132 MNCC_CALL_CONF_REQ ('012b'O),
133 MNCC_START_DTMF_REQ ('012c'O),
134 MNCC_STOP_DTMF_REQ ('012d'O),
135 MNCC_HOLD_REQ ('012e'O),
136 MNCC_RETRIEVE_REQ ('012f'O),
Harald Welte474fd7d2017-12-29 16:01:39 +0100137
138 MNCC_BRIDGE ('0200'O),
139 MNCC_FRAME_RECV ('0201'O),
140 MNCC_FRAME_DROP ('0202'O),
141 MNCC_LCHAN_MODIFY ('0203'O),
142 MNCC_RTP_CREATE ('0204'O),
143 MNCC_RTP_CONNECT ('0205'O),
144 MNCC_RTP_FREE ('0206'O),
145
146 GSM_TCHF_FRAME ('0300'O),
147 GSM_TCHF_FRAME_EFR ('0301'O),
148 GSM_TCHH_FRAME ('0302'O),
149 GSM_TCH_FRAME_AMR ('0303'O),
150 GSM_BAD_FRAME ('03ff'O),
151
152 MNCC_SOCKET_HELLO ('0400'O)
153};
154
155const integer GSM_MAX_FACILITY := 128;
156const integer GSM_MAX_SSVERSION := 128;
157const integer GSM_MAX_USERUSER := 128;
158
159type record MNCC_bearer_cap_data {
160 GSM48_bcap_ra rate_adaptation,
161 GSM48_bcap_sig_access sig_access,
162 int async,
163 int nr_stop_bits,
164 int nr_data_bits,
165 GSM48_bcap_user_rate user_rate,
166 GSM48_bcap_parity parity,
167 GSM48_bcap_interm_rate interm_rate,
168 GSM48_bcap_transp transp,
169 GSM48_bcap_modem_type modem_type
170};
171
172type record length(0..8) of int MNCC_speech_vers;
173
174/* Expanded fields from GSM TS 04.08, Table 10.5.102 */
175type record MNCC_bearer_cap {
176 int transfer,
177 int mode,
178 int coding,
179 int radio,
180 int speech_ctm,
181 MNCC_speech_vers speech_ver,
182 MNCC_bearer_cap_data data optional
183};
184
185template MNCC_bearer_cap ts_MNCC_bcap_voice := {
186 transfer := 0, /* speech */
187 mode := 0, /* circuit */
188 coding := 0, /* GSM standard */
189 radio := 3, /* FR/HR, FR preferred */
190 speech_ctm := 0, /* not supported */
Harald Welte515f5d12018-01-22 02:55:10 +0100191 speech_ver := { 0, 2, 4, 1, 5, -1 },
Harald Welte474fd7d2017-12-29 16:01:39 +0100192 data := omit
193};
194
195type record MNCC_number {
196 GSM48_type_of_number number_type,
197 GSM48_num_plan_ind plan,
198 GSM48_present_ind presence,
199 GSM48_screening_ind screen,
200 charstring number
201};
202
203/* 24.008 10.5.118 */
204type enumerated GSM48_num_plan_ind {
205 GSM48_NUMPLAN_UNKNOWN (0),
206 GSM48_NUMPLAN_E164 (1),
207 GSM48_NUMPLAN_X121 (3),
208 GSM48_NUMPLAN_F69 (4),
209 GSM48_NUMPLAN_NATIONAL (8),
210 GSM48_NUMPLAN_PRIVATE (9),
211 GSM48_NUMPLAN_CTS (11),
212 GSM48_NUMPLAN_RESERVED (15)
213};
214
215/* 04.08 10.5.118 */
216type enumerated GSM48_type_of_number {
217 GSM48_TON_UNKNOWN (0),
218 GSM48_TON_INTERNATIONAL (1),
219 GSM48_TON_NATIONAL (2),
220 GSM48_TON_NETWORK_SPECIFIC (3),
221 GSM48_TON_SHORT_CODE (4)
222};
223
224/* 04.08 10.5.120 */
225type enumerated GSM48_present_ind {
226 GSM48_PRES_IND_ALLOWED (0),
227 GSM48_PRES_IND_RESTRICTED (1),
228 GSM48_PRES_IND_NUM_NOT_AVAIL (2),
229 GSM48_PRES_IND_RESERVED (3)
230};
231
232type enumerated GSM48_screening_ind {
233 GSM48_SCR_IND_NOT_SCREENED (0),
234 GSM48_SCR_IND_VERIF_PASSED (1),
235 GSM48_SCR_IND_VERIF_FAILED (2),
236 GSM48_SCR_IND_NETW_PROVIDED (3)
237};
238
Harald Weltefe75a202018-01-17 13:59:20 +0100239/* 24.008 Table 10.5.122 */
240type enumerated GSM48_cause_coding {
241 GSM48_CAUSE_CS_Q931 ('00'B),
242 GSM48_CAUSE_CS_RSVD ('01'B),
243 GSM48_CAUSE_CS_NATIONAL ('10'B),
244 GSM48_CAUSE_CS_GSM ('11'B)
245}
246
247type enumerated GSM48_cause_loc {
248 GSM48_CAUSE_LOC_USER ('0000'B),
249 GSM48_CAUSE_LOC_PRN_S_LU ('0001'B),
250 GSM48_CAUSE_LOC_PUN_S_LU ('0010'B),
251 GSM48_CAUSE_LOC_TRANS_NET ('0011'B),
252 GSM48_CAUSE_LOC_PUN_S_RU ('0100'B),
253 GSM48_CAUSE_LOC_PRN_S_RU ('0101'B),
254 GSM48_CAUSE_LOC_INN_NET ('0111'B),
255 GSM48_CAUSE_LOC_NET_BEYOND ('1010'B)
256}
257
258
Harald Welte474fd7d2017-12-29 16:01:39 +0100259
Harald Welted748a052018-01-22 02:59:24 +0100260template (value) MNCC_number ts_MNCC_number(charstring number,
Harald Welte474fd7d2017-12-29 16:01:39 +0100261 GSM48_type_of_number ton := GSM48_TON_INTERNATIONAL,
262 GSM48_num_plan_ind npi := GSM48_NUMPLAN_E164,
263 GSM48_present_ind pres := GSM48_PRES_IND_ALLOWED,
264 GSM48_screening_ind screen := GSM48_SCR_IND_NOT_SCREENED) := {
265 number_type := ton,
266 plan := npi,
267 presence := pres,
268 screen := screen,
269 number := number
270}
271
Harald Welted748a052018-01-22 02:59:24 +0100272template MNCC_number tr_MNCC_number(template charstring number,
273 template GSM48_type_of_number ton := ?,
274 template GSM48_num_plan_ind npi := ?,
275 template GSM48_present_ind pres := ?,
276 template GSM48_screening_ind screen := ?) := {
277 number_type := ton,
278 plan := npi,
279 presence := pres,
280 screen := screen,
281 number := number
282}
283
Harald Welte474fd7d2017-12-29 16:01:39 +0100284type record MNCC_cause {
Harald Weltefe75a202018-01-17 13:59:20 +0100285 GSM48_cause_loc location,
286 GSM48_cause_coding coding,
Harald Welte474fd7d2017-12-29 16:01:39 +0100287 int rec,
288 int rec_val,
289 int val,
290 octetstring diag
Harald Weltefe75a202018-01-17 13:59:20 +0100291} with {
292 variant (location) "FIELDLENGTH(32)";
293 variant (coding) "FIELDLENGTH(32)";
294}
Harald Welte474fd7d2017-12-29 16:01:39 +0100295
Harald Welte90938392018-03-25 16:36:40 +0200296template (value) MNCC_cause ts_MNCC_cause(int val,
Harald Welte2bb825f2018-01-22 11:31:18 +0100297 GSM48_cause_loc loc := GSM48_CAUSE_LOC_PUN_S_LU,
298 GSM48_cause_coding coding := GSM48_CAUSE_CS_GSM,
299 octetstring diag := ''O) := {
300 location := loc,
301 coding := coding,
302 rec := 0,
303 rec_val := 0,
304 val := val,
305 diag := diag
306}
307
Harald Welte474fd7d2017-12-29 16:01:39 +0100308type record MNCC_useruser {
309 int proto,
310 charstring info
311};
312
313type record MNCC_progress {
314 int coding,
315 int location,
316 int descr
317};
318
319type record MNCC_cccap {
320 int dtmf,
321 int pcp
322};
323
Harald Welte8b2a2582018-01-16 08:11:42 +0100324type int MNCC_notify (0..127);
Harald Welted13700d2018-02-02 20:06:52 +0100325type charstring MNCC_keypad length (1);
Harald Welte8b2a2582018-01-16 08:11:42 +0100326
Harald Welte474fd7d2017-12-29 16:01:39 +0100327type enumerated MNCC_bcap {
328 GSM_MNCC_BCAP_SPEECH (0),
329 GSM_MNCC_BCAP_UNR_DIG (1),
330 GSM_MNCC_BCAP_AUDIO (2),
331 GSM_MNCC_BCAP_FAX_G3 (3),
332 GSM_MNCC_BCAP_OTHER_ITC (4),
333 GSM_MNCC_BCAP_RESERVED (7)
334};
335
336
337type record MNCC_PDU_Signal {
338 uint32_t callref,
339
340 MNCC_bearer_cap bearer_cap optional,
341 MNCC_number called optional,
342 MNCC_number calling optional,
343 MNCC_number redirecting optional,
344 MNCC_number connected optional,
345 MNCC_cause cause optional,
346 MNCC_progress progress optional,
347 MNCC_useruser useruser optional,
348 charstring facility optional,
349 MNCC_cccap cccap optional,
350 charstring ssversion optional,
351
352 int clir_sup,
353 int clir_inv,
354 int signal optional,
355
Harald Welte8b2a2582018-01-16 08:11:42 +0100356 MNCC_keypad keypad optional,
Harald Welte474fd7d2017-12-29 16:01:39 +0100357 int more,
Harald Welte8b2a2582018-01-16 08:11:42 +0100358 MNCC_notify notify,
Harald Welte474fd7d2017-12-29 16:01:39 +0100359 int emergency optional,
360 charstring imsi,
361
362 uint8_t lchan_type, /* empty in OSmoMSC */
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100363 uint8_t lchan_mode, /* empty in OsmoMSC */
364
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +0300365 octetstring gcr optional,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100366 charstring sdp optional
Harald Welte474fd7d2017-12-29 16:01:39 +0100367};
368
369
370type record MNCC_PDU_Data {
371 uint32_t callref,
372 octetstring data
373};
374
375type record MNCC_PDU_Rtp {
376 uint32_t callref,
Pau Espin Pedrol563b3d02020-09-09 20:19:52 +0200377 boolean is_ipv6,
378 octetstring ip,
Harald Welte474fd7d2017-12-29 16:01:39 +0100379 uint16_t rtp_port,
380 uint32_t payload_type,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100381 uint32_t payload_msg_type,
382
383 charstring sdp optional
Harald Welte474fd7d2017-12-29 16:01:39 +0100384};
385
386type record MNCC_PDU_Hello {
387 uint32_t version,
388 uint32_t mncc_size,
389 uint32_t data_frame_size,
390 uint32_t called_offset,
391 uint32_t signal_offset,
392 uint32_t emergency_offset,
393 uint32_t lchan_type_offset
394};
395
396
397type union MNCC_MsgUnion {
398 MNCC_PDU_Signal signal,
399 MNCC_PDU_Data data,
400 MNCC_PDU_Rtp rtp,
401 MNCC_PDU_Hello hello
402};
403
404
405type record MNCC_PDU {
406 MNCC_MsgType msg_type,
407 MNCC_MsgUnion u
408} with { variant (u) "CROSSTAG(
409 hello, msg_type = MNCC_SOCKET_HELLO;
410 rtp, { msg_type = MNCC_RTP_CREATE,
411 msg_type = MNCC_RTP_CONNECT,
412 msg_type = MNCC_RTP_FREE };
413 data, { msg_type = GSM_TCHF_FRAME,
414 msg_type = GSM_TCHF_FRAME_EFR,
415 msg_type = GSM_TCHH_FRAME,
416 msg_type = GSM_TCH_FRAME_AMR,
417 msg_type = GSM_BAD_FRAME };
418 signal, OTHERWISE
419 )"
420};
421
422external function enc_MNCC_PDU(in MNCC_PDU pdu) return octetstring;
423
424external function dec_MNCC_PDU(in octetstring stream) return MNCC_PDU;
425
Pau Espin Pedrol563b3d02020-09-09 20:19:52 +0200426external function set_MNCC_version(in integer version) return boolean;
427
Harald Welte14509532018-03-24 22:32:01 +0100428template (value) MNCC_PDU ts_MNCC_HELLO(uint32_t version := 5) := {
429 msg_type := MNCC_SOCKET_HELLO,
430 u := {
431 hello := {
432 version := version,
433 mncc_size := 836,
434 data_frame_size := 8,
435 called_offset := 104,
436 signal_offset := 796,
437 emergency_offset := 812,
438 lchan_type_offset := 0
439 }
440 }
441}
Harald Welte474fd7d2017-12-29 16:01:39 +0100442
443template MNCC_PDU ts_MNCC_Sign(MNCC_MsgType msg_type, MNCC_PDU_Signal sign) := {
444 msg_type := msg_type,
445 u := {
446 signal := sign
447 }
448}
449
Harald Welte8b2a2582018-01-16 08:11:42 +0100450template MNCC_PDU ts_MNCC_SIMPLE(MNCC_MsgType msg_type, uint32_t call_id) := {
451 msg_type := msg_type,
Harald Welte474fd7d2017-12-29 16:01:39 +0100452 u := {
453 signal := {
454 callref := call_id,
Harald Welte8b2a2582018-01-16 08:11:42 +0100455 bearer_cap := omit,
456 called := omit,
457 calling := omit,
Harald Welte474fd7d2017-12-29 16:01:39 +0100458 redirecting := omit,
459 connected := omit,
460 cause := omit,
461 progress := omit,
462 useruser := omit,
463 facility := omit,
464 cccap := omit,
465 ssversion := omit,
466 clir_sup := 0,
467 clir_inv := 0,
468 signal := omit,
469 keypad := omit,
470 more := 0,
471 notify := 0,
472 emergency := omit,
Harald Welte8b2a2582018-01-16 08:11:42 +0100473 imsi := "",
474 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100475 lchan_mode := 0,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +0300476 gcr := omit,
Vadim Yanitskiyf3962742021-10-28 16:09:09 +0300477 sdp := omit
Harald Welte8b2a2582018-01-16 08:11:42 +0100478 }
479 }
480}
481
482template MNCC_PDU tr_MNCC_SIMPLE(template MNCC_MsgType msg_type, template uint32_t call_id) := {
483 msg_type := msg_type,
484 u := {
485 signal := {
486 callref := call_id,
487 bearer_cap := omit,
488 called := omit,
489 calling := omit,
490 redirecting := omit,
491 connected := omit,
492 cause := omit,
493 progress := omit,
494 useruser := omit,
495 facility := omit,
496 cccap := omit,
497 ssversion := omit,
498 clir_sup := 0,
499 clir_inv := 0,
500 signal := omit,
501 keypad := omit,
502 more := 0,
503 notify := 0,
504 emergency := *,
505 imsi := ?,
506 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100507 lchan_mode := ?,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +0300508 gcr := *,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100509 sdp := *
Harald Welte8b2a2582018-01-16 08:11:42 +0100510 }
511 }
512}
513
514
515
516/* MT: MSC <- MNCC: SETUP.req from ext. MNCC handler to MSC */
517template MNCC_PDU ts_MNCC_SETUP_req(uint32_t call_id, charstring called, charstring calling, charstring imsi := "") := {
518 msg_type := MNCC_SETUP_REQ,
519 u := {
520 signal := { /* See 24.008 9.3.23.1 */
521 callref := call_id,
522 bearer_cap := ts_MNCC_bcap_voice, /* mandatory */
523 called := valueof(ts_MNCC_number(called)), /* optional */
524 calling := valueof(ts_MNCC_number(calling)), /* optional */
525 redirecting := omit, /* optional */
526 connected := omit,
527 cause := omit,
528 progress := omit, /* optional */
529 useruser := omit, /* optional */
530 facility := omit, /* optional */
531 cccap := omit,
532 ssversion := omit,
533 clir_sup := 0,
534 clir_inv := 0,
535 signal := omit, /* optional */
536 keypad := omit,
537 more := 0,
538 notify := 0,
539 emergency := omit,
540 imsi := imsi,
Harald Welte474fd7d2017-12-29 16:01:39 +0100541 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100542 lchan_mode := 0,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +0300543 gcr := omit,
Vadim Yanitskiyf3962742021-10-28 16:09:09 +0300544 sdp := omit
Harald Welte474fd7d2017-12-29 16:01:39 +0100545 }
546 }
547};
Harald Welteb0d93602018-03-20 18:09:34 +0100548template MNCC_PDU tr_MNCC_SETUP_req(template uint32_t call_id := ?,
549 template charstring called := ?,
550 template charstring calling := *,
551 template charstring imsi := ?) := {
552 msg_type := MNCC_SETUP_REQ,
553 u := {
554 signal := { /* See 24.008 9.3.23.1 */
555 callref := call_id,
556 bearer_cap := *, /* mandatory in CC */
557 called := tr_MNCC_number(called), /* optional */
558 calling := tr_MNCC_number(calling), /* optional */
559 redirecting := *, /* optional */
560 connected := omit,
561 cause := omit,
562 progress := *, /* optional */
563 useruser := *, /* optional */
564 facility := *, /* optional */
565 cccap := omit,
566 ssversion := omit,
567 clir_sup := 0,
568 clir_inv := 0,
569 signal := *, /* optional */
570 keypad := omit,
571 more := 0,
572 notify := 0,
573 emergency := *,
574 imsi := imsi,
575 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100576 lchan_mode := ?,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +0300577 gcr := *,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100578 sdp := *
Harald Welteb0d93602018-03-20 18:09:34 +0100579 }
580 }
581};
582
Harald Welte474fd7d2017-12-29 16:01:39 +0100583
Harald Welte4017d552018-01-26 21:40:05 +0100584/* MO: MSC <- MNCC: Respons to SETUP.ind */
585template MNCC_PDU ts_MNCC_SETUP_rsp(uint32_t call_id, charstring imsi := "",
586 template MNCC_number connected := omit) := {
Harald Welte8b2a2582018-01-16 08:11:42 +0100587 msg_type := MNCC_SETUP_RSP,
588 u := {
589 signal := { /* See 24.008 9.3.5 */
590 callref := call_id,
591 bearer_cap := omit,
592 called := omit,
593 calling := omit,
594 redirecting := omit,
595 connected := connected,
596 cause := omit,
597 progress := omit,
Harald Welte4017d552018-01-26 21:40:05 +0100598 useruser := omit, /* optional */
599 facility := omit, /* optional */
Harald Welte8b2a2582018-01-16 08:11:42 +0100600 cccap := omit,
Harald Welte4017d552018-01-26 21:40:05 +0100601 ssversion := omit, /* optional */
Harald Welte8b2a2582018-01-16 08:11:42 +0100602 clir_sup := 0,
603 clir_inv := 0,
604 signal := omit,
605 keypad := omit,
606 more := 0,
607 notify := 0,
Harald Welte4017d552018-01-26 21:40:05 +0100608 emergency := omit,
Harald Welte8b2a2582018-01-16 08:11:42 +0100609 imsi := imsi,
Harald Welte4017d552018-01-26 21:40:05 +0100610 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100611 lchan_mode := 0,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +0300612 gcr := omit,
Vadim Yanitskiyf3962742021-10-28 16:09:09 +0300613 sdp := omit
Harald Welte8b2a2582018-01-16 08:11:42 +0100614 }
615 }
616};
Harald Welte90938392018-03-25 16:36:40 +0200617template MNCC_PDU tr_MNCC_SETUP_rsp(template uint32_t call_id,
618 template charstring imsi := ?,
619 template MNCC_number connected := *) := {
620 msg_type := MNCC_SETUP_RSP,
621 u := {
622 signal := { /* See 24.008 9.3.5 */
623 callref := call_id,
624 bearer_cap := omit,
625 called := omit,
626 calling := omit,
627 redirecting := omit,
628 connected := connected,
629 cause := omit,
630 progress := omit,
631 useruser := *, /* optional */
632 facility := *, /* optional */
633 cccap := omit,
634 ssversion := *, /* optional */
635 clir_sup := 0,
636 clir_inv := 0,
637 signal := omit,
638 keypad := omit,
639 more := 0,
640 notify := 0,
641 emergency := omit,
642 imsi := imsi,
643 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100644 lchan_mode := ?,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +0300645 gcr := *,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100646 sdp := *
Harald Welte90938392018-03-25 16:36:40 +0200647 }
648 }
649};
650
Harald Welte8b2a2582018-01-16 08:11:42 +0100651
652/* MO: MSC -> MNCC: SETUP.ind from MSC to ext. MNCC handler */
653template MNCC_PDU tr_MNCC_SETUP_ind(template uint32_t call_id := ?, template MNCC_number called := ?,
654 template MNCC_number calling := *, template charstring imsi :=?) := {
655 msg_type := MNCC_SETUP_IND,
656 u := {
657 signal := { /* See 24.008 9.3.23.2 */
658 callref := call_id,
659 bearer_cap := ?, /* mandatory */
660 called := called, /* mandatory */
661 calling := calling, /* optional */
662 redirecting := omit,
663 connected := omit,
664 cause := omit,
665 progress := omit,
666 useruser := *, /* optional */
667 facility := *, /* optional */
668 cccap := *, /* optional */
669 ssversion := *, /* optional */
670 clir_sup := ?, /* optional */
671 clir_inv := ?, /* optional */
672 signal := omit,
673 keypad := omit,
674 more := 0,
675 notify := 0,
676 emergency := *,
677 imsi := imsi,
678 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100679 lchan_mode := ?,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +0300680 gcr := *,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100681 sdp := *
Harald Welte8b2a2582018-01-16 08:11:42 +0100682 }
683 }
Harald Welteafec4712018-03-19 22:52:17 +0100684}
685template (value) MNCC_PDU ts_MNCC_SETUP_ind(uint32_t call_id, MNCC_number called,
686 template (omit) MNCC_number calling := omit,
687 template (omit) charstring imsi := omit,
688 template (value) MNCC_bearer_cap bcap := ts_MNCC_bcap_voice) := {
689 msg_type := MNCC_SETUP_IND,
690 u := {
691 signal := { /* See 24.008 9.3.23.2 */
692 callref := call_id,
693 bearer_cap := valueof(bcap), /* mandatory */
694 called := called, /* mandatory */
695 calling := calling, /* optional */
696 redirecting := omit,
697 connected := omit,
698 cause := omit,
699 progress := omit,
700 useruser := omit, /* optional */
701 facility := omit, /* optional */
702 cccap := omit, /* optional */
703 ssversion := omit, /* optional */
704 clir_sup := 0, /* optional */
705 clir_inv := 0, /* optional */
706 signal := omit,
707 keypad := omit,
708 more := 0,
709 notify := 0,
710 emergency := omit,
711 imsi := imsi,
712 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100713 lchan_mode := 0,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +0300714 gcr := omit,
Vadim Yanitskiyf3962742021-10-28 16:09:09 +0300715 sdp := omit
Harald Welteafec4712018-03-19 22:52:17 +0100716 }
717 }
Harald Welte8b2a2582018-01-16 08:11:42 +0100718}
719
720/* MO: MSC <- MNCC: SETUP.cnf; Response to SETUP.ind */
721template MNCC_PDU ts_MNCC_SETUP_CNF(uint32_t call_id, template MNCC_number connected := omit) := {
722 msg_type := MNCC_SETUP_CNF,
723 u := {
724 signal := { /* See 24.008 9.3.5 */
725 callref := call_id,
726 bearer_cap := omit,
727 called := omit,
728 calling := omit,
729 redirecting := omit,
730 connected := connected,
731 cause := omit,
Harald Welteb0d93602018-03-20 18:09:34 +0100732 progress := omit,
733 useruser := omit,
734 facility := omit,
Harald Welte8b2a2582018-01-16 08:11:42 +0100735 cccap := omit,
736 ssversion := omit,
737 clir_sup := 0,
738 clir_inv := 0,
739 signal := omit,
740 keypad := omit,
741 more := 0,
742 notify := 0,
Harald Welteb0d93602018-03-20 18:09:34 +0100743 emergency := omit,
Harald Welte8b2a2582018-01-16 08:11:42 +0100744 imsi := "",
Harald Welteb0d93602018-03-20 18:09:34 +0100745 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100746 lchan_mode := 0,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +0300747 gcr := omit,
Vadim Yanitskiyf3962742021-10-28 16:09:09 +0300748 sdp := omit
Harald Welte8b2a2582018-01-16 08:11:42 +0100749 }
750 }
751}
752
Harald Welte33ec09b2018-02-10 15:34:46 +0100753/* MT: MSC -> MNCC: SETUP.cnf; Response to SETUP.req */
754template MNCC_PDU tr_MNCC_SETUP_cnf(uint32_t call_id, template MNCC_number connected := *) := {
755 msg_type := MNCC_SETUP_CNF,
756 u := {
757 signal := { /* See 24.008 9.3.5 */
758 callref := call_id,
759 bearer_cap := omit,
760 called := omit,
761 calling := omit,
762 redirecting := omit,
763 connected := connected,
764 cause := omit,
765 progress := *,
766 useruser := *,
767 facility := *,
768 cccap := omit,
769 ssversion := omit,
770 clir_sup := 0,
771 clir_inv := 0,
772 signal := omit,
773 keypad := omit,
774 more := 0,
775 notify := 0,
776 emergency := *,
777 imsi := ?,
778 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100779 lchan_mode := ?,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +0300780 gcr := *,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100781 sdp := *
Harald Welte33ec09b2018-02-10 15:34:46 +0100782 }
783 }
784}
785
Harald Welte4017d552018-01-26 21:40:05 +0100786/* MT: MSC -> MNCC: SETUP_COMPL.req; request to send CONNECT ACK */
787template MNCC_PDU tr_MNCC_SETUP_COMPL_req(template uint32_t call_id) :=
788 tr_MNCC_SIMPLE(MNCC_SETUP_COMPL_REQ, call_id); /* See 24.008 9.3.6 */
Harald Welte8b2a2582018-01-16 08:11:42 +0100789
790/* MT: MSC -> MNCC: SETUP_COMPL.ind; receipt of CONNECT ACK */
791template MNCC_PDU tr_MNCC_SETUP_COMPL_ind(template uint32_t call_id := ?) :=
792 tr_MNCC_SIMPLE(MNCC_SETUP_COMPL_IND, call_id); /* See 24.008 9.3.6 */
Harald Welte90938392018-03-25 16:36:40 +0200793template (value) MNCC_PDU ts_MNCC_SETUP_COMPL_ind(uint32_t call_id) :=
794 ts_MNCC_SIMPLE(MNCC_SETUP_COMPL_IND, call_id); /* See 24.008 9.3.6 */
Harald Welte8b2a2582018-01-16 08:11:42 +0100795
796/* MT: MSC -> MNCC: REJ.req; reject MT call */
797template MNCC_PDU tr_MNCC_REJ_req(template uint32_t call_id, template MNCC_cause cause := *) := {
798 msg_type := MNCC_REJ_REQ,
799 u := {
800 signal := { /* See 24.008 9.3.19 */
801 callref := call_id,
802 bearer_cap := omit,
803 called := omit,
804 calling := omit,
805 redirecting := omit,
806 connected := omit,
807 cause := cause,
808 progress := omit,
809 useruser := *,
810 facility := *,
811 cccap := omit,
812 ssversion := omit,
813 clir_sup := 0,
814 clir_inv := 0,
815 signal := omit,
816 keypad := omit,
817 more := 0,
818 notify := 0,
819 emergency := omit,
820 imsi := ?,
821 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100822 lchan_mode := ?,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +0300823 gcr := *,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100824 sdp := *
Harald Welte8b2a2582018-01-16 08:11:42 +0100825 }
826 }
827}
828
829/* MO: MSC <- MNCC: REJ.ind; reject MO call */
830template MNCC_PDU ts_MNCC_REJ_ind(uint32_t call_id, template MNCC_cause cause := omit) := {
831 msg_type := MNCC_REJ_IND,
832 u := {
833 signal := { /* See 24.008 9.3.19 */
834 callref := call_id,
835 bearer_cap := omit,
836 called := omit,
837 calling := omit,
838 redirecting := omit,
839 connected := omit,
840 cause := cause,
841 progress := omit,
842 useruser := omit,
843 facility := omit,
844 cccap := omit,
845 ssversion := omit,
846 clir_sup := 0,
847 clir_inv := 0,
848 signal := omit,
849 keypad := omit,
850 more := 0,
851 notify := 0,
852 emergency := omit,
853 imsi := "",
854 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100855 lchan_mode := 0,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +0300856 gcr := omit,
Vadim Yanitskiyf3962742021-10-28 16:09:09 +0300857 sdp := omit
Harald Welte8b2a2582018-01-16 08:11:42 +0100858 }
859 }
860}
861
Harald Welte812f7a42018-01-27 00:49:18 +0100862/* MT: MSC -> MNCC: CALL_CONF.req; send CALL CONFIRMED to MS */
863template MNCC_PDU tr_MNCC_CALL_CONF_ind(template uint32_t call_id, template MNCC_bearer_cap bcap := *,
864 template MNCC_cause cause := *,
865 template MNCC_cccap cccap := *) := {
Harald Welte8b2a2582018-01-16 08:11:42 +0100866 msg_type := MNCC_CALL_CONF_IND,
867 u := {
868 signal := { /* See 24.008 9.3.2 */
869 callref := call_id,
870 bearer_cap := bcap,
871 called := omit,
872 calling := omit,
873 redirecting := omit,
874 connected := omit,
875 cause := cause,
876 progress := omit,
877 useruser := omit,
878 facility := omit,
879 cccap := cccap,
880 ssversion := omit,
881 clir_sup := 0,
882 clir_inv := 0,
883 signal := omit,
884 keypad := omit,
885 more := 0,
886 notify := 0,
887 emergency := omit,
Harald Welte812f7a42018-01-27 00:49:18 +0100888 imsi := ?,
889 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100890 lchan_mode := ?,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +0300891 gcr := *,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100892 sdp := *
Harald Welte8b2a2582018-01-16 08:11:42 +0100893 }
894 }
895}
Harald Welteb0d93602018-03-20 18:09:34 +0100896template MNCC_PDU ts_MNCC_CALL_CONF_ind(uint32_t call_id,
897 template (omit) MNCC_bearer_cap bcap := omit,
898 template (omit) MNCC_cause cause := omit,
899 template (omit) MNCC_cccap cccap := omit) := {
900 msg_type := MNCC_CALL_CONF_IND,
901 u := {
902 signal := { /* See 24.008 9.3.2 */
903 callref := call_id,
904 bearer_cap := bcap,
905 called := omit,
906 calling := omit,
907 redirecting := omit,
908 connected := omit,
909 cause := cause,
910 progress := omit,
911 useruser := omit,
912 facility := omit,
913 cccap := cccap,
914 ssversion := omit,
915 clir_sup := 0,
916 clir_inv := 0,
917 signal := omit,
918 keypad := omit,
919 more := 0,
920 notify := 0,
921 emergency := omit,
922 imsi := "",
923 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100924 lchan_mode := 0,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +0300925 gcr := omit,
Vadim Yanitskiyf3962742021-10-28 16:09:09 +0300926 sdp := omit
Harald Welteb0d93602018-03-20 18:09:34 +0100927 }
928 }
929}
930
Harald Welte8b2a2582018-01-16 08:11:42 +0100931
932/* MO: MSC <- MNCC: CALL_PROC.req; call establishment initiated in network */
933template MNCC_PDU ts_MNCC_CALL_PROC_req(uint32_t call_id, template MNCC_bearer_cap bcap := omit,
934 template MNCC_progress prog := omit,
935 template charstring fac := omit,
936 template MNCC_cccap cccap := omit) := {
937 msg_type := MNCC_CALL_PROC_REQ,
938 u := {
939 signal := { /* See 24.008 9.3.2 */
940 callref := call_id,
941 bearer_cap := bcap,
942 called := omit,
943 calling := omit,
944 redirecting := omit,
945 connected := omit,
946 cause := omit,
947 progress := prog,
948 useruser := omit,
949 facility := fac,
950 cccap := cccap,
951 ssversion := omit,
952 clir_sup := 0,
953 clir_inv := 0,
954 signal := omit,
955 keypad := omit,
956 more := 0,
957 notify := 0,
958 emergency := omit,
959 imsi := "",
960 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100961 lchan_mode := 0,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +0300962 gcr := omit,
Vadim Yanitskiyf3962742021-10-28 16:09:09 +0300963 sdp := omit
Harald Welte8b2a2582018-01-16 08:11:42 +0100964 }
965 }
966}
Harald Welte90938392018-03-25 16:36:40 +0200967template MNCC_PDU tr_MNCC_CALL_PROC_req(template uint32_t call_id,
968 template MNCC_bearer_cap bcap := *,
969 template MNCC_progress prog := *,
970 template charstring fac := *,
971 template MNCC_cccap cccap := *) := {
972 msg_type := MNCC_CALL_PROC_REQ,
973 u := {
974 signal := { /* See 24.008 9.3.2 */
975 callref := call_id,
976 bearer_cap := bcap,
977 called := omit,
978 calling := omit,
979 redirecting := omit,
980 connected := omit,
981 cause := omit,
982 progress := prog,
983 useruser := omit,
984 facility := fac,
985 cccap := cccap,
986 ssversion := omit,
987 clir_sup := 0,
988 clir_inv := 0,
989 signal := omit,
990 keypad := omit,
991 more := 0,
992 notify := 0,
993 emergency := omit,
994 imsi := ?,
995 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100996 lchan_mode := ?,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +0300997 gcr := *,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100998 sdp := *
Harald Welte90938392018-03-25 16:36:40 +0200999 }
1000 }
1001}
1002
Harald Welte8b2a2582018-01-16 08:11:42 +01001003
1004/* MSC <- MNCC: PROGRESS.req; PROGRESS message from ISDN */
1005template MNCC_PDU ts_MNCC_PROGRESS_req(uint32_t call_id, MNCC_progress prog,
1006 template MNCC_useruser uu := omit) := {
1007 msg_type := MNCC_PROGRESS_REQ,
1008 u := {
1009 signal := { /* See 24.008 9.3.17 */
1010 callref := call_id,
1011 bearer_cap := omit,
1012 called := omit,
1013 calling := omit,
1014 redirecting := omit,
1015 connected := omit,
1016 cause := omit,
1017 progress := prog,
1018 useruser := uu,
1019 facility := omit,
1020 cccap := omit,
1021 ssversion := omit,
1022 clir_sup := 0,
1023 clir_inv := 0,
1024 signal := omit,
1025 keypad := omit,
1026 more := 0,
1027 notify := 0,
1028 emergency := omit,
1029 imsi := "",
1030 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001031 lchan_mode := 0,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001032 gcr := omit,
Vadim Yanitskiyf3962742021-10-28 16:09:09 +03001033 sdp := omit
Harald Welte8b2a2582018-01-16 08:11:42 +01001034 }
1035 }
1036}
1037
1038/* MO: MSC <- MNCC: ALERT.req; indicate that user alerting has been initiated */
1039template MNCC_PDU ts_MNCC_ALERT_req(uint32_t call_id, template MNCC_progress prog := omit,
1040 template charstring fac := omit,
1041 template MNCC_useruser uu := omit) := {
1042 msg_type := MNCC_ALERT_REQ,
1043 u := {
1044 signal := { /* See 24.008 9.3.1 */
1045 callref := call_id,
1046 bearer_cap := omit,
1047 called := omit,
1048 calling := omit,
1049 redirecting := omit,
1050 connected := omit,
1051 cause := omit,
1052 progress := prog,
1053 useruser := uu,
1054 facility := fac,
1055 cccap := omit,
1056 ssversion := omit,
1057 clir_sup := 0,
1058 clir_inv := 0,
1059 signal := omit,
1060 keypad := omit,
1061 more := 0,
1062 notify := 0,
1063 emergency := omit,
1064 imsi := "",
1065 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001066 lchan_mode := 0,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001067 gcr := omit,
Vadim Yanitskiyf3962742021-10-28 16:09:09 +03001068 sdp := omit
Harald Welte8b2a2582018-01-16 08:11:42 +01001069 }
1070 }
1071}
Harald Welte90938392018-03-25 16:36:40 +02001072template MNCC_PDU tr_MNCC_ALERT_req(template uint32_t call_id,
1073 template MNCC_progress prog := *,
1074 template charstring fac := *,
1075 template MNCC_useruser uu := *) := {
1076 msg_type := MNCC_ALERT_REQ,
1077 u := {
1078 signal := { /* See 24.008 9.3.1 */
1079 callref := call_id,
1080 bearer_cap := omit,
1081 called := omit,
1082 calling := omit,
1083 redirecting := omit,
1084 connected := omit,
1085 cause := omit,
1086 progress := prog,
1087 useruser := uu,
1088 facility := fac,
1089 cccap := omit,
1090 ssversion := omit,
1091 clir_sup := 0,
1092 clir_inv := 0,
1093 signal := omit,
1094 keypad := omit,
1095 more := 0,
1096 notify := 0,
1097 emergency := omit,
1098 imsi := ?,
1099 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001100 lchan_mode := ?,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001101 gcr := *,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001102 sdp := *
Harald Welte90938392018-03-25 16:36:40 +02001103 }
1104 }
1105}
1106
Harald Welte8b2a2582018-01-16 08:11:42 +01001107
1108
1109/* MT: MSC -> MNCC: ALERRT.ind; indicates that mobile user alerting has been initiated */
1110template MNCC_PDU tr_MNCC_ALERT_ind(template uint32_t call_id, template MNCC_progress prog := omit,
1111 template charstring fac := omit,
1112 template MNCC_useruser uu := omit) := {
Harald Welte33ec09b2018-02-10 15:34:46 +01001113 msg_type := MNCC_ALERT_IND,
Harald Welte8b2a2582018-01-16 08:11:42 +01001114 u := {
1115 signal := { /* See 24.008 9.3.1 */
1116 callref := call_id,
1117 bearer_cap := omit,
1118 called := omit,
1119 calling := omit,
1120 redirecting := omit,
1121 connected := omit,
1122 cause := omit,
1123 progress := prog,
1124 useruser := uu,
1125 facility := fac,
1126 cccap := omit,
1127 ssversion := omit,
1128 clir_sup := 0,
1129 clir_inv := 0,
1130 signal := omit,
1131 keypad := omit,
1132 more := 0,
1133 notify := 0,
1134 emergency := *,
1135 imsi := ?,
1136 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001137 lchan_mode := ?,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001138 gcr := *,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001139 sdp := *
Harald Welte8b2a2582018-01-16 08:11:42 +01001140 }
1141 }
1142}
Harald Welteb0d93602018-03-20 18:09:34 +01001143template (value) MNCC_PDU ts_MNCC_ALERT_ind(uint32_t call_id,
1144 template (omit) MNCC_progress prog := omit,
1145 template (omit) charstring fac := omit,
1146 template (omit) MNCC_useruser uu := omit) := {
1147 msg_type := MNCC_ALERT_IND,
1148 u := {
1149 signal := { /* See 24.008 9.3.1 */
1150 callref := call_id,
1151 bearer_cap := omit,
1152 called := omit,
1153 calling := omit,
1154 redirecting := omit,
1155 connected := omit,
1156 cause := omit,
1157 progress := prog,
1158 useruser := uu,
1159 facility := fac,
1160 cccap := omit,
1161 ssversion := omit,
1162 clir_sup := 0,
1163 clir_inv := 0,
1164 signal := omit,
1165 keypad := omit,
1166 more := 0,
1167 notify := 0,
1168 emergency := omit,
1169 imsi := "",
1170 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001171 lchan_mode := 0,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001172 gcr := omit,
Vadim Yanitskiyf3962742021-10-28 16:09:09 +03001173 sdp := omit
Harald Welteb0d93602018-03-20 18:09:34 +01001174 }
1175 }
1176}
1177
Harald Welte8b2a2582018-01-16 08:11:42 +01001178
1179/* : MSC <- MNCC: NOTIFY.req; request to send information pertaining to a call (such as user suspended) */
1180template MNCC_PDU ts_MNCC_NOTIFY_req(uint32_t call_id, MNCC_notify notify) := {
1181 msg_type := MNCC_NOTIFY_REQ,
1182 u := {
1183 signal := { /* See 24.008 9.3.16 */
1184 callref := call_id,
1185 bearer_cap := omit,
1186 called := omit,
1187 calling := omit,
1188 redirecting := omit,
1189 connected := omit,
1190 cause := omit,
1191 progress := omit,
1192 useruser := omit,
1193 facility := omit,
1194 cccap := omit,
1195 ssversion := omit,
1196 clir_sup := 0,
1197 clir_inv := 0,
1198 signal := omit,
1199 keypad := omit,
1200 more := 0,
1201 notify := notify,
1202 emergency := omit,
1203 imsi := "",
1204 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001205 lchan_mode := 0,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001206 gcr := omit,
Vadim Yanitskiyf3962742021-10-28 16:09:09 +03001207 sdp := omit
Harald Welte8b2a2582018-01-16 08:11:42 +01001208 }
1209 }
1210}
1211
1212/* : MSC -> MNCC: NOTIFY.ind; indication to the mobile user */
1213template MNCC_PDU tr_MNCC_NOTIFY_ind(template uint32_t call_id, template MNCC_notify notify) := {
1214 msg_type := MNCC_NOTIFY_IND,
1215 u := {
1216 signal := { /* See 24.008 9.3.16 */
1217 callref := call_id,
1218 bearer_cap := omit,
1219 called := omit,
1220 calling := omit,
1221 redirecting := omit,
1222 connected := omit,
1223 cause := omit,
1224 progress := omit,
1225 useruser := omit,
1226 facility := omit,
1227 cccap := omit,
1228 ssversion := omit,
1229 clir_sup := 0,
1230 clir_inv := 0,
1231 signal := omit,
1232 keypad := omit,
1233 more := 0,
1234 notify := notify,
1235 emergency := *,
1236 imsi := ?,
1237 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001238 lchan_mode := ?,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001239 gcr := *,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001240 sdp := *
Harald Welte8b2a2582018-01-16 08:11:42 +01001241 }
1242 }
1243}
1244
1245/* : MSC -> MNCC: DISC.ind; mobile user requests disconnect */
1246template MNCC_PDU tr_MNCC_DISC_ind(template uint32_t call_id := ?, template MNCC_cause cause := ?,
1247 template MNCC_progress prog := *,
1248 template charstring fac := *,
1249 template MNCC_useruser uu := *) := {
1250 msg_type := MNCC_DISC_IND,
1251 u := {
1252 signal := { /* See 24.008 9.3.7 */
1253 callref := call_id,
1254 bearer_cap := omit,
1255 called := omit,
1256 calling := omit,
1257 redirecting := omit,
1258 connected := omit,
1259 cause := cause,
1260 progress := prog,
1261 useruser := uu,
1262 facility := fac,
1263 cccap := omit,
1264 ssversion := omit,
1265 clir_sup := 0,
1266 clir_inv := 0,
1267 signal := omit,
1268 keypad := omit,
1269 more := 0,
1270 notify := 0,
1271 emergency := *,
1272 imsi := ?,
1273 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001274 lchan_mode := ?,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001275 gcr := *,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001276 sdp := *
Harald Welte8b2a2582018-01-16 08:11:42 +01001277 }
1278 }
1279}
Harald Welte90938392018-03-25 16:36:40 +02001280template (value) MNCC_PDU ts_MNCC_DISC_ind(uint32_t call_id, template (value) MNCC_cause cause,
1281 template (omit) MNCC_progress prog := omit,
1282 template (omit) charstring fac := omit,
1283 template (omit) MNCC_useruser uu := omit) := {
1284 msg_type := MNCC_DISC_IND,
1285 u := {
1286 signal := { /* See 24.008 9.3.7 */
1287 callref := call_id,
1288 bearer_cap := omit,
1289 called := omit,
1290 calling := omit,
1291 redirecting := omit,
1292 connected := omit,
1293 cause := cause,
1294 progress := prog,
1295 useruser := uu,
1296 facility := fac,
1297 cccap := omit,
1298 ssversion := omit,
1299 clir_sup := 0,
1300 clir_inv := 0,
1301 signal := omit,
1302 keypad := omit,
1303 more := 0,
1304 notify := 0,
1305 emergency := omit,
1306 imsi := "",
1307 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001308 lchan_mode := 0,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001309 gcr := omit,
Vadim Yanitskiyf3962742021-10-28 16:09:09 +03001310 sdp := omit
Harald Welte90938392018-03-25 16:36:40 +02001311 }
1312 }
1313}
Harald Welte8b2a2582018-01-16 08:11:42 +01001314
1315/* : MSC <- MNCC: DISC.req; indicate disconnect to mobile user */
1316template MNCC_PDU ts_MNCC_DISC_req(uint32_t call_id, MNCC_cause cause,
1317 template MNCC_progress prog := omit,
1318 template charstring fac := omit,
1319 template MNCC_useruser uu := omit) := {
1320 msg_type := MNCC_DISC_REQ,
1321 u := {
1322 signal := { /* See 24.008 9.3.7 */
1323 callref := call_id,
1324 bearer_cap := omit,
1325 called := omit,
1326 calling := omit,
1327 redirecting := omit,
1328 connected := omit,
1329 cause := cause,
1330 progress := prog,
1331 useruser := uu,
1332 facility := fac,
1333 cccap := omit,
1334 ssversion := omit,
1335 clir_sup := 0,
1336 clir_inv := 0,
1337 signal := omit,
1338 keypad := omit,
1339 more := 0,
1340 notify := 0,
1341 emergency := omit,
1342 imsi := "",
1343 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001344 lchan_mode := 0,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001345 gcr := omit,
Vadim Yanitskiyf3962742021-10-28 16:09:09 +03001346 sdp := omit
Harald Welte8b2a2582018-01-16 08:11:42 +01001347 }
1348 }
1349}
Harald Welte90938392018-03-25 16:36:40 +02001350template MNCC_PDU tr_MNCC_DISC_req(template uint32_t call_id,
1351 template MNCC_cause cause := *,
1352 template MNCC_progress prog := omit,
1353 template charstring fac := omit,
1354 template MNCC_useruser uu := omit) := {
1355 msg_type := MNCC_DISC_REQ,
1356 u := {
1357 signal := { /* See 24.008 9.3.7 */
1358 callref := call_id,
1359 bearer_cap := omit,
1360 called := omit,
1361 calling := omit,
1362 redirecting := omit,
1363 connected := omit,
1364 cause := cause,
1365 progress := prog,
1366 useruser := uu,
1367 facility := fac,
1368 cccap := omit,
1369 ssversion := omit,
1370 clir_sup := 0,
1371 clir_inv := 0,
1372 signal := omit,
1373 keypad := omit,
1374 more := 0,
1375 notify := 0,
1376 emergency := *,
1377 imsi := ?,
1378 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001379 lchan_mode := ?,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001380 gcr := *,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001381 sdp := *
Harald Welte90938392018-03-25 16:36:40 +02001382 }
1383 }
1384}
1385
Harald Welte8b2a2582018-01-16 08:11:42 +01001386
1387/* : MSC -> MNCC: REL.ind; mobile user informs network that user wants to release call + MM */
1388template MNCC_PDU tr_MNCC_REL_ind(template uint32_t call_id := ?, template MNCC_cause cause := ?,
1389 template charstring fac := *, template MNCC_useruser uu := *) := {
1390 msg_type := MNCC_REL_IND,
1391 u := {
1392 signal := { /* See 24.008 9.3.18 */
1393 callref := call_id,
1394 bearer_cap := omit,
1395 called := omit,
1396 calling := omit,
1397 redirecting := omit,
1398 connected := omit,
1399 cause := cause,
1400 progress := omit,
1401 useruser := uu,
1402 facility := fac,
1403 cccap := omit,
1404 ssversion := omit,
1405 clir_sup := 0,
1406 clir_inv := 0,
1407 signal := omit,
1408 keypad := omit,
1409 more := 0,
1410 notify := 0,
1411 emergency := *,
1412 imsi := ?,
1413 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001414 lchan_mode := ?,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001415 gcr := *,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001416 sdp := *
Harald Welte8b2a2582018-01-16 08:11:42 +01001417 }
1418 }
1419}
Harald Welte90938392018-03-25 16:36:40 +02001420template (value) MNCC_PDU ts_MNCC_REL_ind(uint32_t call_id,
1421 template (value) MNCC_cause cause,
1422 template (omit) charstring fac := omit,
1423 template (omit) MNCC_useruser uu := omit) := {
1424 msg_type := MNCC_REL_IND,
1425 u := {
1426 signal := { /* See 24.008 9.3.18 */
1427 callref := call_id,
1428 bearer_cap := omit,
1429 called := omit,
1430 calling := omit,
1431 redirecting := omit,
1432 connected := omit,
1433 cause := cause,
1434 progress := omit,
1435 useruser := uu,
1436 facility := fac,
1437 cccap := omit,
1438 ssversion := omit,
1439 clir_sup := 0,
1440 clir_inv := 0,
1441 signal := omit,
1442 keypad := omit,
1443 more := 0,
1444 notify := 0,
1445 emergency := omit,
1446 imsi := "",
1447 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001448 lchan_mode := 0,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001449 gcr := omit,
Vadim Yanitskiyf3962742021-10-28 16:09:09 +03001450 sdp := omit
Harald Welte90938392018-03-25 16:36:40 +02001451 }
1452 }
1453}
Harald Welte8b2a2582018-01-16 08:11:42 +01001454
1455/* : MSC <- MNCC: REL.req; indicate to mobile user tat network intents to release MM */
1456template MNCC_PDU ts_MNCC_REL_req(uint32_t call_id, MNCC_cause cause,
1457 template charstring fac := omit, template MNCC_useruser uu := omit) := {
1458 msg_type := MNCC_REL_REQ,
1459 u := {
1460 signal := { /* See 24.008 9.3.18 */
1461 callref := call_id,
1462 bearer_cap := omit,
1463 called := omit,
1464 calling := omit,
1465 redirecting := omit,
1466 connected := omit,
1467 cause := cause,
1468 progress := omit,
1469 useruser := uu,
1470 facility := fac,
1471 cccap := omit,
1472 ssversion := omit,
1473 clir_sup := 0,
1474 clir_inv := 0,
1475 signal := omit,
1476 keypad := omit,
1477 more := 0,
1478 notify := 0,
1479 emergency := omit,
1480 imsi := "",
1481 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001482 lchan_mode := 0,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001483 gcr := omit,
Vadim Yanitskiyf3962742021-10-28 16:09:09 +03001484 sdp := omit
Harald Welte8b2a2582018-01-16 08:11:42 +01001485 }
1486 }
1487}
Harald Welte90938392018-03-25 16:36:40 +02001488template MNCC_PDU tr_MNCC_REL_req(template uint32_t call_id, template MNCC_cause cause := *,
1489 template charstring fac := *, template MNCC_useruser uu := *) := {
1490 msg_type := MNCC_REL_REQ,
1491 u := {
1492 signal := { /* See 24.008 9.3.18 */
1493 callref := call_id,
1494 bearer_cap := omit,
1495 called := *,
1496 calling := *,
1497 redirecting := *,
1498 connected := *,
1499 cause := cause,
1500 progress := omit,
1501 useruser := uu,
1502 facility := fac,
1503 cccap := omit,
1504 ssversion := omit,
1505 clir_sup := 0,
1506 clir_inv := 0,
1507 signal := omit,
1508 keypad := omit,
1509 more := 0,
1510 notify := 0,
1511 emergency := omit,
1512 imsi := ?,
1513 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001514 lchan_mode := 0,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001515 gcr := *,
Oliver Smith81a25462019-11-28 13:40:37 +01001516 sdp := *
Harald Welte90938392018-03-25 16:36:40 +02001517 }
1518 }
1519}
1520
Harald Welte8b2a2582018-01-16 08:11:42 +01001521
1522/* : MSC -> MNCC: REL.cnf; confirm REL_req */
1523template MNCC_PDU tr_MNCC_REL_cnf(template uint32_t call_id := ?, template MNCC_cause cause := ?,
1524 template charstring fac := *, template MNCC_useruser uu := *)
1525modifies tr_MNCC_REL_ind := {
1526 msg_type := MNCC_REL_CNF
1527};
Harald Welte90938392018-03-25 16:36:40 +02001528template (value) MNCC_PDU ts_MNCC_REL_cnf(uint32_t call_id,
1529 template (value) MNCC_cause cause,
1530 template (omit) charstring fac := omit,
1531 template (omit) MNCC_useruser uu := omit)
1532modifies ts_MNCC_REL_ind := {
1533 msg_type := MNCC_REL_CNF
1534};
1535
Harald Welte8b2a2582018-01-16 08:11:42 +01001536
1537/* : MSC <- MNCC: FACILITY.req; request transmission of facility */
1538template MNCC_PDU ts_MNCC_FACILITY_req(uint32_t call_id, charstring fac) := {
1539 msg_type := MNCC_FACILITY_REQ,
1540 u := {
1541 signal := { /* See 24.008 9.3.9 */
1542 callref := call_id,
1543 bearer_cap := omit,
1544 called := omit,
1545 calling := omit,
1546 redirecting := omit,
1547 connected := omit,
1548 cause := omit,
1549 progress := omit,
1550 useruser := omit,
1551 facility := fac,
1552 cccap := omit,
1553 ssversion := omit,
1554 clir_sup := 0,
1555 clir_inv := 0,
1556 signal := omit,
1557 keypad := omit,
1558 more := 0,
1559 notify := 0,
1560 emergency := omit,
1561 imsi := "",
1562 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001563 lchan_mode := 0,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001564 gcr := omit,
Vadim Yanitskiyf3962742021-10-28 16:09:09 +03001565 sdp := omit
Harald Welte8b2a2582018-01-16 08:11:42 +01001566 }
1567 }
1568}
1569
1570/* : MSC -> MNCC: FACILITY.req; indicate reception of facility */
1571template MNCC_PDU tr_MNCC_FACILITY_ind(template uint32_t call_id := ?, template charstring fac := ?) := {
1572 msg_type := MNCC_FACILITY_IND,
1573 u := {
1574 signal := { /* See 24.008 9.3.9 */
1575 callref := call_id,
1576 bearer_cap := omit,
1577 called := omit,
1578 calling := omit,
1579 redirecting := omit,
1580 connected := omit,
1581 cause := omit,
1582 progress := omit,
1583 useruser := omit,
1584 facility := fac,
1585 cccap := omit,
1586 ssversion := omit,
1587 clir_sup := 0,
1588 clir_inv := 0,
1589 signal := omit,
1590 keypad := omit,
1591 more := 0,
1592 notify := 0,
1593 emergency := *,
1594 imsi := ?,
1595 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001596 lchan_mode := ?,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001597 gcr := *,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001598 sdp := *
Harald Welte8b2a2582018-01-16 08:11:42 +01001599 }
1600 }
1601}
1602
1603/* : MSC -> MNCC: START_DTMF.ind; MS has */
1604template MNCC_PDU tr_MNCC_START_DTMF_ind(template uint32_t call_id := ?, template MNCC_keypad keypad := ?) := {
1605 msg_type := MNCC_START_DTMF_IND,
1606 u := {
1607 signal := { /* See 24.008 9.3.24 */
1608 callref := call_id,
1609 bearer_cap := omit,
1610 called := omit,
1611 calling := omit,
1612 redirecting := omit,
1613 connected := omit,
1614 cause := omit,
1615 progress := omit,
1616 useruser := omit,
1617 facility := omit,
1618 cccap := omit,
1619 ssversion := omit,
1620 clir_sup := 0,
1621 clir_inv := 0,
1622 signal := omit,
1623 keypad := keypad,
1624 more := 0,
1625 notify := 0,
1626 emergency := *,
1627 imsi := ?,
1628 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001629 lchan_mode := ?,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001630 gcr := *,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001631 sdp := *
Harald Welte8b2a2582018-01-16 08:11:42 +01001632 }
1633 }
1634}
1635
1636/* : MSC <- MNCC: START_DTMF.rsp; Acknowledge start of DTMF */
1637template MNCC_PDU ts_MNCC_START_DTMF_rsp(uint32_t call_id, MNCC_keypad keypad) := {
1638 msg_type := MNCC_START_DTMF_RSP,
1639 u := {
1640 signal := { /* See 24.008 9.3.25 */
1641 callref := call_id,
1642 bearer_cap := omit,
1643 called := omit,
1644 calling := omit,
1645 redirecting := omit,
1646 connected := omit,
1647 cause := omit,
1648 progress := omit,
1649 useruser := omit,
1650 facility := omit,
1651 cccap := omit,
1652 ssversion := omit,
1653 clir_sup := 0,
1654 clir_inv := 0,
1655 signal := omit,
1656 keypad := keypad,
1657 more := 0,
1658 notify := 0,
1659 emergency := omit,
1660 imsi := "",
1661 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001662 lchan_mode := 0,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001663 gcr := omit,
Vadim Yanitskiyf3962742021-10-28 16:09:09 +03001664 sdp := omit
Harald Welte8b2a2582018-01-16 08:11:42 +01001665 }
1666 }
1667}
1668
1669/* : MSC <- MNCC: START_DTMF.rsp; Acknowledge start of DTMF */
1670template MNCC_PDU ts_MNCC_START_DTMF_rej(uint32_t call_id, MNCC_cause cause) := {
1671 msg_type := MNCC_START_DTMF_REJ,
1672 u := {
1673 signal := { /* See 24.008 9.3.26 */
1674 callref := call_id,
1675 bearer_cap := omit,
1676 called := omit,
1677 calling := omit,
1678 redirecting := omit,
1679 connected := omit,
1680 cause := cause,
1681 progress := omit,
1682 useruser := omit,
1683 facility := omit,
1684 cccap := omit,
1685 ssversion := omit,
1686 clir_sup := 0,
1687 clir_inv := 0,
1688 signal := omit,
1689 keypad := omit,
1690 more := 0,
1691 notify := 0,
1692 emergency := omit,
1693 imsi := "",
1694 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001695 lchan_mode := 0,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001696 gcr := omit,
Vadim Yanitskiyf3962742021-10-28 16:09:09 +03001697 sdp := omit
Harald Welte8b2a2582018-01-16 08:11:42 +01001698 }
1699 }
1700}
1701
1702/* : MSC -> MNCC: STOP_DTMF.ind */
1703template MNCC_PDU tr_MNCC_STOP_DTMF_ind(template uint32_t call_id := ?) :=
1704 tr_MNCC_SIMPLE(MNCC_STOP_DTMF_IND, call_id); /* See 24.008 9.3.29 */
1705
1706/* : MSC <- MNCC: STOP_DTMF.rsp; Acknowledge stop of DTMF */
1707template MNCC_PDU ts_MNCC_STOP_DTMF_rsp(uint32_t call_id) :=
1708 ts_MNCC_SIMPLE(MNCC_STOP_DTMF_RSP, call_id); /* See 24.008 9.3.30 */
1709
1710/* : MSC -> MNCC: MODIFY.ind; request to start MO in-call modification */
1711template MNCC_PDU tr_MNCC_MODIFY_ind(template uint32_t call_id := ?, template MNCC_bearer_cap bcap := ?) := {
1712 msg_type := MNCC_MODIFY_IND,
1713 u := {
1714 signal := { /* See 24.008 9.3.14 */
1715 callref := call_id,
1716 bearer_cap := bcap,
1717 called := omit,
1718 calling := omit,
1719 redirecting := omit,
1720 connected := omit,
1721 cause := omit,
1722 progress := omit,
1723 useruser := omit,
1724 facility := omit,
1725 cccap := omit,
1726 ssversion := omit,
1727 clir_sup := 0,
1728 clir_inv := 0,
1729 signal := omit,
1730 keypad := omit,
1731 more := 0,
1732 notify := 0,
1733 emergency := *,
1734 imsi := ?,
1735 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001736 lchan_mode := ?,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001737 gcr := *,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001738 sdp := *
Harald Welte8b2a2582018-01-16 08:11:42 +01001739 }
1740 }
1741}
1742
1743/* : MSC <- MNCC: MODIFY.rsp; tespond to MO in-call modification */
1744template MNCC_PDU ts_MNCC_MODIFY_rsp(uint32_t call_id, MNCC_bearer_cap bcap) := {
1745 msg_type := MNCC_MODIFY_RSP,
1746 u := {
1747 signal := { /* See 24.008 9.3.14 */
1748 callref := call_id,
1749 bearer_cap := bcap,
1750 called := omit,
1751 calling := omit,
1752 redirecting := omit,
1753 connected := omit,
1754 cause := omit,
1755 progress := omit,
1756 useruser := omit,
1757 facility := omit,
1758 cccap := omit,
1759 ssversion := omit,
1760 clir_sup := 0,
1761 clir_inv := 0,
1762 signal := omit,
1763 keypad := omit,
1764 more := 0,
1765 notify := 0,
1766 emergency := omit,
1767 imsi := "",
1768 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001769 lchan_mode := 0,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001770 gcr := omit,
Vadim Yanitskiyf3962742021-10-28 16:09:09 +03001771 sdp := omit
Harald Welte8b2a2582018-01-16 08:11:42 +01001772 }
1773 }
1774}
1775
1776/* : MSC <- MNCC: MODIFY.req; request to start MT in-call modification */
1777template MNCC_PDU ts_MNCC_MODIFY_req(uint32_t call_id, MNCC_bearer_cap bcap) := {
1778 msg_type := MNCC_MODIFY_REQ,
1779 u := {
1780 signal := { /* See 24.008 9.3.14 */
1781 callref := call_id,
1782 bearer_cap := bcap,
1783 called := omit,
1784 calling := omit,
1785 redirecting := omit,
1786 connected := omit,
1787 cause := omit,
1788 progress := omit,
1789 useruser := omit,
1790 facility := omit,
1791 cccap := omit,
1792 ssversion := omit,
1793 clir_sup := 0,
1794 clir_inv := 0,
1795 signal := omit,
1796 keypad := omit,
1797 more := 0,
1798 notify := 0,
1799 emergency := omit,
1800 imsi := "",
1801 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001802 lchan_mode := 0,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001803 gcr := omit,
Vadim Yanitskiyf3962742021-10-28 16:09:09 +03001804 sdp := omit
Harald Welte8b2a2582018-01-16 08:11:42 +01001805 }
1806 }
1807}
1808
1809/* : MSC -> MNCC: MODIFY.cnf; MS has responded to MT in-call modification */
1810template MNCC_PDU tr_MNCC_MODIFY_cnf(template uint32_t call_id := ?,
1811 template MNCC_bearer_cap bcap := ?) := {
1812 msg_type := MNCC_MODIFY_CNF,
1813 u := {
1814 signal := { /* See 24.008 9.3.14 */
1815 callref := call_id,
1816 bearer_cap := bcap,
1817 called := omit,
1818 calling := omit,
1819 redirecting := omit,
1820 connected := omit,
1821 cause := omit,
1822 progress := omit,
1823 useruser := omit,
1824 facility := omit,
1825 cccap := omit,
1826 ssversion := omit,
1827 clir_sup := 0,
1828 clir_inv := 0,
1829 signal := omit,
1830 keypad := omit,
1831 more := 0,
1832 notify := 0,
1833 emergency := *,
1834 imsi := ?,
1835 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001836 lchan_mode := ?,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001837 gcr := *,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001838 sdp := *
Harald Welte8b2a2582018-01-16 08:11:42 +01001839 }
1840 }
1841}
1842
1843/* : MSC <- MNCC: Request transmission of USERINFO to MS */
1844template MNCC_PDU ts_MNCC_USERINFO_req(uint32_t call_id, MNCC_useruser uu, integer more) := {
1845 msg_type := MNCC_USERINFO_REQ,
1846 u := {
1847 signal := { /* See 24.008 9.3.31 */
1848 callref := call_id,
1849 bearer_cap := omit,
1850 called := omit,
1851 calling := omit,
1852 redirecting := omit,
1853 connected := omit,
1854 cause := omit,
1855 progress := omit,
1856 useruser := uu,
1857 facility := omit,
1858 cccap := omit,
1859 ssversion := omit,
1860 clir_sup := 0,
1861 clir_inv := 0,
1862 signal := omit,
1863 keypad := omit,
1864 more := more,
1865 notify := 0,
1866 emergency := omit,
1867 imsi := "",
1868 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001869 lchan_mode := 0,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001870 gcr := omit,
Vadim Yanitskiyf3962742021-10-28 16:09:09 +03001871 sdp := omit
Harald Welte8b2a2582018-01-16 08:11:42 +01001872 }
1873 }
1874}
1875
1876/* : MSC -> MNCC: Indicate reception of USERINFO from MS */
1877template MNCC_PDU tr_MNCC_USERINFO_ind(template uint32_t call_id := ?, template MNCC_useruser uu := ?,
1878 integer more) := {
1879 msg_type := MNCC_USERINFO_IND,
1880 u := {
1881 signal := { /* See 24.008 9.3.31 */
1882 callref := call_id,
1883 bearer_cap := omit,
1884 called := omit,
1885 calling := omit,
1886 redirecting := omit,
1887 connected := omit,
1888 cause := omit,
1889 progress := omit,
1890 useruser := uu,
1891 facility := omit,
1892 cccap := omit,
1893 ssversion := omit,
1894 clir_sup := 0,
1895 clir_inv := 0,
1896 signal := omit,
1897 keypad := omit,
1898 more := more,
1899 notify := 0,
1900 emergency := omit,
1901 imsi := "",
1902 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001903 lchan_mode := 0,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001904 gcr := *,
Oliver Smith81a25462019-11-28 13:40:37 +01001905 sdp := *
Harald Welte8b2a2582018-01-16 08:11:42 +01001906 }
1907 }
1908}
1909
1910/* : MSC -> MNCC: HOLD.ind; MS requests hold of call */
1911template MNCC_PDU tr_MNCC_HOLD_ind(template uint32_t call_id := ?) :=
1912 tr_MNCC_SIMPLE(MNCC_HOLD_IND, call_id); /* See 24.008 9.3.10 */
1913
1914/* : MSC <- MNCC: HOLD.cnf; network confirms hold of call */
1915template MNCC_PDU ts_MNCC_HOLD_cnf(uint32_t call_id) :=
1916 ts_MNCC_SIMPLE(MNCC_HOLD_CNF, call_id); /* See 24.008 9.3.11 */
1917
1918/* : MSC <- MNCC: HOLD.rej; network rejects hold of call */
1919template MNCC_PDU ts_MNCC_HOLD_rej(uint32_t call_id, MNCC_cause cause) := {
1920 msg_type := MNCC_HOLD_REJ,
1921 u := {
1922 signal := { /* See 24.008 9.3.12 */
1923 callref := call_id,
1924 bearer_cap := omit,
1925 called := omit,
1926 calling := omit,
1927 redirecting := omit,
1928 connected := omit,
1929 cause := cause,
1930 progress := omit,
1931 useruser := omit,
1932 facility := omit,
1933 cccap := omit,
1934 ssversion := omit,
1935 clir_sup := 0,
1936 clir_inv := 0,
1937 signal := omit,
1938 keypad := omit,
1939 more := 0,
1940 notify := 0,
1941 emergency := omit,
1942 imsi := "",
1943 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001944 lchan_mode := 0,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001945 gcr := omit,
Vadim Yanitskiyf3962742021-10-28 16:09:09 +03001946 sdp := omit
Harald Welte8b2a2582018-01-16 08:11:42 +01001947 }
1948 }
1949}
1950
1951/* : MSC -> MNCC: RETRIEVE.ind; MS requests retrieval of held call */
1952template MNCC_PDU tr_MNCC_RETRIEVE_ind(template uint32_t call_id := ?) :=
1953 tr_MNCC_SIMPLE(MNCC_RETRIEVE_IND, call_id); /* See 24.008 9.3.20 */
1954
1955/* : MSC <- MNCC: RETRIEVE.cnf; network confirms retrieve of call */
1956template MNCC_PDU ts_MNCC_RETRIEVE_cnf(uint32_t call_id) :=
1957 ts_MNCC_SIMPLE(MNCC_RETRIEVE_CNF, call_id); /* See 24.008 9.3.21 */
1958
1959/* : MSC <- MNCC: RETRIEVE.rej; network rejects retrieve of call */
1960template MNCC_PDU ts_MNCC_RETRIEVE_rej(uint32_t call_id, MNCC_cause cause)
1961modifies ts_MNCC_HOLD_rej := { /* See 24.008 9.3.22 */
1962 msg_type := MNCC_RETRIEVE_REJ
1963}
1964
1965
1966template MNCC_PDU ts_MNCC_SIMPLE_RTP(MNCC_MsgType msg_type, uint32_t call_id) := {
1967 msg_type := msg_type,
1968 u := {
1969 rtp := {
1970 callref := call_id,
Pau Espin Pedrol563b3d02020-09-09 20:19:52 +02001971 is_ipv6 := false,
1972 ip := '00000000'O,
Harald Welte8b2a2582018-01-16 08:11:42 +01001973 rtp_port := 0,
1974 payload_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001975 payload_msg_type := 0,
Vadim Yanitskiyf3962742021-10-28 16:09:09 +03001976 sdp := omit
Harald Welte8b2a2582018-01-16 08:11:42 +01001977 }
1978 }
1979}
1980
1981/* MSC <- MNCC: RTP_CREATE.req; request creation of RTP */
1982template MNCC_PDU ts_MNCC_RTP_CREATE(uint32_t call_id) := ts_MNCC_SIMPLE_RTP(MNCC_RTP_CREATE, call_id);
1983
1984/* MSC -> MNCC: RTP_CREATE.rsp; acknowledge creation of RTP (stating MSC side IP/Port) */
Neels Hofmeyr2ca1ab42019-03-08 03:45:43 +01001985template MNCC_PDU tr_MNCC_RTP_CREATE(template uint32_t call_id := ?,
Pau Espin Pedrol563b3d02020-09-09 20:19:52 +02001986 template octetstring ip := ?,
1987 template uint16_t rtp_port := ?,
Neels Hofmeyr2ca1ab42019-03-08 03:45:43 +01001988 template uint32_t payload_type := ?) := {
Harald Welte8b2a2582018-01-16 08:11:42 +01001989 msg_type := MNCC_RTP_CREATE,
1990 u := {
1991 rtp := {
1992 callref := call_id,
Pau Espin Pedrol563b3d02020-09-09 20:19:52 +02001993 is_ipv6 := ?,
Neels Hofmeyr2ca1ab42019-03-08 03:45:43 +01001994 ip := ip,
1995 rtp_port := rtp_port,
1996 payload_type := payload_type,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001997 payload_msg_type := ?,
1998 sdp := *
Harald Welte8b2a2582018-01-16 08:11:42 +01001999 }
2000 }
2001}
2002
2003/* MSC <- MNCC: RTP_CONNECT.req; request connect of RTP */
Pau Espin Pedrol563b3d02020-09-09 20:19:52 +02002004template MNCC_PDU ts_MNCC_RTP_CONNECT(uint32_t call_id, boolean is_ipv6, octetstring ip, uint16_t rtp_port, uint32_t pt) := {
Harald Welte8b2a2582018-01-16 08:11:42 +01002005 msg_type := MNCC_RTP_CONNECT,
2006 u := {
2007 rtp := {
2008 callref := call_id,
Pau Espin Pedrol563b3d02020-09-09 20:19:52 +02002009 is_ipv6 := is_ipv6,
Harald Welte8b2a2582018-01-16 08:11:42 +01002010 ip := ip,
2011 rtp_port := rtp_port,
2012 payload_type := pt,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01002013 payload_msg_type := 0,
Vadim Yanitskiyf3962742021-10-28 16:09:09 +03002014 sdp := omit
Harald Welte8b2a2582018-01-16 08:11:42 +01002015 }
2016 }
2017}
Harald Welteb0d93602018-03-20 18:09:34 +01002018template MNCC_PDU tr_MNCC_RTP_CONNECT(template uint32_t call_id,
Pau Espin Pedrol563b3d02020-09-09 20:19:52 +02002019 template octetstring ip := ?,
2020 template uint16_t rtp_port := ?,
Harald Welteb0d93602018-03-20 18:09:34 +01002021 template uint32_t pt := ?) := {
2022 msg_type := MNCC_RTP_CONNECT,
2023 u := {
2024 rtp := {
2025 callref := call_id,
Pau Espin Pedrol563b3d02020-09-09 20:19:52 +02002026 is_ipv6 := ?,
Harald Welteb0d93602018-03-20 18:09:34 +01002027 ip := ip,
2028 rtp_port := rtp_port,
2029 payload_type := pt,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01002030 payload_msg_type := 0,
Oliver Smith81a25462019-11-28 13:40:37 +01002031 sdp := *
Harald Welteb0d93602018-03-20 18:09:34 +01002032 }
2033 }
2034}
2035
Harald Welte8b2a2582018-01-16 08:11:42 +01002036
2037/* MSC <- MNCC: RTP_FREE.req; request connect of RTP */
2038template MNCC_PDU ts_MNCC_RTP_FREE(uint32_t call_id) := ts_MNCC_SIMPLE_RTP(MNCC_RTP_FREE, call_id);
Harald Welte474fd7d2017-12-29 16:01:39 +01002039
Harald Welte251b52b2018-01-17 13:58:16 +01002040function f_mncc_get_call_id(MNCC_PDU pdu) return uint32_t {
2041 if (ischosen(pdu.u.rtp)) {
2042 return pdu.u.rtp.callref;
2043 } else if (ischosen(pdu.u.data)) {
2044 return pdu.u.data.callref;
2045 } else if (ischosen(pdu.u.signal)) {
2046 return pdu.u.signal.callref;
2047 } else {
2048 setverdict(fail, "Unable to determine Callref for MNCC", pdu);
Daniel Willmanne4ff5372018-07-05 17:35:03 +02002049 mtc.stop
Harald Welte251b52b2018-01-17 13:58:16 +01002050 }
2051}
2052
Harald Welte474fd7d2017-12-29 16:01:39 +01002053} with { encode "RAW" ; variant "FIELDORDER(msb)" }