blob: 74b9ca9bf8672e9ac72c2fdcce8b77d343bb0a2b [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
Oliver Smithc1dd36a2023-05-31 13:52:24 +0200195template MNCC_bearer_cap ts_MNCC_bcap_data := {
196 transfer := 1, /* unrestricted digital information */
197 mode := 0, /* circuit */
198 coding := 0, /* GSM standard */
199 radio := 3, /* FR/HR, FR preferred */
200 speech_ctm := 0, /* not supported */
201 speech_ver := { -1 },
202 data := {
203 rate_adaptation := GSM48_BCAP_RA_V110_X30,
204 sig_access := GSM48_BCAP_SA_NONE,
205 async := 1,
206 nr_stop_bits := 1,
207 nr_data_bits := 1,
208 user_rate := GSM48_BCAP_UR_4800,
209 parity := GSM48_BCAP_PAR_ODD,
210 interm_rate := GSM48_BCAP_IR_8k,
211 transp := GSM48_BCAP_TR_TRANSP,
212 modem_type := GSM48_BCAP_MT_V21
213 }
214};
215
Harald Welte474fd7d2017-12-29 16:01:39 +0100216type record MNCC_number {
217 GSM48_type_of_number number_type,
218 GSM48_num_plan_ind plan,
219 GSM48_present_ind presence,
220 GSM48_screening_ind screen,
221 charstring number
222};
223
224/* 24.008 10.5.118 */
225type enumerated GSM48_num_plan_ind {
226 GSM48_NUMPLAN_UNKNOWN (0),
227 GSM48_NUMPLAN_E164 (1),
228 GSM48_NUMPLAN_X121 (3),
229 GSM48_NUMPLAN_F69 (4),
230 GSM48_NUMPLAN_NATIONAL (8),
231 GSM48_NUMPLAN_PRIVATE (9),
232 GSM48_NUMPLAN_CTS (11),
233 GSM48_NUMPLAN_RESERVED (15)
234};
235
236/* 04.08 10.5.118 */
237type enumerated GSM48_type_of_number {
238 GSM48_TON_UNKNOWN (0),
239 GSM48_TON_INTERNATIONAL (1),
240 GSM48_TON_NATIONAL (2),
241 GSM48_TON_NETWORK_SPECIFIC (3),
242 GSM48_TON_SHORT_CODE (4)
243};
244
245/* 04.08 10.5.120 */
246type enumerated GSM48_present_ind {
247 GSM48_PRES_IND_ALLOWED (0),
248 GSM48_PRES_IND_RESTRICTED (1),
249 GSM48_PRES_IND_NUM_NOT_AVAIL (2),
250 GSM48_PRES_IND_RESERVED (3)
251};
252
253type enumerated GSM48_screening_ind {
254 GSM48_SCR_IND_NOT_SCREENED (0),
255 GSM48_SCR_IND_VERIF_PASSED (1),
256 GSM48_SCR_IND_VERIF_FAILED (2),
257 GSM48_SCR_IND_NETW_PROVIDED (3)
258};
259
Harald Weltefe75a202018-01-17 13:59:20 +0100260/* 24.008 Table 10.5.122 */
261type enumerated GSM48_cause_coding {
262 GSM48_CAUSE_CS_Q931 ('00'B),
263 GSM48_CAUSE_CS_RSVD ('01'B),
264 GSM48_CAUSE_CS_NATIONAL ('10'B),
265 GSM48_CAUSE_CS_GSM ('11'B)
266}
267
268type enumerated GSM48_cause_loc {
269 GSM48_CAUSE_LOC_USER ('0000'B),
270 GSM48_CAUSE_LOC_PRN_S_LU ('0001'B),
271 GSM48_CAUSE_LOC_PUN_S_LU ('0010'B),
272 GSM48_CAUSE_LOC_TRANS_NET ('0011'B),
273 GSM48_CAUSE_LOC_PUN_S_RU ('0100'B),
274 GSM48_CAUSE_LOC_PRN_S_RU ('0101'B),
275 GSM48_CAUSE_LOC_INN_NET ('0111'B),
276 GSM48_CAUSE_LOC_NET_BEYOND ('1010'B)
277}
278
279
Harald Welte474fd7d2017-12-29 16:01:39 +0100280
Harald Welted748a052018-01-22 02:59:24 +0100281template (value) MNCC_number ts_MNCC_number(charstring number,
Harald Welte474fd7d2017-12-29 16:01:39 +0100282 GSM48_type_of_number ton := GSM48_TON_INTERNATIONAL,
283 GSM48_num_plan_ind npi := GSM48_NUMPLAN_E164,
284 GSM48_present_ind pres := GSM48_PRES_IND_ALLOWED,
285 GSM48_screening_ind screen := GSM48_SCR_IND_NOT_SCREENED) := {
286 number_type := ton,
287 plan := npi,
288 presence := pres,
289 screen := screen,
290 number := number
291}
292
Harald Welted748a052018-01-22 02:59:24 +0100293template MNCC_number tr_MNCC_number(template charstring number,
294 template GSM48_type_of_number ton := ?,
295 template GSM48_num_plan_ind npi := ?,
296 template GSM48_present_ind pres := ?,
297 template GSM48_screening_ind screen := ?) := {
298 number_type := ton,
299 plan := npi,
300 presence := pres,
301 screen := screen,
302 number := number
303}
304
Harald Welte474fd7d2017-12-29 16:01:39 +0100305type record MNCC_cause {
Harald Weltefe75a202018-01-17 13:59:20 +0100306 GSM48_cause_loc location,
307 GSM48_cause_coding coding,
Harald Welte474fd7d2017-12-29 16:01:39 +0100308 int rec,
309 int rec_val,
310 int val,
311 octetstring diag
Harald Weltefe75a202018-01-17 13:59:20 +0100312} with {
313 variant (location) "FIELDLENGTH(32)";
314 variant (coding) "FIELDLENGTH(32)";
315}
Harald Welte474fd7d2017-12-29 16:01:39 +0100316
Harald Welte90938392018-03-25 16:36:40 +0200317template (value) MNCC_cause ts_MNCC_cause(int val,
Harald Welte2bb825f2018-01-22 11:31:18 +0100318 GSM48_cause_loc loc := GSM48_CAUSE_LOC_PUN_S_LU,
319 GSM48_cause_coding coding := GSM48_CAUSE_CS_GSM,
320 octetstring diag := ''O) := {
321 location := loc,
322 coding := coding,
323 rec := 0,
324 rec_val := 0,
325 val := val,
326 diag := diag
327}
328
Harald Welte474fd7d2017-12-29 16:01:39 +0100329type record MNCC_useruser {
330 int proto,
331 charstring info
332};
333
334type record MNCC_progress {
335 int coding,
336 int location,
337 int descr
338};
339
340type record MNCC_cccap {
341 int dtmf,
342 int pcp
343};
344
Harald Welte8b2a2582018-01-16 08:11:42 +0100345type int MNCC_notify (0..127);
Harald Welted13700d2018-02-02 20:06:52 +0100346type charstring MNCC_keypad length (1);
Harald Welte8b2a2582018-01-16 08:11:42 +0100347
Harald Welte474fd7d2017-12-29 16:01:39 +0100348type enumerated MNCC_bcap {
349 GSM_MNCC_BCAP_SPEECH (0),
350 GSM_MNCC_BCAP_UNR_DIG (1),
351 GSM_MNCC_BCAP_AUDIO (2),
352 GSM_MNCC_BCAP_FAX_G3 (3),
353 GSM_MNCC_BCAP_OTHER_ITC (4),
354 GSM_MNCC_BCAP_RESERVED (7)
355};
356
357
358type record MNCC_PDU_Signal {
359 uint32_t callref,
360
361 MNCC_bearer_cap bearer_cap optional,
362 MNCC_number called optional,
363 MNCC_number calling optional,
364 MNCC_number redirecting optional,
365 MNCC_number connected optional,
366 MNCC_cause cause optional,
367 MNCC_progress progress optional,
368 MNCC_useruser useruser optional,
369 charstring facility optional,
370 MNCC_cccap cccap optional,
371 charstring ssversion optional,
372
373 int clir_sup,
374 int clir_inv,
375 int signal optional,
376
Harald Welte8b2a2582018-01-16 08:11:42 +0100377 MNCC_keypad keypad optional,
Harald Welte474fd7d2017-12-29 16:01:39 +0100378 int more,
Harald Welte8b2a2582018-01-16 08:11:42 +0100379 MNCC_notify notify,
Harald Welte474fd7d2017-12-29 16:01:39 +0100380 int emergency optional,
381 charstring imsi,
382
383 uint8_t lchan_type, /* empty in OSmoMSC */
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100384 uint8_t lchan_mode, /* empty in OsmoMSC */
385
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +0300386 octetstring gcr optional,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100387 charstring sdp optional
Harald Welte474fd7d2017-12-29 16:01:39 +0100388};
389
390
391type record MNCC_PDU_Data {
392 uint32_t callref,
393 octetstring data
394};
395
396type record MNCC_PDU_Rtp {
397 uint32_t callref,
Pau Espin Pedrol563b3d02020-09-09 20:19:52 +0200398 boolean is_ipv6,
399 octetstring ip,
Harald Welte474fd7d2017-12-29 16:01:39 +0100400 uint16_t rtp_port,
401 uint32_t payload_type,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100402 uint32_t payload_msg_type,
403
404 charstring sdp optional
Harald Welte474fd7d2017-12-29 16:01:39 +0100405};
406
407type record MNCC_PDU_Hello {
408 uint32_t version,
409 uint32_t mncc_size,
410 uint32_t data_frame_size,
411 uint32_t called_offset,
412 uint32_t signal_offset,
413 uint32_t emergency_offset,
414 uint32_t lchan_type_offset
415};
416
417
418type union MNCC_MsgUnion {
419 MNCC_PDU_Signal signal,
420 MNCC_PDU_Data data,
421 MNCC_PDU_Rtp rtp,
422 MNCC_PDU_Hello hello
423};
424
425
426type record MNCC_PDU {
427 MNCC_MsgType msg_type,
428 MNCC_MsgUnion u
429} with { variant (u) "CROSSTAG(
430 hello, msg_type = MNCC_SOCKET_HELLO;
431 rtp, { msg_type = MNCC_RTP_CREATE,
432 msg_type = MNCC_RTP_CONNECT,
433 msg_type = MNCC_RTP_FREE };
434 data, { msg_type = GSM_TCHF_FRAME,
435 msg_type = GSM_TCHF_FRAME_EFR,
436 msg_type = GSM_TCHH_FRAME,
437 msg_type = GSM_TCH_FRAME_AMR,
438 msg_type = GSM_BAD_FRAME };
439 signal, OTHERWISE
440 )"
441};
442
443external function enc_MNCC_PDU(in MNCC_PDU pdu) return octetstring;
444
445external function dec_MNCC_PDU(in octetstring stream) return MNCC_PDU;
446
Pau Espin Pedrol563b3d02020-09-09 20:19:52 +0200447external function set_MNCC_version(in integer version) return boolean;
448
Harald Welte14509532018-03-24 22:32:01 +0100449template (value) MNCC_PDU ts_MNCC_HELLO(uint32_t version := 5) := {
450 msg_type := MNCC_SOCKET_HELLO,
451 u := {
452 hello := {
453 version := version,
454 mncc_size := 836,
455 data_frame_size := 8,
456 called_offset := 104,
457 signal_offset := 796,
458 emergency_offset := 812,
459 lchan_type_offset := 0
460 }
461 }
462}
Harald Welte474fd7d2017-12-29 16:01:39 +0100463
464template MNCC_PDU ts_MNCC_Sign(MNCC_MsgType msg_type, MNCC_PDU_Signal sign) := {
465 msg_type := msg_type,
466 u := {
467 signal := sign
468 }
469}
470
Harald Welte8b2a2582018-01-16 08:11:42 +0100471template MNCC_PDU ts_MNCC_SIMPLE(MNCC_MsgType msg_type, uint32_t call_id) := {
472 msg_type := msg_type,
Harald Welte474fd7d2017-12-29 16:01:39 +0100473 u := {
474 signal := {
475 callref := call_id,
Harald Welte8b2a2582018-01-16 08:11:42 +0100476 bearer_cap := omit,
477 called := omit,
478 calling := omit,
Harald Welte474fd7d2017-12-29 16:01:39 +0100479 redirecting := omit,
480 connected := omit,
481 cause := omit,
482 progress := omit,
483 useruser := omit,
484 facility := omit,
485 cccap := omit,
486 ssversion := omit,
487 clir_sup := 0,
488 clir_inv := 0,
489 signal := omit,
490 keypad := omit,
491 more := 0,
492 notify := 0,
493 emergency := omit,
Harald Welte8b2a2582018-01-16 08:11:42 +0100494 imsi := "",
495 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100496 lchan_mode := 0,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +0300497 gcr := omit,
Vadim Yanitskiyf3962742021-10-28 16:09:09 +0300498 sdp := omit
Harald Welte8b2a2582018-01-16 08:11:42 +0100499 }
500 }
501}
502
503template MNCC_PDU tr_MNCC_SIMPLE(template MNCC_MsgType msg_type, template uint32_t call_id) := {
504 msg_type := msg_type,
505 u := {
506 signal := {
507 callref := call_id,
508 bearer_cap := omit,
509 called := omit,
510 calling := omit,
511 redirecting := omit,
512 connected := omit,
513 cause := omit,
514 progress := omit,
515 useruser := omit,
516 facility := omit,
517 cccap := omit,
518 ssversion := omit,
519 clir_sup := 0,
520 clir_inv := 0,
521 signal := omit,
522 keypad := omit,
523 more := 0,
524 notify := 0,
525 emergency := *,
526 imsi := ?,
527 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100528 lchan_mode := ?,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +0300529 gcr := *,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100530 sdp := *
Harald Welte8b2a2582018-01-16 08:11:42 +0100531 }
532 }
533}
534
535
536
537/* MT: MSC <- MNCC: SETUP.req from ext. MNCC handler to MSC */
Oliver Smithc1dd36a2023-05-31 13:52:24 +0200538template MNCC_PDU ts_MNCC_SETUP_req(uint32_t call_id, charstring called, charstring calling, charstring imsi := "",
539 template MNCC_bearer_cap bcap := ts_MNCC_bcap_voice) := {
Harald Welte8b2a2582018-01-16 08:11:42 +0100540 msg_type := MNCC_SETUP_REQ,
541 u := {
542 signal := { /* See 24.008 9.3.23.1 */
543 callref := call_id,
Oliver Smithc1dd36a2023-05-31 13:52:24 +0200544 bearer_cap := valueof(bcap), /* mandatory */
Harald Welte8b2a2582018-01-16 08:11:42 +0100545 called := valueof(ts_MNCC_number(called)), /* optional */
546 calling := valueof(ts_MNCC_number(calling)), /* optional */
547 redirecting := omit, /* optional */
548 connected := omit,
549 cause := omit,
550 progress := omit, /* optional */
551 useruser := omit, /* optional */
552 facility := omit, /* optional */
553 cccap := omit,
554 ssversion := omit,
555 clir_sup := 0,
556 clir_inv := 0,
557 signal := omit, /* optional */
558 keypad := omit,
559 more := 0,
560 notify := 0,
561 emergency := omit,
562 imsi := imsi,
Harald Welte474fd7d2017-12-29 16:01:39 +0100563 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100564 lchan_mode := 0,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +0300565 gcr := omit,
Vadim Yanitskiyf3962742021-10-28 16:09:09 +0300566 sdp := omit
Harald Welte474fd7d2017-12-29 16:01:39 +0100567 }
568 }
569};
Harald Welteb0d93602018-03-20 18:09:34 +0100570template MNCC_PDU tr_MNCC_SETUP_req(template uint32_t call_id := ?,
571 template charstring called := ?,
572 template charstring calling := *,
573 template charstring imsi := ?) := {
574 msg_type := MNCC_SETUP_REQ,
575 u := {
576 signal := { /* See 24.008 9.3.23.1 */
577 callref := call_id,
578 bearer_cap := *, /* mandatory in CC */
579 called := tr_MNCC_number(called), /* optional */
580 calling := tr_MNCC_number(calling), /* optional */
581 redirecting := *, /* optional */
582 connected := omit,
583 cause := omit,
584 progress := *, /* optional */
585 useruser := *, /* optional */
586 facility := *, /* optional */
587 cccap := omit,
588 ssversion := omit,
589 clir_sup := 0,
590 clir_inv := 0,
591 signal := *, /* optional */
592 keypad := omit,
593 more := 0,
594 notify := 0,
595 emergency := *,
596 imsi := imsi,
597 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100598 lchan_mode := ?,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +0300599 gcr := *,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100600 sdp := *
Harald Welteb0d93602018-03-20 18:09:34 +0100601 }
602 }
603};
604
Harald Welte474fd7d2017-12-29 16:01:39 +0100605
Harald Welte4017d552018-01-26 21:40:05 +0100606/* MO: MSC <- MNCC: Respons to SETUP.ind */
607template MNCC_PDU ts_MNCC_SETUP_rsp(uint32_t call_id, charstring imsi := "",
608 template MNCC_number connected := omit) := {
Harald Welte8b2a2582018-01-16 08:11:42 +0100609 msg_type := MNCC_SETUP_RSP,
610 u := {
611 signal := { /* See 24.008 9.3.5 */
612 callref := call_id,
613 bearer_cap := omit,
614 called := omit,
615 calling := omit,
616 redirecting := omit,
617 connected := connected,
618 cause := omit,
619 progress := omit,
Harald Welte4017d552018-01-26 21:40:05 +0100620 useruser := omit, /* optional */
621 facility := omit, /* optional */
Harald Welte8b2a2582018-01-16 08:11:42 +0100622 cccap := omit,
Harald Welte4017d552018-01-26 21:40:05 +0100623 ssversion := omit, /* optional */
Harald Welte8b2a2582018-01-16 08:11:42 +0100624 clir_sup := 0,
625 clir_inv := 0,
626 signal := omit,
627 keypad := omit,
628 more := 0,
629 notify := 0,
Harald Welte4017d552018-01-26 21:40:05 +0100630 emergency := omit,
Harald Welte8b2a2582018-01-16 08:11:42 +0100631 imsi := imsi,
Harald Welte4017d552018-01-26 21:40:05 +0100632 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100633 lchan_mode := 0,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +0300634 gcr := omit,
Vadim Yanitskiyf3962742021-10-28 16:09:09 +0300635 sdp := omit
Harald Welte8b2a2582018-01-16 08:11:42 +0100636 }
637 }
638};
Harald Welte90938392018-03-25 16:36:40 +0200639template MNCC_PDU tr_MNCC_SETUP_rsp(template uint32_t call_id,
640 template charstring imsi := ?,
641 template MNCC_number connected := *) := {
642 msg_type := MNCC_SETUP_RSP,
643 u := {
644 signal := { /* See 24.008 9.3.5 */
645 callref := call_id,
646 bearer_cap := omit,
647 called := omit,
648 calling := omit,
649 redirecting := omit,
650 connected := connected,
651 cause := omit,
652 progress := omit,
653 useruser := *, /* optional */
654 facility := *, /* optional */
655 cccap := omit,
656 ssversion := *, /* optional */
657 clir_sup := 0,
658 clir_inv := 0,
659 signal := omit,
660 keypad := omit,
661 more := 0,
662 notify := 0,
663 emergency := omit,
664 imsi := imsi,
665 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100666 lchan_mode := ?,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +0300667 gcr := *,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100668 sdp := *
Harald Welte90938392018-03-25 16:36:40 +0200669 }
670 }
671};
672
Harald Welte8b2a2582018-01-16 08:11:42 +0100673
674/* MO: MSC -> MNCC: SETUP.ind from MSC to ext. MNCC handler */
675template MNCC_PDU tr_MNCC_SETUP_ind(template uint32_t call_id := ?, template MNCC_number called := ?,
676 template MNCC_number calling := *, template charstring imsi :=?) := {
677 msg_type := MNCC_SETUP_IND,
678 u := {
679 signal := { /* See 24.008 9.3.23.2 */
680 callref := call_id,
681 bearer_cap := ?, /* mandatory */
682 called := called, /* mandatory */
683 calling := calling, /* optional */
684 redirecting := omit,
685 connected := omit,
686 cause := omit,
687 progress := omit,
688 useruser := *, /* optional */
689 facility := *, /* optional */
690 cccap := *, /* optional */
691 ssversion := *, /* optional */
692 clir_sup := ?, /* optional */
693 clir_inv := ?, /* optional */
694 signal := omit,
695 keypad := omit,
696 more := 0,
697 notify := 0,
698 emergency := *,
699 imsi := imsi,
700 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100701 lchan_mode := ?,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +0300702 gcr := *,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100703 sdp := *
Harald Welte8b2a2582018-01-16 08:11:42 +0100704 }
705 }
Harald Welteafec4712018-03-19 22:52:17 +0100706}
707template (value) MNCC_PDU ts_MNCC_SETUP_ind(uint32_t call_id, MNCC_number called,
708 template (omit) MNCC_number calling := omit,
709 template (omit) charstring imsi := omit,
710 template (value) MNCC_bearer_cap bcap := ts_MNCC_bcap_voice) := {
711 msg_type := MNCC_SETUP_IND,
712 u := {
713 signal := { /* See 24.008 9.3.23.2 */
714 callref := call_id,
715 bearer_cap := valueof(bcap), /* mandatory */
716 called := called, /* mandatory */
717 calling := calling, /* optional */
718 redirecting := omit,
719 connected := omit,
720 cause := omit,
721 progress := omit,
722 useruser := omit, /* optional */
723 facility := omit, /* optional */
724 cccap := omit, /* optional */
725 ssversion := omit, /* optional */
726 clir_sup := 0, /* optional */
727 clir_inv := 0, /* optional */
728 signal := omit,
729 keypad := omit,
730 more := 0,
731 notify := 0,
732 emergency := omit,
733 imsi := imsi,
734 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100735 lchan_mode := 0,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +0300736 gcr := omit,
Vadim Yanitskiyf3962742021-10-28 16:09:09 +0300737 sdp := omit
Harald Welteafec4712018-03-19 22:52:17 +0100738 }
739 }
Harald Welte8b2a2582018-01-16 08:11:42 +0100740}
741
742/* MO: MSC <- MNCC: SETUP.cnf; Response to SETUP.ind */
743template MNCC_PDU ts_MNCC_SETUP_CNF(uint32_t call_id, template MNCC_number connected := omit) := {
744 msg_type := MNCC_SETUP_CNF,
745 u := {
746 signal := { /* See 24.008 9.3.5 */
747 callref := call_id,
748 bearer_cap := omit,
749 called := omit,
750 calling := omit,
751 redirecting := omit,
752 connected := connected,
753 cause := omit,
Harald Welteb0d93602018-03-20 18:09:34 +0100754 progress := omit,
755 useruser := omit,
756 facility := omit,
Harald Welte8b2a2582018-01-16 08:11:42 +0100757 cccap := omit,
758 ssversion := omit,
759 clir_sup := 0,
760 clir_inv := 0,
761 signal := omit,
762 keypad := omit,
763 more := 0,
764 notify := 0,
Harald Welteb0d93602018-03-20 18:09:34 +0100765 emergency := omit,
Harald Welte8b2a2582018-01-16 08:11:42 +0100766 imsi := "",
Harald Welteb0d93602018-03-20 18:09:34 +0100767 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100768 lchan_mode := 0,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +0300769 gcr := omit,
Vadim Yanitskiyf3962742021-10-28 16:09:09 +0300770 sdp := omit
Harald Welte8b2a2582018-01-16 08:11:42 +0100771 }
772 }
773}
774
Harald Welte33ec09b2018-02-10 15:34:46 +0100775/* MT: MSC -> MNCC: SETUP.cnf; Response to SETUP.req */
776template MNCC_PDU tr_MNCC_SETUP_cnf(uint32_t call_id, template MNCC_number connected := *) := {
777 msg_type := MNCC_SETUP_CNF,
778 u := {
779 signal := { /* See 24.008 9.3.5 */
780 callref := call_id,
781 bearer_cap := omit,
782 called := omit,
783 calling := omit,
784 redirecting := omit,
785 connected := connected,
786 cause := omit,
787 progress := *,
788 useruser := *,
789 facility := *,
790 cccap := omit,
791 ssversion := omit,
792 clir_sup := 0,
793 clir_inv := 0,
794 signal := omit,
795 keypad := omit,
796 more := 0,
797 notify := 0,
798 emergency := *,
799 imsi := ?,
800 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100801 lchan_mode := ?,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +0300802 gcr := *,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100803 sdp := *
Harald Welte33ec09b2018-02-10 15:34:46 +0100804 }
805 }
806}
807
Harald Welte4017d552018-01-26 21:40:05 +0100808/* MT: MSC -> MNCC: SETUP_COMPL.req; request to send CONNECT ACK */
809template MNCC_PDU tr_MNCC_SETUP_COMPL_req(template uint32_t call_id) :=
810 tr_MNCC_SIMPLE(MNCC_SETUP_COMPL_REQ, call_id); /* See 24.008 9.3.6 */
Harald Welte8b2a2582018-01-16 08:11:42 +0100811
812/* MT: MSC -> MNCC: SETUP_COMPL.ind; receipt of CONNECT ACK */
813template MNCC_PDU tr_MNCC_SETUP_COMPL_ind(template uint32_t call_id := ?) :=
814 tr_MNCC_SIMPLE(MNCC_SETUP_COMPL_IND, call_id); /* See 24.008 9.3.6 */
Harald Welte90938392018-03-25 16:36:40 +0200815template (value) MNCC_PDU ts_MNCC_SETUP_COMPL_ind(uint32_t call_id) :=
816 ts_MNCC_SIMPLE(MNCC_SETUP_COMPL_IND, call_id); /* See 24.008 9.3.6 */
Harald Welte8b2a2582018-01-16 08:11:42 +0100817
818/* MT: MSC -> MNCC: REJ.req; reject MT call */
819template MNCC_PDU tr_MNCC_REJ_req(template uint32_t call_id, template MNCC_cause cause := *) := {
820 msg_type := MNCC_REJ_REQ,
821 u := {
822 signal := { /* See 24.008 9.3.19 */
823 callref := call_id,
824 bearer_cap := omit,
825 called := omit,
826 calling := omit,
827 redirecting := omit,
828 connected := omit,
829 cause := cause,
830 progress := omit,
831 useruser := *,
832 facility := *,
833 cccap := omit,
834 ssversion := omit,
835 clir_sup := 0,
836 clir_inv := 0,
837 signal := omit,
838 keypad := omit,
839 more := 0,
840 notify := 0,
841 emergency := omit,
842 imsi := ?,
843 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100844 lchan_mode := ?,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +0300845 gcr := *,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100846 sdp := *
Harald Welte8b2a2582018-01-16 08:11:42 +0100847 }
848 }
849}
850
851/* MO: MSC <- MNCC: REJ.ind; reject MO call */
852template MNCC_PDU ts_MNCC_REJ_ind(uint32_t call_id, template MNCC_cause cause := omit) := {
853 msg_type := MNCC_REJ_IND,
854 u := {
855 signal := { /* See 24.008 9.3.19 */
856 callref := call_id,
857 bearer_cap := omit,
858 called := omit,
859 calling := omit,
860 redirecting := omit,
861 connected := omit,
862 cause := cause,
863 progress := omit,
864 useruser := omit,
865 facility := omit,
866 cccap := omit,
867 ssversion := omit,
868 clir_sup := 0,
869 clir_inv := 0,
870 signal := omit,
871 keypad := omit,
872 more := 0,
873 notify := 0,
874 emergency := omit,
875 imsi := "",
876 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100877 lchan_mode := 0,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +0300878 gcr := omit,
Vadim Yanitskiyf3962742021-10-28 16:09:09 +0300879 sdp := omit
Harald Welte8b2a2582018-01-16 08:11:42 +0100880 }
881 }
882}
883
Harald Welte812f7a42018-01-27 00:49:18 +0100884/* MT: MSC -> MNCC: CALL_CONF.req; send CALL CONFIRMED to MS */
885template MNCC_PDU tr_MNCC_CALL_CONF_ind(template uint32_t call_id, template MNCC_bearer_cap bcap := *,
886 template MNCC_cause cause := *,
887 template MNCC_cccap cccap := *) := {
Harald Welte8b2a2582018-01-16 08:11:42 +0100888 msg_type := MNCC_CALL_CONF_IND,
889 u := {
890 signal := { /* See 24.008 9.3.2 */
891 callref := call_id,
892 bearer_cap := bcap,
893 called := omit,
894 calling := omit,
895 redirecting := omit,
896 connected := omit,
897 cause := cause,
898 progress := omit,
899 useruser := omit,
900 facility := omit,
901 cccap := cccap,
902 ssversion := omit,
903 clir_sup := 0,
904 clir_inv := 0,
905 signal := omit,
906 keypad := omit,
907 more := 0,
908 notify := 0,
909 emergency := omit,
Harald Welte812f7a42018-01-27 00:49:18 +0100910 imsi := ?,
911 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100912 lchan_mode := ?,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +0300913 gcr := *,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100914 sdp := *
Harald Welte8b2a2582018-01-16 08:11:42 +0100915 }
916 }
917}
Harald Welteb0d93602018-03-20 18:09:34 +0100918template MNCC_PDU ts_MNCC_CALL_CONF_ind(uint32_t call_id,
919 template (omit) MNCC_bearer_cap bcap := omit,
920 template (omit) MNCC_cause cause := omit,
921 template (omit) MNCC_cccap cccap := omit) := {
922 msg_type := MNCC_CALL_CONF_IND,
923 u := {
924 signal := { /* See 24.008 9.3.2 */
925 callref := call_id,
926 bearer_cap := bcap,
927 called := omit,
928 calling := omit,
929 redirecting := omit,
930 connected := omit,
931 cause := cause,
932 progress := omit,
933 useruser := omit,
934 facility := omit,
935 cccap := cccap,
936 ssversion := omit,
937 clir_sup := 0,
938 clir_inv := 0,
939 signal := omit,
940 keypad := omit,
941 more := 0,
942 notify := 0,
943 emergency := omit,
944 imsi := "",
945 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100946 lchan_mode := 0,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +0300947 gcr := omit,
Vadim Yanitskiyf3962742021-10-28 16:09:09 +0300948 sdp := omit
Harald Welteb0d93602018-03-20 18:09:34 +0100949 }
950 }
951}
952
Harald Welte8b2a2582018-01-16 08:11:42 +0100953
954/* MO: MSC <- MNCC: CALL_PROC.req; call establishment initiated in network */
955template MNCC_PDU ts_MNCC_CALL_PROC_req(uint32_t call_id, template MNCC_bearer_cap bcap := omit,
956 template MNCC_progress prog := omit,
957 template charstring fac := omit,
958 template MNCC_cccap cccap := omit) := {
959 msg_type := MNCC_CALL_PROC_REQ,
960 u := {
961 signal := { /* See 24.008 9.3.2 */
962 callref := call_id,
963 bearer_cap := bcap,
964 called := omit,
965 calling := omit,
966 redirecting := omit,
967 connected := omit,
968 cause := omit,
969 progress := prog,
970 useruser := omit,
971 facility := fac,
972 cccap := cccap,
973 ssversion := omit,
974 clir_sup := 0,
975 clir_inv := 0,
976 signal := omit,
977 keypad := omit,
978 more := 0,
979 notify := 0,
980 emergency := omit,
981 imsi := "",
982 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100983 lchan_mode := 0,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +0300984 gcr := omit,
Vadim Yanitskiyf3962742021-10-28 16:09:09 +0300985 sdp := omit
Harald Welte8b2a2582018-01-16 08:11:42 +0100986 }
987 }
988}
Harald Welte90938392018-03-25 16:36:40 +0200989template MNCC_PDU tr_MNCC_CALL_PROC_req(template uint32_t call_id,
990 template MNCC_bearer_cap bcap := *,
991 template MNCC_progress prog := *,
992 template charstring fac := *,
993 template MNCC_cccap cccap := *) := {
994 msg_type := MNCC_CALL_PROC_REQ,
995 u := {
996 signal := { /* See 24.008 9.3.2 */
997 callref := call_id,
998 bearer_cap := bcap,
999 called := omit,
1000 calling := omit,
1001 redirecting := omit,
1002 connected := omit,
1003 cause := omit,
1004 progress := prog,
1005 useruser := omit,
1006 facility := fac,
1007 cccap := cccap,
1008 ssversion := omit,
1009 clir_sup := 0,
1010 clir_inv := 0,
1011 signal := omit,
1012 keypad := omit,
1013 more := 0,
1014 notify := 0,
1015 emergency := omit,
1016 imsi := ?,
1017 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001018 lchan_mode := ?,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001019 gcr := *,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001020 sdp := *
Harald Welte90938392018-03-25 16:36:40 +02001021 }
1022 }
1023}
1024
Harald Welte8b2a2582018-01-16 08:11:42 +01001025
1026/* MSC <- MNCC: PROGRESS.req; PROGRESS message from ISDN */
1027template MNCC_PDU ts_MNCC_PROGRESS_req(uint32_t call_id, MNCC_progress prog,
1028 template MNCC_useruser uu := omit) := {
1029 msg_type := MNCC_PROGRESS_REQ,
1030 u := {
1031 signal := { /* See 24.008 9.3.17 */
1032 callref := call_id,
1033 bearer_cap := omit,
1034 called := omit,
1035 calling := omit,
1036 redirecting := omit,
1037 connected := omit,
1038 cause := omit,
1039 progress := prog,
1040 useruser := uu,
1041 facility := omit,
1042 cccap := omit,
1043 ssversion := omit,
1044 clir_sup := 0,
1045 clir_inv := 0,
1046 signal := omit,
1047 keypad := omit,
1048 more := 0,
1049 notify := 0,
1050 emergency := omit,
1051 imsi := "",
1052 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001053 lchan_mode := 0,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001054 gcr := omit,
Vadim Yanitskiyf3962742021-10-28 16:09:09 +03001055 sdp := omit
Harald Welte8b2a2582018-01-16 08:11:42 +01001056 }
1057 }
1058}
1059
1060/* MO: MSC <- MNCC: ALERT.req; indicate that user alerting has been initiated */
1061template MNCC_PDU ts_MNCC_ALERT_req(uint32_t call_id, template MNCC_progress prog := omit,
1062 template charstring fac := omit,
1063 template MNCC_useruser uu := omit) := {
1064 msg_type := MNCC_ALERT_REQ,
1065 u := {
1066 signal := { /* See 24.008 9.3.1 */
1067 callref := call_id,
1068 bearer_cap := omit,
1069 called := omit,
1070 calling := omit,
1071 redirecting := omit,
1072 connected := omit,
1073 cause := omit,
1074 progress := prog,
1075 useruser := uu,
1076 facility := fac,
1077 cccap := omit,
1078 ssversion := omit,
1079 clir_sup := 0,
1080 clir_inv := 0,
1081 signal := omit,
1082 keypad := omit,
1083 more := 0,
1084 notify := 0,
1085 emergency := omit,
1086 imsi := "",
1087 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001088 lchan_mode := 0,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001089 gcr := omit,
Vadim Yanitskiyf3962742021-10-28 16:09:09 +03001090 sdp := omit
Harald Welte8b2a2582018-01-16 08:11:42 +01001091 }
1092 }
1093}
Harald Welte90938392018-03-25 16:36:40 +02001094template MNCC_PDU tr_MNCC_ALERT_req(template uint32_t call_id,
1095 template MNCC_progress prog := *,
1096 template charstring fac := *,
1097 template MNCC_useruser uu := *) := {
1098 msg_type := MNCC_ALERT_REQ,
1099 u := {
1100 signal := { /* See 24.008 9.3.1 */
1101 callref := call_id,
1102 bearer_cap := omit,
1103 called := omit,
1104 calling := omit,
1105 redirecting := omit,
1106 connected := omit,
1107 cause := omit,
1108 progress := prog,
1109 useruser := uu,
1110 facility := fac,
1111 cccap := omit,
1112 ssversion := omit,
1113 clir_sup := 0,
1114 clir_inv := 0,
1115 signal := omit,
1116 keypad := omit,
1117 more := 0,
1118 notify := 0,
1119 emergency := omit,
1120 imsi := ?,
1121 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001122 lchan_mode := ?,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001123 gcr := *,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001124 sdp := *
Harald Welte90938392018-03-25 16:36:40 +02001125 }
1126 }
1127}
1128
Harald Welte8b2a2582018-01-16 08:11:42 +01001129
1130
1131/* MT: MSC -> MNCC: ALERRT.ind; indicates that mobile user alerting has been initiated */
1132template MNCC_PDU tr_MNCC_ALERT_ind(template uint32_t call_id, template MNCC_progress prog := omit,
1133 template charstring fac := omit,
1134 template MNCC_useruser uu := omit) := {
Harald Welte33ec09b2018-02-10 15:34:46 +01001135 msg_type := MNCC_ALERT_IND,
Harald Welte8b2a2582018-01-16 08:11:42 +01001136 u := {
1137 signal := { /* See 24.008 9.3.1 */
1138 callref := call_id,
1139 bearer_cap := omit,
1140 called := omit,
1141 calling := omit,
1142 redirecting := omit,
1143 connected := omit,
1144 cause := omit,
1145 progress := prog,
1146 useruser := uu,
1147 facility := fac,
1148 cccap := omit,
1149 ssversion := omit,
1150 clir_sup := 0,
1151 clir_inv := 0,
1152 signal := omit,
1153 keypad := omit,
1154 more := 0,
1155 notify := 0,
1156 emergency := *,
1157 imsi := ?,
1158 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001159 lchan_mode := ?,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001160 gcr := *,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001161 sdp := *
Harald Welte8b2a2582018-01-16 08:11:42 +01001162 }
1163 }
1164}
Harald Welteb0d93602018-03-20 18:09:34 +01001165template (value) MNCC_PDU ts_MNCC_ALERT_ind(uint32_t call_id,
1166 template (omit) MNCC_progress prog := omit,
1167 template (omit) charstring fac := omit,
1168 template (omit) MNCC_useruser uu := omit) := {
1169 msg_type := MNCC_ALERT_IND,
1170 u := {
1171 signal := { /* See 24.008 9.3.1 */
1172 callref := call_id,
1173 bearer_cap := omit,
1174 called := omit,
1175 calling := omit,
1176 redirecting := omit,
1177 connected := omit,
1178 cause := omit,
1179 progress := prog,
1180 useruser := uu,
1181 facility := fac,
1182 cccap := omit,
1183 ssversion := omit,
1184 clir_sup := 0,
1185 clir_inv := 0,
1186 signal := omit,
1187 keypad := omit,
1188 more := 0,
1189 notify := 0,
1190 emergency := omit,
1191 imsi := "",
1192 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001193 lchan_mode := 0,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001194 gcr := omit,
Vadim Yanitskiyf3962742021-10-28 16:09:09 +03001195 sdp := omit
Harald Welteb0d93602018-03-20 18:09:34 +01001196 }
1197 }
1198}
1199
Harald Welte8b2a2582018-01-16 08:11:42 +01001200
1201/* : MSC <- MNCC: NOTIFY.req; request to send information pertaining to a call (such as user suspended) */
1202template MNCC_PDU ts_MNCC_NOTIFY_req(uint32_t call_id, MNCC_notify notify) := {
1203 msg_type := MNCC_NOTIFY_REQ,
1204 u := {
1205 signal := { /* See 24.008 9.3.16 */
1206 callref := call_id,
1207 bearer_cap := omit,
1208 called := omit,
1209 calling := omit,
1210 redirecting := omit,
1211 connected := omit,
1212 cause := omit,
1213 progress := omit,
1214 useruser := omit,
1215 facility := omit,
1216 cccap := omit,
1217 ssversion := omit,
1218 clir_sup := 0,
1219 clir_inv := 0,
1220 signal := omit,
1221 keypad := omit,
1222 more := 0,
1223 notify := notify,
1224 emergency := omit,
1225 imsi := "",
1226 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001227 lchan_mode := 0,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001228 gcr := omit,
Vadim Yanitskiyf3962742021-10-28 16:09:09 +03001229 sdp := omit
Harald Welte8b2a2582018-01-16 08:11:42 +01001230 }
1231 }
1232}
1233
1234/* : MSC -> MNCC: NOTIFY.ind; indication to the mobile user */
1235template MNCC_PDU tr_MNCC_NOTIFY_ind(template uint32_t call_id, template MNCC_notify notify) := {
1236 msg_type := MNCC_NOTIFY_IND,
1237 u := {
1238 signal := { /* See 24.008 9.3.16 */
1239 callref := call_id,
1240 bearer_cap := omit,
1241 called := omit,
1242 calling := omit,
1243 redirecting := omit,
1244 connected := omit,
1245 cause := omit,
1246 progress := omit,
1247 useruser := omit,
1248 facility := omit,
1249 cccap := omit,
1250 ssversion := omit,
1251 clir_sup := 0,
1252 clir_inv := 0,
1253 signal := omit,
1254 keypad := omit,
1255 more := 0,
1256 notify := notify,
1257 emergency := *,
1258 imsi := ?,
1259 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001260 lchan_mode := ?,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001261 gcr := *,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001262 sdp := *
Harald Welte8b2a2582018-01-16 08:11:42 +01001263 }
1264 }
1265}
1266
1267/* : MSC -> MNCC: DISC.ind; mobile user requests disconnect */
1268template MNCC_PDU tr_MNCC_DISC_ind(template uint32_t call_id := ?, template MNCC_cause cause := ?,
1269 template MNCC_progress prog := *,
1270 template charstring fac := *,
1271 template MNCC_useruser uu := *) := {
1272 msg_type := MNCC_DISC_IND,
1273 u := {
1274 signal := { /* See 24.008 9.3.7 */
1275 callref := call_id,
1276 bearer_cap := omit,
1277 called := omit,
1278 calling := omit,
1279 redirecting := omit,
1280 connected := omit,
1281 cause := cause,
1282 progress := prog,
1283 useruser := uu,
1284 facility := fac,
1285 cccap := omit,
1286 ssversion := omit,
1287 clir_sup := 0,
1288 clir_inv := 0,
1289 signal := omit,
1290 keypad := omit,
1291 more := 0,
1292 notify := 0,
1293 emergency := *,
1294 imsi := ?,
1295 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001296 lchan_mode := ?,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001297 gcr := *,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001298 sdp := *
Harald Welte8b2a2582018-01-16 08:11:42 +01001299 }
1300 }
1301}
Harald Welte90938392018-03-25 16:36:40 +02001302template (value) MNCC_PDU ts_MNCC_DISC_ind(uint32_t call_id, template (value) MNCC_cause cause,
1303 template (omit) MNCC_progress prog := omit,
1304 template (omit) charstring fac := omit,
1305 template (omit) MNCC_useruser uu := omit) := {
1306 msg_type := MNCC_DISC_IND,
1307 u := {
1308 signal := { /* See 24.008 9.3.7 */
1309 callref := call_id,
1310 bearer_cap := omit,
1311 called := omit,
1312 calling := omit,
1313 redirecting := omit,
1314 connected := omit,
1315 cause := cause,
1316 progress := prog,
1317 useruser := uu,
1318 facility := fac,
1319 cccap := omit,
1320 ssversion := omit,
1321 clir_sup := 0,
1322 clir_inv := 0,
1323 signal := omit,
1324 keypad := omit,
1325 more := 0,
1326 notify := 0,
1327 emergency := omit,
1328 imsi := "",
1329 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001330 lchan_mode := 0,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001331 gcr := omit,
Vadim Yanitskiyf3962742021-10-28 16:09:09 +03001332 sdp := omit
Harald Welte90938392018-03-25 16:36:40 +02001333 }
1334 }
1335}
Harald Welte8b2a2582018-01-16 08:11:42 +01001336
1337/* : MSC <- MNCC: DISC.req; indicate disconnect to mobile user */
1338template MNCC_PDU ts_MNCC_DISC_req(uint32_t call_id, MNCC_cause cause,
1339 template MNCC_progress prog := omit,
1340 template charstring fac := omit,
1341 template MNCC_useruser uu := omit) := {
1342 msg_type := MNCC_DISC_REQ,
1343 u := {
1344 signal := { /* See 24.008 9.3.7 */
1345 callref := call_id,
1346 bearer_cap := omit,
1347 called := omit,
1348 calling := omit,
1349 redirecting := omit,
1350 connected := omit,
1351 cause := cause,
1352 progress := prog,
1353 useruser := uu,
1354 facility := fac,
1355 cccap := omit,
1356 ssversion := omit,
1357 clir_sup := 0,
1358 clir_inv := 0,
1359 signal := omit,
1360 keypad := omit,
1361 more := 0,
1362 notify := 0,
1363 emergency := omit,
1364 imsi := "",
1365 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001366 lchan_mode := 0,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001367 gcr := omit,
Vadim Yanitskiyf3962742021-10-28 16:09:09 +03001368 sdp := omit
Harald Welte8b2a2582018-01-16 08:11:42 +01001369 }
1370 }
1371}
Harald Welte90938392018-03-25 16:36:40 +02001372template MNCC_PDU tr_MNCC_DISC_req(template uint32_t call_id,
1373 template MNCC_cause cause := *,
1374 template MNCC_progress prog := omit,
1375 template charstring fac := omit,
1376 template MNCC_useruser uu := omit) := {
1377 msg_type := MNCC_DISC_REQ,
1378 u := {
1379 signal := { /* See 24.008 9.3.7 */
1380 callref := call_id,
1381 bearer_cap := omit,
1382 called := omit,
1383 calling := omit,
1384 redirecting := omit,
1385 connected := omit,
1386 cause := cause,
1387 progress := prog,
1388 useruser := uu,
1389 facility := fac,
1390 cccap := omit,
1391 ssversion := omit,
1392 clir_sup := 0,
1393 clir_inv := 0,
1394 signal := omit,
1395 keypad := omit,
1396 more := 0,
1397 notify := 0,
1398 emergency := *,
1399 imsi := ?,
1400 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001401 lchan_mode := ?,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001402 gcr := *,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001403 sdp := *
Harald Welte90938392018-03-25 16:36:40 +02001404 }
1405 }
1406}
1407
Harald Welte8b2a2582018-01-16 08:11:42 +01001408
1409/* : MSC -> MNCC: REL.ind; mobile user informs network that user wants to release call + MM */
1410template MNCC_PDU tr_MNCC_REL_ind(template uint32_t call_id := ?, template MNCC_cause cause := ?,
1411 template charstring fac := *, template MNCC_useruser uu := *) := {
1412 msg_type := MNCC_REL_IND,
1413 u := {
1414 signal := { /* See 24.008 9.3.18 */
1415 callref := call_id,
1416 bearer_cap := omit,
1417 called := omit,
1418 calling := omit,
1419 redirecting := omit,
1420 connected := omit,
1421 cause := cause,
1422 progress := omit,
1423 useruser := uu,
1424 facility := fac,
1425 cccap := omit,
1426 ssversion := omit,
1427 clir_sup := 0,
1428 clir_inv := 0,
1429 signal := omit,
1430 keypad := omit,
1431 more := 0,
1432 notify := 0,
1433 emergency := *,
1434 imsi := ?,
1435 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001436 lchan_mode := ?,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001437 gcr := *,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001438 sdp := *
Harald Welte8b2a2582018-01-16 08:11:42 +01001439 }
1440 }
1441}
Harald Welte90938392018-03-25 16:36:40 +02001442template (value) MNCC_PDU ts_MNCC_REL_ind(uint32_t call_id,
1443 template (value) MNCC_cause cause,
1444 template (omit) charstring fac := omit,
1445 template (omit) MNCC_useruser uu := omit) := {
1446 msg_type := MNCC_REL_IND,
1447 u := {
1448 signal := { /* See 24.008 9.3.18 */
1449 callref := call_id,
1450 bearer_cap := omit,
1451 called := omit,
1452 calling := omit,
1453 redirecting := omit,
1454 connected := omit,
1455 cause := cause,
1456 progress := omit,
1457 useruser := uu,
1458 facility := fac,
1459 cccap := omit,
1460 ssversion := omit,
1461 clir_sup := 0,
1462 clir_inv := 0,
1463 signal := omit,
1464 keypad := omit,
1465 more := 0,
1466 notify := 0,
1467 emergency := omit,
1468 imsi := "",
1469 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001470 lchan_mode := 0,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001471 gcr := omit,
Vadim Yanitskiyf3962742021-10-28 16:09:09 +03001472 sdp := omit
Harald Welte90938392018-03-25 16:36:40 +02001473 }
1474 }
1475}
Harald Welte8b2a2582018-01-16 08:11:42 +01001476
1477/* : MSC <- MNCC: REL.req; indicate to mobile user tat network intents to release MM */
1478template MNCC_PDU ts_MNCC_REL_req(uint32_t call_id, MNCC_cause cause,
1479 template charstring fac := omit, template MNCC_useruser uu := omit) := {
1480 msg_type := MNCC_REL_REQ,
1481 u := {
1482 signal := { /* See 24.008 9.3.18 */
1483 callref := call_id,
1484 bearer_cap := omit,
1485 called := omit,
1486 calling := omit,
1487 redirecting := omit,
1488 connected := omit,
1489 cause := cause,
1490 progress := omit,
1491 useruser := uu,
1492 facility := fac,
1493 cccap := omit,
1494 ssversion := omit,
1495 clir_sup := 0,
1496 clir_inv := 0,
1497 signal := omit,
1498 keypad := omit,
1499 more := 0,
1500 notify := 0,
1501 emergency := omit,
1502 imsi := "",
1503 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001504 lchan_mode := 0,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001505 gcr := omit,
Vadim Yanitskiyf3962742021-10-28 16:09:09 +03001506 sdp := omit
Harald Welte8b2a2582018-01-16 08:11:42 +01001507 }
1508 }
1509}
Harald Welte90938392018-03-25 16:36:40 +02001510template MNCC_PDU tr_MNCC_REL_req(template uint32_t call_id, template MNCC_cause cause := *,
1511 template charstring fac := *, template MNCC_useruser uu := *) := {
1512 msg_type := MNCC_REL_REQ,
1513 u := {
1514 signal := { /* See 24.008 9.3.18 */
1515 callref := call_id,
1516 bearer_cap := omit,
1517 called := *,
1518 calling := *,
1519 redirecting := *,
1520 connected := *,
1521 cause := cause,
1522 progress := omit,
1523 useruser := uu,
1524 facility := fac,
1525 cccap := omit,
1526 ssversion := omit,
1527 clir_sup := 0,
1528 clir_inv := 0,
1529 signal := omit,
1530 keypad := omit,
1531 more := 0,
1532 notify := 0,
1533 emergency := omit,
1534 imsi := ?,
1535 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001536 lchan_mode := 0,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001537 gcr := *,
Oliver Smith81a25462019-11-28 13:40:37 +01001538 sdp := *
Harald Welte90938392018-03-25 16:36:40 +02001539 }
1540 }
1541}
1542
Harald Welte8b2a2582018-01-16 08:11:42 +01001543
1544/* : MSC -> MNCC: REL.cnf; confirm REL_req */
1545template MNCC_PDU tr_MNCC_REL_cnf(template uint32_t call_id := ?, template MNCC_cause cause := ?,
1546 template charstring fac := *, template MNCC_useruser uu := *)
1547modifies tr_MNCC_REL_ind := {
1548 msg_type := MNCC_REL_CNF
1549};
Harald Welte90938392018-03-25 16:36:40 +02001550template (value) MNCC_PDU ts_MNCC_REL_cnf(uint32_t call_id,
1551 template (value) MNCC_cause cause,
1552 template (omit) charstring fac := omit,
1553 template (omit) MNCC_useruser uu := omit)
1554modifies ts_MNCC_REL_ind := {
1555 msg_type := MNCC_REL_CNF
1556};
1557
Harald Welte8b2a2582018-01-16 08:11:42 +01001558
1559/* : MSC <- MNCC: FACILITY.req; request transmission of facility */
1560template MNCC_PDU ts_MNCC_FACILITY_req(uint32_t call_id, charstring fac) := {
1561 msg_type := MNCC_FACILITY_REQ,
1562 u := {
1563 signal := { /* See 24.008 9.3.9 */
1564 callref := call_id,
1565 bearer_cap := omit,
1566 called := omit,
1567 calling := omit,
1568 redirecting := omit,
1569 connected := omit,
1570 cause := omit,
1571 progress := omit,
1572 useruser := omit,
1573 facility := fac,
1574 cccap := omit,
1575 ssversion := omit,
1576 clir_sup := 0,
1577 clir_inv := 0,
1578 signal := omit,
1579 keypad := omit,
1580 more := 0,
1581 notify := 0,
1582 emergency := omit,
1583 imsi := "",
1584 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001585 lchan_mode := 0,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001586 gcr := omit,
Vadim Yanitskiyf3962742021-10-28 16:09:09 +03001587 sdp := omit
Harald Welte8b2a2582018-01-16 08:11:42 +01001588 }
1589 }
1590}
1591
1592/* : MSC -> MNCC: FACILITY.req; indicate reception of facility */
1593template MNCC_PDU tr_MNCC_FACILITY_ind(template uint32_t call_id := ?, template charstring fac := ?) := {
1594 msg_type := MNCC_FACILITY_IND,
1595 u := {
1596 signal := { /* See 24.008 9.3.9 */
1597 callref := call_id,
1598 bearer_cap := omit,
1599 called := omit,
1600 calling := omit,
1601 redirecting := omit,
1602 connected := omit,
1603 cause := omit,
1604 progress := omit,
1605 useruser := omit,
1606 facility := fac,
1607 cccap := omit,
1608 ssversion := omit,
1609 clir_sup := 0,
1610 clir_inv := 0,
1611 signal := omit,
1612 keypad := omit,
1613 more := 0,
1614 notify := 0,
1615 emergency := *,
1616 imsi := ?,
1617 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001618 lchan_mode := ?,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001619 gcr := *,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001620 sdp := *
Harald Welte8b2a2582018-01-16 08:11:42 +01001621 }
1622 }
1623}
1624
1625/* : MSC -> MNCC: START_DTMF.ind; MS has */
1626template MNCC_PDU tr_MNCC_START_DTMF_ind(template uint32_t call_id := ?, template MNCC_keypad keypad := ?) := {
1627 msg_type := MNCC_START_DTMF_IND,
1628 u := {
1629 signal := { /* See 24.008 9.3.24 */
1630 callref := call_id,
1631 bearer_cap := omit,
1632 called := omit,
1633 calling := omit,
1634 redirecting := omit,
1635 connected := omit,
1636 cause := omit,
1637 progress := omit,
1638 useruser := omit,
1639 facility := omit,
1640 cccap := omit,
1641 ssversion := omit,
1642 clir_sup := 0,
1643 clir_inv := 0,
1644 signal := omit,
1645 keypad := keypad,
1646 more := 0,
1647 notify := 0,
1648 emergency := *,
1649 imsi := ?,
1650 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001651 lchan_mode := ?,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001652 gcr := *,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001653 sdp := *
Harald Welte8b2a2582018-01-16 08:11:42 +01001654 }
1655 }
1656}
1657
1658/* : MSC <- MNCC: START_DTMF.rsp; Acknowledge start of DTMF */
1659template MNCC_PDU ts_MNCC_START_DTMF_rsp(uint32_t call_id, MNCC_keypad keypad) := {
1660 msg_type := MNCC_START_DTMF_RSP,
1661 u := {
1662 signal := { /* See 24.008 9.3.25 */
1663 callref := call_id,
1664 bearer_cap := omit,
1665 called := omit,
1666 calling := omit,
1667 redirecting := omit,
1668 connected := omit,
1669 cause := omit,
1670 progress := omit,
1671 useruser := omit,
1672 facility := omit,
1673 cccap := omit,
1674 ssversion := omit,
1675 clir_sup := 0,
1676 clir_inv := 0,
1677 signal := omit,
1678 keypad := keypad,
1679 more := 0,
1680 notify := 0,
1681 emergency := omit,
1682 imsi := "",
1683 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001684 lchan_mode := 0,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001685 gcr := omit,
Vadim Yanitskiyf3962742021-10-28 16:09:09 +03001686 sdp := omit
Harald Welte8b2a2582018-01-16 08:11:42 +01001687 }
1688 }
1689}
1690
1691/* : MSC <- MNCC: START_DTMF.rsp; Acknowledge start of DTMF */
1692template MNCC_PDU ts_MNCC_START_DTMF_rej(uint32_t call_id, MNCC_cause cause) := {
1693 msg_type := MNCC_START_DTMF_REJ,
1694 u := {
1695 signal := { /* See 24.008 9.3.26 */
1696 callref := call_id,
1697 bearer_cap := omit,
1698 called := omit,
1699 calling := omit,
1700 redirecting := omit,
1701 connected := omit,
1702 cause := cause,
1703 progress := omit,
1704 useruser := omit,
1705 facility := omit,
1706 cccap := omit,
1707 ssversion := omit,
1708 clir_sup := 0,
1709 clir_inv := 0,
1710 signal := omit,
1711 keypad := omit,
1712 more := 0,
1713 notify := 0,
1714 emergency := omit,
1715 imsi := "",
1716 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001717 lchan_mode := 0,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001718 gcr := omit,
Vadim Yanitskiyf3962742021-10-28 16:09:09 +03001719 sdp := omit
Harald Welte8b2a2582018-01-16 08:11:42 +01001720 }
1721 }
1722}
1723
1724/* : MSC -> MNCC: STOP_DTMF.ind */
1725template MNCC_PDU tr_MNCC_STOP_DTMF_ind(template uint32_t call_id := ?) :=
1726 tr_MNCC_SIMPLE(MNCC_STOP_DTMF_IND, call_id); /* See 24.008 9.3.29 */
1727
1728/* : MSC <- MNCC: STOP_DTMF.rsp; Acknowledge stop of DTMF */
1729template MNCC_PDU ts_MNCC_STOP_DTMF_rsp(uint32_t call_id) :=
1730 ts_MNCC_SIMPLE(MNCC_STOP_DTMF_RSP, call_id); /* See 24.008 9.3.30 */
1731
1732/* : MSC -> MNCC: MODIFY.ind; request to start MO in-call modification */
1733template MNCC_PDU tr_MNCC_MODIFY_ind(template uint32_t call_id := ?, template MNCC_bearer_cap bcap := ?) := {
1734 msg_type := MNCC_MODIFY_IND,
1735 u := {
1736 signal := { /* See 24.008 9.3.14 */
1737 callref := call_id,
1738 bearer_cap := bcap,
1739 called := omit,
1740 calling := omit,
1741 redirecting := omit,
1742 connected := omit,
1743 cause := omit,
1744 progress := omit,
1745 useruser := omit,
1746 facility := omit,
1747 cccap := omit,
1748 ssversion := omit,
1749 clir_sup := 0,
1750 clir_inv := 0,
1751 signal := omit,
1752 keypad := omit,
1753 more := 0,
1754 notify := 0,
1755 emergency := *,
1756 imsi := ?,
1757 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001758 lchan_mode := ?,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001759 gcr := *,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001760 sdp := *
Harald Welte8b2a2582018-01-16 08:11:42 +01001761 }
1762 }
1763}
1764
1765/* : MSC <- MNCC: MODIFY.rsp; tespond to MO in-call modification */
1766template MNCC_PDU ts_MNCC_MODIFY_rsp(uint32_t call_id, MNCC_bearer_cap bcap) := {
1767 msg_type := MNCC_MODIFY_RSP,
1768 u := {
1769 signal := { /* See 24.008 9.3.14 */
1770 callref := call_id,
1771 bearer_cap := bcap,
1772 called := omit,
1773 calling := omit,
1774 redirecting := omit,
1775 connected := omit,
1776 cause := omit,
1777 progress := omit,
1778 useruser := omit,
1779 facility := omit,
1780 cccap := omit,
1781 ssversion := omit,
1782 clir_sup := 0,
1783 clir_inv := 0,
1784 signal := omit,
1785 keypad := omit,
1786 more := 0,
1787 notify := 0,
1788 emergency := omit,
1789 imsi := "",
1790 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001791 lchan_mode := 0,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001792 gcr := omit,
Vadim Yanitskiyf3962742021-10-28 16:09:09 +03001793 sdp := omit
Harald Welte8b2a2582018-01-16 08:11:42 +01001794 }
1795 }
1796}
1797
1798/* : MSC <- MNCC: MODIFY.req; request to start MT in-call modification */
1799template MNCC_PDU ts_MNCC_MODIFY_req(uint32_t call_id, MNCC_bearer_cap bcap) := {
1800 msg_type := MNCC_MODIFY_REQ,
1801 u := {
1802 signal := { /* See 24.008 9.3.14 */
1803 callref := call_id,
1804 bearer_cap := bcap,
1805 called := omit,
1806 calling := omit,
1807 redirecting := omit,
1808 connected := omit,
1809 cause := omit,
1810 progress := omit,
1811 useruser := omit,
1812 facility := omit,
1813 cccap := omit,
1814 ssversion := omit,
1815 clir_sup := 0,
1816 clir_inv := 0,
1817 signal := omit,
1818 keypad := omit,
1819 more := 0,
1820 notify := 0,
1821 emergency := omit,
1822 imsi := "",
1823 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001824 lchan_mode := 0,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001825 gcr := omit,
Vadim Yanitskiyf3962742021-10-28 16:09:09 +03001826 sdp := omit
Harald Welte8b2a2582018-01-16 08:11:42 +01001827 }
1828 }
1829}
1830
1831/* : MSC -> MNCC: MODIFY.cnf; MS has responded to MT in-call modification */
1832template MNCC_PDU tr_MNCC_MODIFY_cnf(template uint32_t call_id := ?,
1833 template MNCC_bearer_cap bcap := ?) := {
1834 msg_type := MNCC_MODIFY_CNF,
1835 u := {
1836 signal := { /* See 24.008 9.3.14 */
1837 callref := call_id,
1838 bearer_cap := bcap,
1839 called := omit,
1840 calling := omit,
1841 redirecting := omit,
1842 connected := omit,
1843 cause := omit,
1844 progress := omit,
1845 useruser := omit,
1846 facility := omit,
1847 cccap := omit,
1848 ssversion := omit,
1849 clir_sup := 0,
1850 clir_inv := 0,
1851 signal := omit,
1852 keypad := omit,
1853 more := 0,
1854 notify := 0,
1855 emergency := *,
1856 imsi := ?,
1857 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001858 lchan_mode := ?,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001859 gcr := *,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001860 sdp := *
Harald Welte8b2a2582018-01-16 08:11:42 +01001861 }
1862 }
1863}
1864
1865/* : MSC <- MNCC: Request transmission of USERINFO to MS */
1866template MNCC_PDU ts_MNCC_USERINFO_req(uint32_t call_id, MNCC_useruser uu, integer more) := {
1867 msg_type := MNCC_USERINFO_REQ,
1868 u := {
1869 signal := { /* See 24.008 9.3.31 */
1870 callref := call_id,
1871 bearer_cap := omit,
1872 called := omit,
1873 calling := omit,
1874 redirecting := omit,
1875 connected := omit,
1876 cause := omit,
1877 progress := omit,
1878 useruser := uu,
1879 facility := omit,
1880 cccap := omit,
1881 ssversion := omit,
1882 clir_sup := 0,
1883 clir_inv := 0,
1884 signal := omit,
1885 keypad := omit,
1886 more := more,
1887 notify := 0,
1888 emergency := omit,
1889 imsi := "",
1890 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001891 lchan_mode := 0,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001892 gcr := omit,
Vadim Yanitskiyf3962742021-10-28 16:09:09 +03001893 sdp := omit
Harald Welte8b2a2582018-01-16 08:11:42 +01001894 }
1895 }
1896}
1897
1898/* : MSC -> MNCC: Indicate reception of USERINFO from MS */
1899template MNCC_PDU tr_MNCC_USERINFO_ind(template uint32_t call_id := ?, template MNCC_useruser uu := ?,
1900 integer more) := {
1901 msg_type := MNCC_USERINFO_IND,
1902 u := {
1903 signal := { /* See 24.008 9.3.31 */
1904 callref := call_id,
1905 bearer_cap := omit,
1906 called := omit,
1907 calling := omit,
1908 redirecting := omit,
1909 connected := omit,
1910 cause := omit,
1911 progress := omit,
1912 useruser := uu,
1913 facility := omit,
1914 cccap := omit,
1915 ssversion := omit,
1916 clir_sup := 0,
1917 clir_inv := 0,
1918 signal := omit,
1919 keypad := omit,
1920 more := more,
1921 notify := 0,
1922 emergency := omit,
1923 imsi := "",
1924 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001925 lchan_mode := 0,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001926 gcr := *,
Oliver Smith81a25462019-11-28 13:40:37 +01001927 sdp := *
Harald Welte8b2a2582018-01-16 08:11:42 +01001928 }
1929 }
1930}
1931
1932/* : MSC -> MNCC: HOLD.ind; MS requests hold of call */
1933template MNCC_PDU tr_MNCC_HOLD_ind(template uint32_t call_id := ?) :=
1934 tr_MNCC_SIMPLE(MNCC_HOLD_IND, call_id); /* See 24.008 9.3.10 */
1935
1936/* : MSC <- MNCC: HOLD.cnf; network confirms hold of call */
1937template MNCC_PDU ts_MNCC_HOLD_cnf(uint32_t call_id) :=
1938 ts_MNCC_SIMPLE(MNCC_HOLD_CNF, call_id); /* See 24.008 9.3.11 */
1939
1940/* : MSC <- MNCC: HOLD.rej; network rejects hold of call */
1941template MNCC_PDU ts_MNCC_HOLD_rej(uint32_t call_id, MNCC_cause cause) := {
1942 msg_type := MNCC_HOLD_REJ,
1943 u := {
1944 signal := { /* See 24.008 9.3.12 */
1945 callref := call_id,
1946 bearer_cap := omit,
1947 called := omit,
1948 calling := omit,
1949 redirecting := omit,
1950 connected := omit,
1951 cause := cause,
1952 progress := omit,
1953 useruser := omit,
1954 facility := omit,
1955 cccap := omit,
1956 ssversion := omit,
1957 clir_sup := 0,
1958 clir_inv := 0,
1959 signal := omit,
1960 keypad := omit,
1961 more := 0,
1962 notify := 0,
1963 emergency := omit,
1964 imsi := "",
1965 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001966 lchan_mode := 0,
Vadim Yanitskiy9ff47802021-10-28 14:55:58 +03001967 gcr := omit,
Vadim Yanitskiyf3962742021-10-28 16:09:09 +03001968 sdp := omit
Harald Welte8b2a2582018-01-16 08:11:42 +01001969 }
1970 }
1971}
1972
1973/* : MSC -> MNCC: RETRIEVE.ind; MS requests retrieval of held call */
1974template MNCC_PDU tr_MNCC_RETRIEVE_ind(template uint32_t call_id := ?) :=
1975 tr_MNCC_SIMPLE(MNCC_RETRIEVE_IND, call_id); /* See 24.008 9.3.20 */
1976
1977/* : MSC <- MNCC: RETRIEVE.cnf; network confirms retrieve of call */
1978template MNCC_PDU ts_MNCC_RETRIEVE_cnf(uint32_t call_id) :=
1979 ts_MNCC_SIMPLE(MNCC_RETRIEVE_CNF, call_id); /* See 24.008 9.3.21 */
1980
1981/* : MSC <- MNCC: RETRIEVE.rej; network rejects retrieve of call */
1982template MNCC_PDU ts_MNCC_RETRIEVE_rej(uint32_t call_id, MNCC_cause cause)
1983modifies ts_MNCC_HOLD_rej := { /* See 24.008 9.3.22 */
1984 msg_type := MNCC_RETRIEVE_REJ
1985}
1986
1987
1988template MNCC_PDU ts_MNCC_SIMPLE_RTP(MNCC_MsgType msg_type, uint32_t call_id) := {
1989 msg_type := msg_type,
1990 u := {
1991 rtp := {
1992 callref := call_id,
Pau Espin Pedrol563b3d02020-09-09 20:19:52 +02001993 is_ipv6 := false,
1994 ip := '00000000'O,
Harald Welte8b2a2582018-01-16 08:11:42 +01001995 rtp_port := 0,
1996 payload_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001997 payload_msg_type := 0,
Vadim Yanitskiyf3962742021-10-28 16:09:09 +03001998 sdp := omit
Harald Welte8b2a2582018-01-16 08:11:42 +01001999 }
2000 }
2001}
2002
2003/* MSC <- MNCC: RTP_CREATE.req; request creation of RTP */
2004template MNCC_PDU ts_MNCC_RTP_CREATE(uint32_t call_id) := ts_MNCC_SIMPLE_RTP(MNCC_RTP_CREATE, call_id);
2005
2006/* MSC -> MNCC: RTP_CREATE.rsp; acknowledge creation of RTP (stating MSC side IP/Port) */
Neels Hofmeyr2ca1ab42019-03-08 03:45:43 +01002007template MNCC_PDU tr_MNCC_RTP_CREATE(template uint32_t call_id := ?,
Pau Espin Pedrol563b3d02020-09-09 20:19:52 +02002008 template octetstring ip := ?,
2009 template uint16_t rtp_port := ?,
Neels Hofmeyr2ca1ab42019-03-08 03:45:43 +01002010 template uint32_t payload_type := ?) := {
Harald Welte8b2a2582018-01-16 08:11:42 +01002011 msg_type := MNCC_RTP_CREATE,
2012 u := {
2013 rtp := {
2014 callref := call_id,
Pau Espin Pedrol563b3d02020-09-09 20:19:52 +02002015 is_ipv6 := ?,
Neels Hofmeyr2ca1ab42019-03-08 03:45:43 +01002016 ip := ip,
2017 rtp_port := rtp_port,
2018 payload_type := payload_type,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01002019 payload_msg_type := ?,
2020 sdp := *
Harald Welte8b2a2582018-01-16 08:11:42 +01002021 }
2022 }
2023}
2024
2025/* MSC <- MNCC: RTP_CONNECT.req; request connect of RTP */
Pau Espin Pedrol563b3d02020-09-09 20:19:52 +02002026template 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 +01002027 msg_type := MNCC_RTP_CONNECT,
2028 u := {
2029 rtp := {
2030 callref := call_id,
Pau Espin Pedrol563b3d02020-09-09 20:19:52 +02002031 is_ipv6 := is_ipv6,
Harald Welte8b2a2582018-01-16 08:11:42 +01002032 ip := ip,
2033 rtp_port := rtp_port,
2034 payload_type := pt,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01002035 payload_msg_type := 0,
Vadim Yanitskiyf3962742021-10-28 16:09:09 +03002036 sdp := omit
Harald Welte8b2a2582018-01-16 08:11:42 +01002037 }
2038 }
2039}
Harald Welteb0d93602018-03-20 18:09:34 +01002040template MNCC_PDU tr_MNCC_RTP_CONNECT(template uint32_t call_id,
Pau Espin Pedrol563b3d02020-09-09 20:19:52 +02002041 template octetstring ip := ?,
2042 template uint16_t rtp_port := ?,
Harald Welteb0d93602018-03-20 18:09:34 +01002043 template uint32_t pt := ?) := {
2044 msg_type := MNCC_RTP_CONNECT,
2045 u := {
2046 rtp := {
2047 callref := call_id,
Pau Espin Pedrol563b3d02020-09-09 20:19:52 +02002048 is_ipv6 := ?,
Harald Welteb0d93602018-03-20 18:09:34 +01002049 ip := ip,
2050 rtp_port := rtp_port,
2051 payload_type := pt,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01002052 payload_msg_type := 0,
Oliver Smith81a25462019-11-28 13:40:37 +01002053 sdp := *
Harald Welteb0d93602018-03-20 18:09:34 +01002054 }
2055 }
2056}
2057
Harald Welte8b2a2582018-01-16 08:11:42 +01002058
2059/* MSC <- MNCC: RTP_FREE.req; request connect of RTP */
2060template 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 +01002061
Harald Welte251b52b2018-01-17 13:58:16 +01002062function f_mncc_get_call_id(MNCC_PDU pdu) return uint32_t {
2063 if (ischosen(pdu.u.rtp)) {
2064 return pdu.u.rtp.callref;
2065 } else if (ischosen(pdu.u.data)) {
2066 return pdu.u.data.callref;
2067 } else if (ischosen(pdu.u.signal)) {
2068 return pdu.u.signal.callref;
2069 } else {
2070 setverdict(fail, "Unable to determine Callref for MNCC", pdu);
Daniel Willmanne4ff5372018-07-05 17:35:03 +02002071 mtc.stop
Harald Welte251b52b2018-01-17 13:58:16 +01002072 }
2073}
2074
Harald Welte474fd7d2017-12-29 16:01:39 +01002075} with { encode "RAW" ; variant "FIELDORDER(msb)" }