blob: 5296579185b63fd9cef51b34b492d4b6e63e596c [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
365 charstring sdp optional
Harald Welte474fd7d2017-12-29 16:01:39 +0100366};
367
368
369type record MNCC_PDU_Data {
370 uint32_t callref,
371 octetstring data
372};
373
374type record MNCC_PDU_Rtp {
375 uint32_t callref,
376 uint32_t ip,
377 uint16_t rtp_port,
378 uint32_t payload_type,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100379 uint32_t payload_msg_type,
380
381 charstring sdp optional
Harald Welte474fd7d2017-12-29 16:01:39 +0100382};
383
384type record MNCC_PDU_Hello {
385 uint32_t version,
386 uint32_t mncc_size,
387 uint32_t data_frame_size,
388 uint32_t called_offset,
389 uint32_t signal_offset,
390 uint32_t emergency_offset,
391 uint32_t lchan_type_offset
392};
393
394
395type union MNCC_MsgUnion {
396 MNCC_PDU_Signal signal,
397 MNCC_PDU_Data data,
398 MNCC_PDU_Rtp rtp,
399 MNCC_PDU_Hello hello
400};
401
402
403type record MNCC_PDU {
404 MNCC_MsgType msg_type,
405 MNCC_MsgUnion u
406} with { variant (u) "CROSSTAG(
407 hello, msg_type = MNCC_SOCKET_HELLO;
408 rtp, { msg_type = MNCC_RTP_CREATE,
409 msg_type = MNCC_RTP_CONNECT,
410 msg_type = MNCC_RTP_FREE };
411 data, { msg_type = GSM_TCHF_FRAME,
412 msg_type = GSM_TCHF_FRAME_EFR,
413 msg_type = GSM_TCHH_FRAME,
414 msg_type = GSM_TCH_FRAME_AMR,
415 msg_type = GSM_BAD_FRAME };
416 signal, OTHERWISE
417 )"
418};
419
420external function enc_MNCC_PDU(in MNCC_PDU pdu) return octetstring;
421
422external function dec_MNCC_PDU(in octetstring stream) return MNCC_PDU;
423
Harald Welte14509532018-03-24 22:32:01 +0100424template (value) MNCC_PDU ts_MNCC_HELLO(uint32_t version := 5) := {
425 msg_type := MNCC_SOCKET_HELLO,
426 u := {
427 hello := {
428 version := version,
429 mncc_size := 836,
430 data_frame_size := 8,
431 called_offset := 104,
432 signal_offset := 796,
433 emergency_offset := 812,
434 lchan_type_offset := 0
435 }
436 }
437}
Harald Welte474fd7d2017-12-29 16:01:39 +0100438
439template MNCC_PDU ts_MNCC_Sign(MNCC_MsgType msg_type, MNCC_PDU_Signal sign) := {
440 msg_type := msg_type,
441 u := {
442 signal := sign
443 }
444}
445
Harald Welte8b2a2582018-01-16 08:11:42 +0100446template MNCC_PDU ts_MNCC_SIMPLE(MNCC_MsgType msg_type, uint32_t call_id) := {
447 msg_type := msg_type,
Harald Welte474fd7d2017-12-29 16:01:39 +0100448 u := {
449 signal := {
450 callref := call_id,
Harald Welte8b2a2582018-01-16 08:11:42 +0100451 bearer_cap := omit,
452 called := omit,
453 calling := omit,
Harald Welte474fd7d2017-12-29 16:01:39 +0100454 redirecting := omit,
455 connected := omit,
456 cause := omit,
457 progress := omit,
458 useruser := omit,
459 facility := omit,
460 cccap := omit,
461 ssversion := omit,
462 clir_sup := 0,
463 clir_inv := 0,
464 signal := omit,
465 keypad := omit,
466 more := 0,
467 notify := 0,
468 emergency := omit,
Harald Welte8b2a2582018-01-16 08:11:42 +0100469 imsi := "",
470 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100471 lchan_mode := 0,
472 sdp := ""
Harald Welte8b2a2582018-01-16 08:11:42 +0100473 }
474 }
475}
476
477template MNCC_PDU tr_MNCC_SIMPLE(template MNCC_MsgType msg_type, template uint32_t call_id) := {
478 msg_type := msg_type,
479 u := {
480 signal := {
481 callref := call_id,
482 bearer_cap := omit,
483 called := omit,
484 calling := omit,
485 redirecting := omit,
486 connected := omit,
487 cause := omit,
488 progress := omit,
489 useruser := omit,
490 facility := omit,
491 cccap := omit,
492 ssversion := omit,
493 clir_sup := 0,
494 clir_inv := 0,
495 signal := omit,
496 keypad := omit,
497 more := 0,
498 notify := 0,
499 emergency := *,
500 imsi := ?,
501 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100502 lchan_mode := ?,
503 sdp := *
Harald Welte8b2a2582018-01-16 08:11:42 +0100504 }
505 }
506}
507
508
509
510/* MT: MSC <- MNCC: SETUP.req from ext. MNCC handler to MSC */
511template MNCC_PDU ts_MNCC_SETUP_req(uint32_t call_id, charstring called, charstring calling, charstring imsi := "") := {
512 msg_type := MNCC_SETUP_REQ,
513 u := {
514 signal := { /* See 24.008 9.3.23.1 */
515 callref := call_id,
516 bearer_cap := ts_MNCC_bcap_voice, /* mandatory */
517 called := valueof(ts_MNCC_number(called)), /* optional */
518 calling := valueof(ts_MNCC_number(calling)), /* optional */
519 redirecting := omit, /* optional */
520 connected := omit,
521 cause := omit,
522 progress := omit, /* optional */
523 useruser := omit, /* optional */
524 facility := omit, /* optional */
525 cccap := omit,
526 ssversion := omit,
527 clir_sup := 0,
528 clir_inv := 0,
529 signal := omit, /* optional */
530 keypad := omit,
531 more := 0,
532 notify := 0,
533 emergency := omit,
534 imsi := imsi,
Harald Welte474fd7d2017-12-29 16:01:39 +0100535 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100536 lchan_mode := 0,
537 sdp := ""
Harald Welte474fd7d2017-12-29 16:01:39 +0100538 }
539 }
540};
Harald Welteb0d93602018-03-20 18:09:34 +0100541template MNCC_PDU tr_MNCC_SETUP_req(template uint32_t call_id := ?,
542 template charstring called := ?,
543 template charstring calling := *,
544 template charstring imsi := ?) := {
545 msg_type := MNCC_SETUP_REQ,
546 u := {
547 signal := { /* See 24.008 9.3.23.1 */
548 callref := call_id,
549 bearer_cap := *, /* mandatory in CC */
550 called := tr_MNCC_number(called), /* optional */
551 calling := tr_MNCC_number(calling), /* optional */
552 redirecting := *, /* optional */
553 connected := omit,
554 cause := omit,
555 progress := *, /* optional */
556 useruser := *, /* optional */
557 facility := *, /* optional */
558 cccap := omit,
559 ssversion := omit,
560 clir_sup := 0,
561 clir_inv := 0,
562 signal := *, /* optional */
563 keypad := omit,
564 more := 0,
565 notify := 0,
566 emergency := *,
567 imsi := imsi,
568 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100569 lchan_mode := ?,
570 sdp := *
Harald Welteb0d93602018-03-20 18:09:34 +0100571 }
572 }
573};
574
Harald Welte474fd7d2017-12-29 16:01:39 +0100575
Harald Welte4017d552018-01-26 21:40:05 +0100576/* MO: MSC <- MNCC: Respons to SETUP.ind */
577template MNCC_PDU ts_MNCC_SETUP_rsp(uint32_t call_id, charstring imsi := "",
578 template MNCC_number connected := omit) := {
Harald Welte8b2a2582018-01-16 08:11:42 +0100579 msg_type := MNCC_SETUP_RSP,
580 u := {
581 signal := { /* See 24.008 9.3.5 */
582 callref := call_id,
583 bearer_cap := omit,
584 called := omit,
585 calling := omit,
586 redirecting := omit,
587 connected := connected,
588 cause := omit,
589 progress := omit,
Harald Welte4017d552018-01-26 21:40:05 +0100590 useruser := omit, /* optional */
591 facility := omit, /* optional */
Harald Welte8b2a2582018-01-16 08:11:42 +0100592 cccap := omit,
Harald Welte4017d552018-01-26 21:40:05 +0100593 ssversion := omit, /* optional */
Harald Welte8b2a2582018-01-16 08:11:42 +0100594 clir_sup := 0,
595 clir_inv := 0,
596 signal := omit,
597 keypad := omit,
598 more := 0,
599 notify := 0,
Harald Welte4017d552018-01-26 21:40:05 +0100600 emergency := omit,
Harald Welte8b2a2582018-01-16 08:11:42 +0100601 imsi := imsi,
Harald Welte4017d552018-01-26 21:40:05 +0100602 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100603 lchan_mode := 0,
604 sdp := ""
Harald Welte8b2a2582018-01-16 08:11:42 +0100605 }
606 }
607};
Harald Welte90938392018-03-25 16:36:40 +0200608template MNCC_PDU tr_MNCC_SETUP_rsp(template uint32_t call_id,
609 template charstring imsi := ?,
610 template MNCC_number connected := *) := {
611 msg_type := MNCC_SETUP_RSP,
612 u := {
613 signal := { /* See 24.008 9.3.5 */
614 callref := call_id,
615 bearer_cap := omit,
616 called := omit,
617 calling := omit,
618 redirecting := omit,
619 connected := connected,
620 cause := omit,
621 progress := omit,
622 useruser := *, /* optional */
623 facility := *, /* optional */
624 cccap := omit,
625 ssversion := *, /* optional */
626 clir_sup := 0,
627 clir_inv := 0,
628 signal := omit,
629 keypad := omit,
630 more := 0,
631 notify := 0,
632 emergency := omit,
633 imsi := imsi,
634 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100635 lchan_mode := ?,
636 sdp := *
Harald Welte90938392018-03-25 16:36:40 +0200637 }
638 }
639};
640
Harald Welte8b2a2582018-01-16 08:11:42 +0100641
642/* MO: MSC -> MNCC: SETUP.ind from MSC to ext. MNCC handler */
643template MNCC_PDU tr_MNCC_SETUP_ind(template uint32_t call_id := ?, template MNCC_number called := ?,
644 template MNCC_number calling := *, template charstring imsi :=?) := {
645 msg_type := MNCC_SETUP_IND,
646 u := {
647 signal := { /* See 24.008 9.3.23.2 */
648 callref := call_id,
649 bearer_cap := ?, /* mandatory */
650 called := called, /* mandatory */
651 calling := calling, /* optional */
652 redirecting := omit,
653 connected := omit,
654 cause := omit,
655 progress := omit,
656 useruser := *, /* optional */
657 facility := *, /* optional */
658 cccap := *, /* optional */
659 ssversion := *, /* optional */
660 clir_sup := ?, /* optional */
661 clir_inv := ?, /* optional */
662 signal := omit,
663 keypad := omit,
664 more := 0,
665 notify := 0,
666 emergency := *,
667 imsi := imsi,
668 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100669 lchan_mode := ?,
670 sdp := *
Harald Welte8b2a2582018-01-16 08:11:42 +0100671 }
672 }
Harald Welteafec4712018-03-19 22:52:17 +0100673}
674template (value) MNCC_PDU ts_MNCC_SETUP_ind(uint32_t call_id, MNCC_number called,
675 template (omit) MNCC_number calling := omit,
676 template (omit) charstring imsi := omit,
677 template (value) MNCC_bearer_cap bcap := ts_MNCC_bcap_voice) := {
678 msg_type := MNCC_SETUP_IND,
679 u := {
680 signal := { /* See 24.008 9.3.23.2 */
681 callref := call_id,
682 bearer_cap := valueof(bcap), /* mandatory */
683 called := called, /* mandatory */
684 calling := calling, /* optional */
685 redirecting := omit,
686 connected := omit,
687 cause := omit,
688 progress := omit,
689 useruser := omit, /* optional */
690 facility := omit, /* optional */
691 cccap := omit, /* optional */
692 ssversion := omit, /* optional */
693 clir_sup := 0, /* optional */
694 clir_inv := 0, /* optional */
695 signal := omit,
696 keypad := omit,
697 more := 0,
698 notify := 0,
699 emergency := omit,
700 imsi := imsi,
701 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100702 lchan_mode := 0,
703 sdp := ""
Harald Welteafec4712018-03-19 22:52:17 +0100704 }
705 }
Harald Welte8b2a2582018-01-16 08:11:42 +0100706}
707
708/* MO: MSC <- MNCC: SETUP.cnf; Response to SETUP.ind */
709template MNCC_PDU ts_MNCC_SETUP_CNF(uint32_t call_id, template MNCC_number connected := omit) := {
710 msg_type := MNCC_SETUP_CNF,
711 u := {
712 signal := { /* See 24.008 9.3.5 */
713 callref := call_id,
714 bearer_cap := omit,
715 called := omit,
716 calling := omit,
717 redirecting := omit,
718 connected := connected,
719 cause := omit,
Harald Welteb0d93602018-03-20 18:09:34 +0100720 progress := omit,
721 useruser := omit,
722 facility := omit,
Harald Welte8b2a2582018-01-16 08:11:42 +0100723 cccap := omit,
724 ssversion := omit,
725 clir_sup := 0,
726 clir_inv := 0,
727 signal := omit,
728 keypad := omit,
729 more := 0,
730 notify := 0,
Harald Welteb0d93602018-03-20 18:09:34 +0100731 emergency := omit,
Harald Welte8b2a2582018-01-16 08:11:42 +0100732 imsi := "",
Harald Welteb0d93602018-03-20 18:09:34 +0100733 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100734 lchan_mode := 0,
735 sdp := ""
Harald Welte8b2a2582018-01-16 08:11:42 +0100736 }
737 }
738}
739
Harald Welte33ec09b2018-02-10 15:34:46 +0100740/* MT: MSC -> MNCC: SETUP.cnf; Response to SETUP.req */
741template MNCC_PDU tr_MNCC_SETUP_cnf(uint32_t call_id, template MNCC_number connected := *) := {
742 msg_type := MNCC_SETUP_CNF,
743 u := {
744 signal := { /* See 24.008 9.3.5 */
745 callref := call_id,
746 bearer_cap := omit,
747 called := omit,
748 calling := omit,
749 redirecting := omit,
750 connected := connected,
751 cause := omit,
752 progress := *,
753 useruser := *,
754 facility := *,
755 cccap := omit,
756 ssversion := omit,
757 clir_sup := 0,
758 clir_inv := 0,
759 signal := omit,
760 keypad := omit,
761 more := 0,
762 notify := 0,
763 emergency := *,
764 imsi := ?,
765 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100766 lchan_mode := ?,
767 sdp := *
Harald Welte33ec09b2018-02-10 15:34:46 +0100768 }
769 }
770}
771
Harald Welte4017d552018-01-26 21:40:05 +0100772/* MT: MSC -> MNCC: SETUP_COMPL.req; request to send CONNECT ACK */
773template MNCC_PDU tr_MNCC_SETUP_COMPL_req(template uint32_t call_id) :=
774 tr_MNCC_SIMPLE(MNCC_SETUP_COMPL_REQ, call_id); /* See 24.008 9.3.6 */
Harald Welte8b2a2582018-01-16 08:11:42 +0100775
776/* MT: MSC -> MNCC: SETUP_COMPL.ind; receipt of CONNECT ACK */
777template MNCC_PDU tr_MNCC_SETUP_COMPL_ind(template uint32_t call_id := ?) :=
778 tr_MNCC_SIMPLE(MNCC_SETUP_COMPL_IND, call_id); /* See 24.008 9.3.6 */
Harald Welte90938392018-03-25 16:36:40 +0200779template (value) MNCC_PDU ts_MNCC_SETUP_COMPL_ind(uint32_t call_id) :=
780 ts_MNCC_SIMPLE(MNCC_SETUP_COMPL_IND, call_id); /* See 24.008 9.3.6 */
Harald Welte8b2a2582018-01-16 08:11:42 +0100781
782/* MT: MSC -> MNCC: REJ.req; reject MT call */
783template MNCC_PDU tr_MNCC_REJ_req(template uint32_t call_id, template MNCC_cause cause := *) := {
784 msg_type := MNCC_REJ_REQ,
785 u := {
786 signal := { /* See 24.008 9.3.19 */
787 callref := call_id,
788 bearer_cap := omit,
789 called := omit,
790 calling := omit,
791 redirecting := omit,
792 connected := omit,
793 cause := cause,
794 progress := omit,
795 useruser := *,
796 facility := *,
797 cccap := omit,
798 ssversion := omit,
799 clir_sup := 0,
800 clir_inv := 0,
801 signal := omit,
802 keypad := omit,
803 more := 0,
804 notify := 0,
805 emergency := omit,
806 imsi := ?,
807 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100808 lchan_mode := ?,
809 sdp := *
Harald Welte8b2a2582018-01-16 08:11:42 +0100810 }
811 }
812}
813
814/* MO: MSC <- MNCC: REJ.ind; reject MO call */
815template MNCC_PDU ts_MNCC_REJ_ind(uint32_t call_id, template MNCC_cause cause := omit) := {
816 msg_type := MNCC_REJ_IND,
817 u := {
818 signal := { /* See 24.008 9.3.19 */
819 callref := call_id,
820 bearer_cap := omit,
821 called := omit,
822 calling := omit,
823 redirecting := omit,
824 connected := omit,
825 cause := cause,
826 progress := omit,
827 useruser := omit,
828 facility := omit,
829 cccap := omit,
830 ssversion := omit,
831 clir_sup := 0,
832 clir_inv := 0,
833 signal := omit,
834 keypad := omit,
835 more := 0,
836 notify := 0,
837 emergency := omit,
838 imsi := "",
839 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100840 lchan_mode := 0,
841 sdp := ""
Harald Welte8b2a2582018-01-16 08:11:42 +0100842 }
843 }
844}
845
Harald Welte812f7a42018-01-27 00:49:18 +0100846/* MT: MSC -> MNCC: CALL_CONF.req; send CALL CONFIRMED to MS */
847template MNCC_PDU tr_MNCC_CALL_CONF_ind(template uint32_t call_id, template MNCC_bearer_cap bcap := *,
848 template MNCC_cause cause := *,
849 template MNCC_cccap cccap := *) := {
Harald Welte8b2a2582018-01-16 08:11:42 +0100850 msg_type := MNCC_CALL_CONF_IND,
851 u := {
852 signal := { /* See 24.008 9.3.2 */
853 callref := call_id,
854 bearer_cap := bcap,
855 called := omit,
856 calling := omit,
857 redirecting := omit,
858 connected := omit,
859 cause := cause,
860 progress := omit,
861 useruser := omit,
862 facility := omit,
863 cccap := cccap,
864 ssversion := omit,
865 clir_sup := 0,
866 clir_inv := 0,
867 signal := omit,
868 keypad := omit,
869 more := 0,
870 notify := 0,
871 emergency := omit,
Harald Welte812f7a42018-01-27 00:49:18 +0100872 imsi := ?,
873 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100874 lchan_mode := ?,
875 sdp := *
Harald Welte8b2a2582018-01-16 08:11:42 +0100876 }
877 }
878}
Harald Welteb0d93602018-03-20 18:09:34 +0100879template MNCC_PDU ts_MNCC_CALL_CONF_ind(uint32_t call_id,
880 template (omit) MNCC_bearer_cap bcap := omit,
881 template (omit) MNCC_cause cause := omit,
882 template (omit) MNCC_cccap cccap := omit) := {
883 msg_type := MNCC_CALL_CONF_IND,
884 u := {
885 signal := { /* See 24.008 9.3.2 */
886 callref := call_id,
887 bearer_cap := bcap,
888 called := omit,
889 calling := omit,
890 redirecting := omit,
891 connected := omit,
892 cause := cause,
893 progress := omit,
894 useruser := omit,
895 facility := omit,
896 cccap := cccap,
897 ssversion := omit,
898 clir_sup := 0,
899 clir_inv := 0,
900 signal := omit,
901 keypad := omit,
902 more := 0,
903 notify := 0,
904 emergency := omit,
905 imsi := "",
906 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100907 lchan_mode := 0,
908 sdp := ""
Harald Welteb0d93602018-03-20 18:09:34 +0100909 }
910 }
911}
912
Harald Welte8b2a2582018-01-16 08:11:42 +0100913
914/* MO: MSC <- MNCC: CALL_PROC.req; call establishment initiated in network */
915template MNCC_PDU ts_MNCC_CALL_PROC_req(uint32_t call_id, template MNCC_bearer_cap bcap := omit,
916 template MNCC_progress prog := omit,
917 template charstring fac := omit,
918 template MNCC_cccap cccap := omit) := {
919 msg_type := MNCC_CALL_PROC_REQ,
920 u := {
921 signal := { /* See 24.008 9.3.2 */
922 callref := call_id,
923 bearer_cap := bcap,
924 called := omit,
925 calling := omit,
926 redirecting := omit,
927 connected := omit,
928 cause := omit,
929 progress := prog,
930 useruser := omit,
931 facility := fac,
932 cccap := cccap,
933 ssversion := omit,
934 clir_sup := 0,
935 clir_inv := 0,
936 signal := omit,
937 keypad := omit,
938 more := 0,
939 notify := 0,
940 emergency := omit,
941 imsi := "",
942 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100943 lchan_mode := 0,
944 sdp := ""
Harald Welte8b2a2582018-01-16 08:11:42 +0100945 }
946 }
947}
Harald Welte90938392018-03-25 16:36:40 +0200948template MNCC_PDU tr_MNCC_CALL_PROC_req(template uint32_t call_id,
949 template MNCC_bearer_cap bcap := *,
950 template MNCC_progress prog := *,
951 template charstring fac := *,
952 template MNCC_cccap cccap := *) := {
953 msg_type := MNCC_CALL_PROC_REQ,
954 u := {
955 signal := { /* See 24.008 9.3.2 */
956 callref := call_id,
957 bearer_cap := bcap,
958 called := omit,
959 calling := omit,
960 redirecting := omit,
961 connected := omit,
962 cause := omit,
963 progress := prog,
964 useruser := omit,
965 facility := fac,
966 cccap := cccap,
967 ssversion := omit,
968 clir_sup := 0,
969 clir_inv := 0,
970 signal := omit,
971 keypad := omit,
972 more := 0,
973 notify := 0,
974 emergency := omit,
975 imsi := ?,
976 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +0100977 lchan_mode := ?,
978 sdp := *
Harald Welte90938392018-03-25 16:36:40 +0200979 }
980 }
981}
982
Harald Welte8b2a2582018-01-16 08:11:42 +0100983
984/* MSC <- MNCC: PROGRESS.req; PROGRESS message from ISDN */
985template MNCC_PDU ts_MNCC_PROGRESS_req(uint32_t call_id, MNCC_progress prog,
986 template MNCC_useruser uu := omit) := {
987 msg_type := MNCC_PROGRESS_REQ,
988 u := {
989 signal := { /* See 24.008 9.3.17 */
990 callref := call_id,
991 bearer_cap := omit,
992 called := omit,
993 calling := omit,
994 redirecting := omit,
995 connected := omit,
996 cause := omit,
997 progress := prog,
998 useruser := uu,
999 facility := omit,
1000 cccap := omit,
1001 ssversion := omit,
1002 clir_sup := 0,
1003 clir_inv := 0,
1004 signal := omit,
1005 keypad := omit,
1006 more := 0,
1007 notify := 0,
1008 emergency := omit,
1009 imsi := "",
1010 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001011 lchan_mode := 0,
1012 sdp := ""
Harald Welte8b2a2582018-01-16 08:11:42 +01001013 }
1014 }
1015}
1016
1017/* MO: MSC <- MNCC: ALERT.req; indicate that user alerting has been initiated */
1018template MNCC_PDU ts_MNCC_ALERT_req(uint32_t call_id, template MNCC_progress prog := omit,
1019 template charstring fac := omit,
1020 template MNCC_useruser uu := omit) := {
1021 msg_type := MNCC_ALERT_REQ,
1022 u := {
1023 signal := { /* See 24.008 9.3.1 */
1024 callref := call_id,
1025 bearer_cap := omit,
1026 called := omit,
1027 calling := omit,
1028 redirecting := omit,
1029 connected := omit,
1030 cause := omit,
1031 progress := prog,
1032 useruser := uu,
1033 facility := fac,
1034 cccap := omit,
1035 ssversion := omit,
1036 clir_sup := 0,
1037 clir_inv := 0,
1038 signal := omit,
1039 keypad := omit,
1040 more := 0,
1041 notify := 0,
1042 emergency := omit,
1043 imsi := "",
1044 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001045 lchan_mode := 0,
1046 sdp := ""
Harald Welte8b2a2582018-01-16 08:11:42 +01001047 }
1048 }
1049}
Harald Welte90938392018-03-25 16:36:40 +02001050template MNCC_PDU tr_MNCC_ALERT_req(template uint32_t call_id,
1051 template MNCC_progress prog := *,
1052 template charstring fac := *,
1053 template MNCC_useruser uu := *) := {
1054 msg_type := MNCC_ALERT_REQ,
1055 u := {
1056 signal := { /* See 24.008 9.3.1 */
1057 callref := call_id,
1058 bearer_cap := omit,
1059 called := omit,
1060 calling := omit,
1061 redirecting := omit,
1062 connected := omit,
1063 cause := omit,
1064 progress := prog,
1065 useruser := uu,
1066 facility := fac,
1067 cccap := omit,
1068 ssversion := omit,
1069 clir_sup := 0,
1070 clir_inv := 0,
1071 signal := omit,
1072 keypad := omit,
1073 more := 0,
1074 notify := 0,
1075 emergency := omit,
1076 imsi := ?,
1077 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001078 lchan_mode := ?,
1079 sdp := *
Harald Welte90938392018-03-25 16:36:40 +02001080 }
1081 }
1082}
1083
Harald Welte8b2a2582018-01-16 08:11:42 +01001084
1085
1086/* MT: MSC -> MNCC: ALERRT.ind; indicates that mobile user alerting has been initiated */
1087template MNCC_PDU tr_MNCC_ALERT_ind(template uint32_t call_id, template MNCC_progress prog := omit,
1088 template charstring fac := omit,
1089 template MNCC_useruser uu := omit) := {
Harald Welte33ec09b2018-02-10 15:34:46 +01001090 msg_type := MNCC_ALERT_IND,
Harald Welte8b2a2582018-01-16 08:11:42 +01001091 u := {
1092 signal := { /* See 24.008 9.3.1 */
1093 callref := call_id,
1094 bearer_cap := omit,
1095 called := omit,
1096 calling := omit,
1097 redirecting := omit,
1098 connected := omit,
1099 cause := omit,
1100 progress := prog,
1101 useruser := uu,
1102 facility := fac,
1103 cccap := omit,
1104 ssversion := omit,
1105 clir_sup := 0,
1106 clir_inv := 0,
1107 signal := omit,
1108 keypad := omit,
1109 more := 0,
1110 notify := 0,
1111 emergency := *,
1112 imsi := ?,
1113 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001114 lchan_mode := ?,
1115 sdp := *
Harald Welte8b2a2582018-01-16 08:11:42 +01001116 }
1117 }
1118}
Harald Welteb0d93602018-03-20 18:09:34 +01001119template (value) MNCC_PDU ts_MNCC_ALERT_ind(uint32_t call_id,
1120 template (omit) MNCC_progress prog := omit,
1121 template (omit) charstring fac := omit,
1122 template (omit) MNCC_useruser uu := omit) := {
1123 msg_type := MNCC_ALERT_IND,
1124 u := {
1125 signal := { /* See 24.008 9.3.1 */
1126 callref := call_id,
1127 bearer_cap := omit,
1128 called := omit,
1129 calling := omit,
1130 redirecting := omit,
1131 connected := omit,
1132 cause := omit,
1133 progress := prog,
1134 useruser := uu,
1135 facility := fac,
1136 cccap := omit,
1137 ssversion := omit,
1138 clir_sup := 0,
1139 clir_inv := 0,
1140 signal := omit,
1141 keypad := omit,
1142 more := 0,
1143 notify := 0,
1144 emergency := omit,
1145 imsi := "",
1146 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001147 lchan_mode := 0,
1148 sdp := ""
Harald Welteb0d93602018-03-20 18:09:34 +01001149 }
1150 }
1151}
1152
Harald Welte8b2a2582018-01-16 08:11:42 +01001153
1154/* : MSC <- MNCC: NOTIFY.req; request to send information pertaining to a call (such as user suspended) */
1155template MNCC_PDU ts_MNCC_NOTIFY_req(uint32_t call_id, MNCC_notify notify) := {
1156 msg_type := MNCC_NOTIFY_REQ,
1157 u := {
1158 signal := { /* See 24.008 9.3.16 */
1159 callref := call_id,
1160 bearer_cap := omit,
1161 called := omit,
1162 calling := omit,
1163 redirecting := omit,
1164 connected := omit,
1165 cause := omit,
1166 progress := omit,
1167 useruser := omit,
1168 facility := omit,
1169 cccap := omit,
1170 ssversion := omit,
1171 clir_sup := 0,
1172 clir_inv := 0,
1173 signal := omit,
1174 keypad := omit,
1175 more := 0,
1176 notify := notify,
1177 emergency := omit,
1178 imsi := "",
1179 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001180 lchan_mode := 0,
1181 sdp := ""
Harald Welte8b2a2582018-01-16 08:11:42 +01001182 }
1183 }
1184}
1185
1186/* : MSC -> MNCC: NOTIFY.ind; indication to the mobile user */
1187template MNCC_PDU tr_MNCC_NOTIFY_ind(template uint32_t call_id, template MNCC_notify notify) := {
1188 msg_type := MNCC_NOTIFY_IND,
1189 u := {
1190 signal := { /* See 24.008 9.3.16 */
1191 callref := call_id,
1192 bearer_cap := omit,
1193 called := omit,
1194 calling := omit,
1195 redirecting := omit,
1196 connected := omit,
1197 cause := omit,
1198 progress := omit,
1199 useruser := omit,
1200 facility := omit,
1201 cccap := omit,
1202 ssversion := omit,
1203 clir_sup := 0,
1204 clir_inv := 0,
1205 signal := omit,
1206 keypad := omit,
1207 more := 0,
1208 notify := notify,
1209 emergency := *,
1210 imsi := ?,
1211 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001212 lchan_mode := ?,
1213 sdp := *
Harald Welte8b2a2582018-01-16 08:11:42 +01001214 }
1215 }
1216}
1217
1218/* : MSC -> MNCC: DISC.ind; mobile user requests disconnect */
1219template MNCC_PDU tr_MNCC_DISC_ind(template uint32_t call_id := ?, template MNCC_cause cause := ?,
1220 template MNCC_progress prog := *,
1221 template charstring fac := *,
1222 template MNCC_useruser uu := *) := {
1223 msg_type := MNCC_DISC_IND,
1224 u := {
1225 signal := { /* See 24.008 9.3.7 */
1226 callref := call_id,
1227 bearer_cap := omit,
1228 called := omit,
1229 calling := omit,
1230 redirecting := omit,
1231 connected := omit,
1232 cause := cause,
1233 progress := prog,
1234 useruser := uu,
1235 facility := fac,
1236 cccap := omit,
1237 ssversion := omit,
1238 clir_sup := 0,
1239 clir_inv := 0,
1240 signal := omit,
1241 keypad := omit,
1242 more := 0,
1243 notify := 0,
1244 emergency := *,
1245 imsi := ?,
1246 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001247 lchan_mode := ?,
1248 sdp := *
Harald Welte8b2a2582018-01-16 08:11:42 +01001249 }
1250 }
1251}
Harald Welte90938392018-03-25 16:36:40 +02001252template (value) MNCC_PDU ts_MNCC_DISC_ind(uint32_t call_id, template (value) MNCC_cause cause,
1253 template (omit) MNCC_progress prog := omit,
1254 template (omit) charstring fac := omit,
1255 template (omit) MNCC_useruser uu := omit) := {
1256 msg_type := MNCC_DISC_IND,
1257 u := {
1258 signal := { /* See 24.008 9.3.7 */
1259 callref := call_id,
1260 bearer_cap := omit,
1261 called := omit,
1262 calling := omit,
1263 redirecting := omit,
1264 connected := omit,
1265 cause := cause,
1266 progress := prog,
1267 useruser := uu,
1268 facility := fac,
1269 cccap := omit,
1270 ssversion := omit,
1271 clir_sup := 0,
1272 clir_inv := 0,
1273 signal := omit,
1274 keypad := omit,
1275 more := 0,
1276 notify := 0,
1277 emergency := omit,
1278 imsi := "",
1279 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001280 lchan_mode := 0,
1281 sdp := ""
Harald Welte90938392018-03-25 16:36:40 +02001282 }
1283 }
1284}
Harald Welte8b2a2582018-01-16 08:11:42 +01001285
1286/* : MSC <- MNCC: DISC.req; indicate disconnect to mobile user */
1287template MNCC_PDU ts_MNCC_DISC_req(uint32_t call_id, MNCC_cause cause,
1288 template MNCC_progress prog := omit,
1289 template charstring fac := omit,
1290 template MNCC_useruser uu := omit) := {
1291 msg_type := MNCC_DISC_REQ,
1292 u := {
1293 signal := { /* See 24.008 9.3.7 */
1294 callref := call_id,
1295 bearer_cap := omit,
1296 called := omit,
1297 calling := omit,
1298 redirecting := omit,
1299 connected := omit,
1300 cause := cause,
1301 progress := prog,
1302 useruser := uu,
1303 facility := fac,
1304 cccap := omit,
1305 ssversion := omit,
1306 clir_sup := 0,
1307 clir_inv := 0,
1308 signal := omit,
1309 keypad := omit,
1310 more := 0,
1311 notify := 0,
1312 emergency := omit,
1313 imsi := "",
1314 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001315 lchan_mode := 0,
1316 sdp := ""
Harald Welte8b2a2582018-01-16 08:11:42 +01001317 }
1318 }
1319}
Harald Welte90938392018-03-25 16:36:40 +02001320template MNCC_PDU tr_MNCC_DISC_req(template uint32_t call_id,
1321 template MNCC_cause cause := *,
1322 template MNCC_progress prog := omit,
1323 template charstring fac := omit,
1324 template MNCC_useruser uu := omit) := {
1325 msg_type := MNCC_DISC_REQ,
1326 u := {
1327 signal := { /* See 24.008 9.3.7 */
1328 callref := call_id,
1329 bearer_cap := omit,
1330 called := omit,
1331 calling := omit,
1332 redirecting := omit,
1333 connected := omit,
1334 cause := cause,
1335 progress := prog,
1336 useruser := uu,
1337 facility := fac,
1338 cccap := omit,
1339 ssversion := omit,
1340 clir_sup := 0,
1341 clir_inv := 0,
1342 signal := omit,
1343 keypad := omit,
1344 more := 0,
1345 notify := 0,
1346 emergency := *,
1347 imsi := ?,
1348 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001349 lchan_mode := ?,
1350 sdp := *
Harald Welte90938392018-03-25 16:36:40 +02001351 }
1352 }
1353}
1354
Harald Welte8b2a2582018-01-16 08:11:42 +01001355
1356/* : MSC -> MNCC: REL.ind; mobile user informs network that user wants to release call + MM */
1357template MNCC_PDU tr_MNCC_REL_ind(template uint32_t call_id := ?, template MNCC_cause cause := ?,
1358 template charstring fac := *, template MNCC_useruser uu := *) := {
1359 msg_type := MNCC_REL_IND,
1360 u := {
1361 signal := { /* See 24.008 9.3.18 */
1362 callref := call_id,
1363 bearer_cap := omit,
1364 called := omit,
1365 calling := omit,
1366 redirecting := omit,
1367 connected := omit,
1368 cause := cause,
1369 progress := omit,
1370 useruser := uu,
1371 facility := fac,
1372 cccap := omit,
1373 ssversion := omit,
1374 clir_sup := 0,
1375 clir_inv := 0,
1376 signal := omit,
1377 keypad := omit,
1378 more := 0,
1379 notify := 0,
1380 emergency := *,
1381 imsi := ?,
1382 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001383 lchan_mode := ?,
1384 sdp := *
Harald Welte8b2a2582018-01-16 08:11:42 +01001385 }
1386 }
1387}
Harald Welte90938392018-03-25 16:36:40 +02001388template (value) MNCC_PDU ts_MNCC_REL_ind(uint32_t call_id,
1389 template (value) MNCC_cause cause,
1390 template (omit) charstring fac := omit,
1391 template (omit) MNCC_useruser uu := omit) := {
1392 msg_type := MNCC_REL_IND,
1393 u := {
1394 signal := { /* See 24.008 9.3.18 */
1395 callref := call_id,
1396 bearer_cap := omit,
1397 called := omit,
1398 calling := omit,
1399 redirecting := omit,
1400 connected := omit,
1401 cause := cause,
1402 progress := omit,
1403 useruser := uu,
1404 facility := fac,
1405 cccap := omit,
1406 ssversion := omit,
1407 clir_sup := 0,
1408 clir_inv := 0,
1409 signal := omit,
1410 keypad := omit,
1411 more := 0,
1412 notify := 0,
1413 emergency := omit,
1414 imsi := "",
1415 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001416 lchan_mode := 0,
1417 sdp := ""
Harald Welte90938392018-03-25 16:36:40 +02001418 }
1419 }
1420}
Harald Welte8b2a2582018-01-16 08:11:42 +01001421
1422/* : MSC <- MNCC: REL.req; indicate to mobile user tat network intents to release MM */
1423template MNCC_PDU ts_MNCC_REL_req(uint32_t call_id, MNCC_cause cause,
1424 template charstring fac := omit, template MNCC_useruser uu := omit) := {
1425 msg_type := MNCC_REL_REQ,
1426 u := {
1427 signal := { /* See 24.008 9.3.18 */
1428 callref := call_id,
1429 bearer_cap := omit,
1430 called := omit,
1431 calling := omit,
1432 redirecting := omit,
1433 connected := omit,
1434 cause := cause,
1435 progress := omit,
1436 useruser := uu,
1437 facility := fac,
1438 cccap := omit,
1439 ssversion := omit,
1440 clir_sup := 0,
1441 clir_inv := 0,
1442 signal := omit,
1443 keypad := omit,
1444 more := 0,
1445 notify := 0,
1446 emergency := omit,
1447 imsi := "",
1448 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001449 lchan_mode := 0,
1450 sdp := ""
Harald Welte8b2a2582018-01-16 08:11:42 +01001451 }
1452 }
1453}
Harald Welte90938392018-03-25 16:36:40 +02001454template MNCC_PDU tr_MNCC_REL_req(template uint32_t call_id, template MNCC_cause cause := *,
1455 template charstring fac := *, template MNCC_useruser uu := *) := {
1456 msg_type := MNCC_REL_REQ,
1457 u := {
1458 signal := { /* See 24.008 9.3.18 */
1459 callref := call_id,
1460 bearer_cap := omit,
1461 called := *,
1462 calling := *,
1463 redirecting := *,
1464 connected := *,
1465 cause := cause,
1466 progress := omit,
1467 useruser := uu,
1468 facility := fac,
1469 cccap := omit,
1470 ssversion := omit,
1471 clir_sup := 0,
1472 clir_inv := 0,
1473 signal := omit,
1474 keypad := omit,
1475 more := 0,
1476 notify := 0,
1477 emergency := omit,
1478 imsi := ?,
1479 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001480 lchan_mode := 0,
1481 sdp := ""
Harald Welte90938392018-03-25 16:36:40 +02001482 }
1483 }
1484}
1485
Harald Welte8b2a2582018-01-16 08:11:42 +01001486
1487/* : MSC -> MNCC: REL.cnf; confirm REL_req */
1488template MNCC_PDU tr_MNCC_REL_cnf(template uint32_t call_id := ?, template MNCC_cause cause := ?,
1489 template charstring fac := *, template MNCC_useruser uu := *)
1490modifies tr_MNCC_REL_ind := {
1491 msg_type := MNCC_REL_CNF
1492};
Harald Welte90938392018-03-25 16:36:40 +02001493template (value) MNCC_PDU ts_MNCC_REL_cnf(uint32_t call_id,
1494 template (value) MNCC_cause cause,
1495 template (omit) charstring fac := omit,
1496 template (omit) MNCC_useruser uu := omit)
1497modifies ts_MNCC_REL_ind := {
1498 msg_type := MNCC_REL_CNF
1499};
1500
Harald Welte8b2a2582018-01-16 08:11:42 +01001501
1502/* : MSC <- MNCC: FACILITY.req; request transmission of facility */
1503template MNCC_PDU ts_MNCC_FACILITY_req(uint32_t call_id, charstring fac) := {
1504 msg_type := MNCC_FACILITY_REQ,
1505 u := {
1506 signal := { /* See 24.008 9.3.9 */
1507 callref := call_id,
1508 bearer_cap := omit,
1509 called := omit,
1510 calling := omit,
1511 redirecting := omit,
1512 connected := omit,
1513 cause := omit,
1514 progress := omit,
1515 useruser := omit,
1516 facility := fac,
1517 cccap := omit,
1518 ssversion := omit,
1519 clir_sup := 0,
1520 clir_inv := 0,
1521 signal := omit,
1522 keypad := omit,
1523 more := 0,
1524 notify := 0,
1525 emergency := omit,
1526 imsi := "",
1527 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001528 lchan_mode := 0,
1529 sdp := ""
Harald Welte8b2a2582018-01-16 08:11:42 +01001530 }
1531 }
1532}
1533
1534/* : MSC -> MNCC: FACILITY.req; indicate reception of facility */
1535template MNCC_PDU tr_MNCC_FACILITY_ind(template uint32_t call_id := ?, template charstring fac := ?) := {
1536 msg_type := MNCC_FACILITY_IND,
1537 u := {
1538 signal := { /* See 24.008 9.3.9 */
1539 callref := call_id,
1540 bearer_cap := omit,
1541 called := omit,
1542 calling := omit,
1543 redirecting := omit,
1544 connected := omit,
1545 cause := omit,
1546 progress := omit,
1547 useruser := omit,
1548 facility := fac,
1549 cccap := omit,
1550 ssversion := omit,
1551 clir_sup := 0,
1552 clir_inv := 0,
1553 signal := omit,
1554 keypad := omit,
1555 more := 0,
1556 notify := 0,
1557 emergency := *,
1558 imsi := ?,
1559 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001560 lchan_mode := ?,
1561 sdp := *
Harald Welte8b2a2582018-01-16 08:11:42 +01001562 }
1563 }
1564}
1565
1566/* : MSC -> MNCC: START_DTMF.ind; MS has */
1567template MNCC_PDU tr_MNCC_START_DTMF_ind(template uint32_t call_id := ?, template MNCC_keypad keypad := ?) := {
1568 msg_type := MNCC_START_DTMF_IND,
1569 u := {
1570 signal := { /* See 24.008 9.3.24 */
1571 callref := call_id,
1572 bearer_cap := omit,
1573 called := omit,
1574 calling := omit,
1575 redirecting := omit,
1576 connected := omit,
1577 cause := omit,
1578 progress := omit,
1579 useruser := omit,
1580 facility := omit,
1581 cccap := omit,
1582 ssversion := omit,
1583 clir_sup := 0,
1584 clir_inv := 0,
1585 signal := omit,
1586 keypad := keypad,
1587 more := 0,
1588 notify := 0,
1589 emergency := *,
1590 imsi := ?,
1591 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001592 lchan_mode := ?,
1593 sdp := *
Harald Welte8b2a2582018-01-16 08:11:42 +01001594 }
1595 }
1596}
1597
1598/* : MSC <- MNCC: START_DTMF.rsp; Acknowledge start of DTMF */
1599template MNCC_PDU ts_MNCC_START_DTMF_rsp(uint32_t call_id, MNCC_keypad keypad) := {
1600 msg_type := MNCC_START_DTMF_RSP,
1601 u := {
1602 signal := { /* See 24.008 9.3.25 */
1603 callref := call_id,
1604 bearer_cap := omit,
1605 called := omit,
1606 calling := omit,
1607 redirecting := omit,
1608 connected := omit,
1609 cause := omit,
1610 progress := omit,
1611 useruser := omit,
1612 facility := omit,
1613 cccap := omit,
1614 ssversion := omit,
1615 clir_sup := 0,
1616 clir_inv := 0,
1617 signal := omit,
1618 keypad := keypad,
1619 more := 0,
1620 notify := 0,
1621 emergency := omit,
1622 imsi := "",
1623 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001624 lchan_mode := 0,
1625 sdp := ""
Harald Welte8b2a2582018-01-16 08:11:42 +01001626 }
1627 }
1628}
1629
1630/* : MSC <- MNCC: START_DTMF.rsp; Acknowledge start of DTMF */
1631template MNCC_PDU ts_MNCC_START_DTMF_rej(uint32_t call_id, MNCC_cause cause) := {
1632 msg_type := MNCC_START_DTMF_REJ,
1633 u := {
1634 signal := { /* See 24.008 9.3.26 */
1635 callref := call_id,
1636 bearer_cap := omit,
1637 called := omit,
1638 calling := omit,
1639 redirecting := omit,
1640 connected := omit,
1641 cause := cause,
1642 progress := omit,
1643 useruser := omit,
1644 facility := omit,
1645 cccap := omit,
1646 ssversion := omit,
1647 clir_sup := 0,
1648 clir_inv := 0,
1649 signal := omit,
1650 keypad := omit,
1651 more := 0,
1652 notify := 0,
1653 emergency := omit,
1654 imsi := "",
1655 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001656 lchan_mode := 0,
1657 sdp := ""
Harald Welte8b2a2582018-01-16 08:11:42 +01001658 }
1659 }
1660}
1661
1662/* : MSC -> MNCC: STOP_DTMF.ind */
1663template MNCC_PDU tr_MNCC_STOP_DTMF_ind(template uint32_t call_id := ?) :=
1664 tr_MNCC_SIMPLE(MNCC_STOP_DTMF_IND, call_id); /* See 24.008 9.3.29 */
1665
1666/* : MSC <- MNCC: STOP_DTMF.rsp; Acknowledge stop of DTMF */
1667template MNCC_PDU ts_MNCC_STOP_DTMF_rsp(uint32_t call_id) :=
1668 ts_MNCC_SIMPLE(MNCC_STOP_DTMF_RSP, call_id); /* See 24.008 9.3.30 */
1669
1670/* : MSC -> MNCC: MODIFY.ind; request to start MO in-call modification */
1671template MNCC_PDU tr_MNCC_MODIFY_ind(template uint32_t call_id := ?, template MNCC_bearer_cap bcap := ?) := {
1672 msg_type := MNCC_MODIFY_IND,
1673 u := {
1674 signal := { /* See 24.008 9.3.14 */
1675 callref := call_id,
1676 bearer_cap := bcap,
1677 called := omit,
1678 calling := omit,
1679 redirecting := omit,
1680 connected := omit,
1681 cause := omit,
1682 progress := omit,
1683 useruser := omit,
1684 facility := omit,
1685 cccap := omit,
1686 ssversion := omit,
1687 clir_sup := 0,
1688 clir_inv := 0,
1689 signal := omit,
1690 keypad := omit,
1691 more := 0,
1692 notify := 0,
1693 emergency := *,
1694 imsi := ?,
1695 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001696 lchan_mode := ?,
1697 sdp := *
Harald Welte8b2a2582018-01-16 08:11:42 +01001698 }
1699 }
1700}
1701
1702/* : MSC <- MNCC: MODIFY.rsp; tespond to MO in-call modification */
1703template MNCC_PDU ts_MNCC_MODIFY_rsp(uint32_t call_id, MNCC_bearer_cap bcap) := {
1704 msg_type := MNCC_MODIFY_RSP,
1705 u := {
1706 signal := { /* See 24.008 9.3.14 */
1707 callref := call_id,
1708 bearer_cap := bcap,
1709 called := omit,
1710 calling := omit,
1711 redirecting := omit,
1712 connected := omit,
1713 cause := omit,
1714 progress := omit,
1715 useruser := omit,
1716 facility := omit,
1717 cccap := omit,
1718 ssversion := omit,
1719 clir_sup := 0,
1720 clir_inv := 0,
1721 signal := omit,
1722 keypad := omit,
1723 more := 0,
1724 notify := 0,
1725 emergency := omit,
1726 imsi := "",
1727 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001728 lchan_mode := 0,
1729 sdp := ""
Harald Welte8b2a2582018-01-16 08:11:42 +01001730 }
1731 }
1732}
1733
1734/* : MSC <- MNCC: MODIFY.req; request to start MT in-call modification */
1735template MNCC_PDU ts_MNCC_MODIFY_req(uint32_t call_id, MNCC_bearer_cap bcap) := {
1736 msg_type := MNCC_MODIFY_REQ,
1737 u := {
1738 signal := { /* See 24.008 9.3.14 */
1739 callref := call_id,
1740 bearer_cap := bcap,
1741 called := omit,
1742 calling := omit,
1743 redirecting := omit,
1744 connected := omit,
1745 cause := omit,
1746 progress := omit,
1747 useruser := omit,
1748 facility := omit,
1749 cccap := omit,
1750 ssversion := omit,
1751 clir_sup := 0,
1752 clir_inv := 0,
1753 signal := omit,
1754 keypad := omit,
1755 more := 0,
1756 notify := 0,
1757 emergency := omit,
1758 imsi := "",
1759 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001760 lchan_mode := 0,
1761 sdp := ""
Harald Welte8b2a2582018-01-16 08:11:42 +01001762 }
1763 }
1764}
1765
1766/* : MSC -> MNCC: MODIFY.cnf; MS has responded to MT in-call modification */
1767template MNCC_PDU tr_MNCC_MODIFY_cnf(template uint32_t call_id := ?,
1768 template MNCC_bearer_cap bcap := ?) := {
1769 msg_type := MNCC_MODIFY_CNF,
1770 u := {
1771 signal := { /* See 24.008 9.3.14 */
1772 callref := call_id,
1773 bearer_cap := bcap,
1774 called := omit,
1775 calling := omit,
1776 redirecting := omit,
1777 connected := omit,
1778 cause := omit,
1779 progress := omit,
1780 useruser := omit,
1781 facility := omit,
1782 cccap := omit,
1783 ssversion := omit,
1784 clir_sup := 0,
1785 clir_inv := 0,
1786 signal := omit,
1787 keypad := omit,
1788 more := 0,
1789 notify := 0,
1790 emergency := *,
1791 imsi := ?,
1792 lchan_type := ?,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001793 lchan_mode := ?,
1794 sdp := *
Harald Welte8b2a2582018-01-16 08:11:42 +01001795 }
1796 }
1797}
1798
1799/* : MSC <- MNCC: Request transmission of USERINFO to MS */
1800template MNCC_PDU ts_MNCC_USERINFO_req(uint32_t call_id, MNCC_useruser uu, integer more) := {
1801 msg_type := MNCC_USERINFO_REQ,
1802 u := {
1803 signal := { /* See 24.008 9.3.31 */
1804 callref := call_id,
1805 bearer_cap := omit,
1806 called := omit,
1807 calling := omit,
1808 redirecting := omit,
1809 connected := omit,
1810 cause := omit,
1811 progress := omit,
1812 useruser := uu,
1813 facility := omit,
1814 cccap := omit,
1815 ssversion := omit,
1816 clir_sup := 0,
1817 clir_inv := 0,
1818 signal := omit,
1819 keypad := omit,
1820 more := more,
1821 notify := 0,
1822 emergency := omit,
1823 imsi := "",
1824 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001825 lchan_mode := 0,
1826 sdp := ""
Harald Welte8b2a2582018-01-16 08:11:42 +01001827 }
1828 }
1829}
1830
1831/* : MSC -> MNCC: Indicate reception of USERINFO from MS */
1832template MNCC_PDU tr_MNCC_USERINFO_ind(template uint32_t call_id := ?, template MNCC_useruser uu := ?,
1833 integer more) := {
1834 msg_type := MNCC_USERINFO_IND,
1835 u := {
1836 signal := { /* See 24.008 9.3.31 */
1837 callref := call_id,
1838 bearer_cap := omit,
1839 called := omit,
1840 calling := omit,
1841 redirecting := omit,
1842 connected := omit,
1843 cause := omit,
1844 progress := omit,
1845 useruser := uu,
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 := more,
1854 notify := 0,
1855 emergency := omit,
1856 imsi := "",
1857 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001858 lchan_mode := 0,
1859 sdp := ""
Harald Welte8b2a2582018-01-16 08:11:42 +01001860 }
1861 }
1862}
1863
1864/* : MSC -> MNCC: HOLD.ind; MS requests hold of call */
1865template MNCC_PDU tr_MNCC_HOLD_ind(template uint32_t call_id := ?) :=
1866 tr_MNCC_SIMPLE(MNCC_HOLD_IND, call_id); /* See 24.008 9.3.10 */
1867
1868/* : MSC <- MNCC: HOLD.cnf; network confirms hold of call */
1869template MNCC_PDU ts_MNCC_HOLD_cnf(uint32_t call_id) :=
1870 ts_MNCC_SIMPLE(MNCC_HOLD_CNF, call_id); /* See 24.008 9.3.11 */
1871
1872/* : MSC <- MNCC: HOLD.rej; network rejects hold of call */
1873template MNCC_PDU ts_MNCC_HOLD_rej(uint32_t call_id, MNCC_cause cause) := {
1874 msg_type := MNCC_HOLD_REJ,
1875 u := {
1876 signal := { /* See 24.008 9.3.12 */
1877 callref := call_id,
1878 bearer_cap := omit,
1879 called := omit,
1880 calling := omit,
1881 redirecting := omit,
1882 connected := omit,
1883 cause := cause,
1884 progress := omit,
1885 useruser := omit,
1886 facility := omit,
1887 cccap := omit,
1888 ssversion := omit,
1889 clir_sup := 0,
1890 clir_inv := 0,
1891 signal := omit,
1892 keypad := omit,
1893 more := 0,
1894 notify := 0,
1895 emergency := omit,
1896 imsi := "",
1897 lchan_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001898 lchan_mode := 0,
1899 sdp := ""
Harald Welte8b2a2582018-01-16 08:11:42 +01001900 }
1901 }
1902}
1903
1904/* : MSC -> MNCC: RETRIEVE.ind; MS requests retrieval of held call */
1905template MNCC_PDU tr_MNCC_RETRIEVE_ind(template uint32_t call_id := ?) :=
1906 tr_MNCC_SIMPLE(MNCC_RETRIEVE_IND, call_id); /* See 24.008 9.3.20 */
1907
1908/* : MSC <- MNCC: RETRIEVE.cnf; network confirms retrieve of call */
1909template MNCC_PDU ts_MNCC_RETRIEVE_cnf(uint32_t call_id) :=
1910 ts_MNCC_SIMPLE(MNCC_RETRIEVE_CNF, call_id); /* See 24.008 9.3.21 */
1911
1912/* : MSC <- MNCC: RETRIEVE.rej; network rejects retrieve of call */
1913template MNCC_PDU ts_MNCC_RETRIEVE_rej(uint32_t call_id, MNCC_cause cause)
1914modifies ts_MNCC_HOLD_rej := { /* See 24.008 9.3.22 */
1915 msg_type := MNCC_RETRIEVE_REJ
1916}
1917
1918
1919template MNCC_PDU ts_MNCC_SIMPLE_RTP(MNCC_MsgType msg_type, uint32_t call_id) := {
1920 msg_type := msg_type,
1921 u := {
1922 rtp := {
1923 callref := call_id,
1924 ip := 0,
1925 rtp_port := 0,
1926 payload_type := 0,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001927 payload_msg_type := 0,
1928 sdp := ""
Harald Welte8b2a2582018-01-16 08:11:42 +01001929 }
1930 }
1931}
1932
1933/* MSC <- MNCC: RTP_CREATE.req; request creation of RTP */
1934template MNCC_PDU ts_MNCC_RTP_CREATE(uint32_t call_id) := ts_MNCC_SIMPLE_RTP(MNCC_RTP_CREATE, call_id);
1935
1936/* MSC -> MNCC: RTP_CREATE.rsp; acknowledge creation of RTP (stating MSC side IP/Port) */
Neels Hofmeyr2ca1ab42019-03-08 03:45:43 +01001937template MNCC_PDU tr_MNCC_RTP_CREATE(template uint32_t call_id := ?,
1938 template uint32_t ip := ?,
1939 template uint32_t rtp_port := ?,
1940 template uint32_t payload_type := ?) := {
Harald Welte8b2a2582018-01-16 08:11:42 +01001941 msg_type := MNCC_RTP_CREATE,
1942 u := {
1943 rtp := {
1944 callref := call_id,
Neels Hofmeyr2ca1ab42019-03-08 03:45:43 +01001945 ip := ip,
1946 rtp_port := rtp_port,
1947 payload_type := payload_type,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001948 payload_msg_type := ?,
1949 sdp := *
Harald Welte8b2a2582018-01-16 08:11:42 +01001950 }
1951 }
1952}
1953
1954/* MSC <- MNCC: RTP_CONNECT.req; request connect of RTP */
1955template MNCC_PDU ts_MNCC_RTP_CONNECT(uint32_t call_id, uint32_t ip, uint32_t rtp_port, uint32_t pt) := {
1956 msg_type := MNCC_RTP_CONNECT,
1957 u := {
1958 rtp := {
1959 callref := call_id,
1960 ip := ip,
1961 rtp_port := rtp_port,
1962 payload_type := pt,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001963 payload_msg_type := 0,
1964 sdp := ""
Harald Welte8b2a2582018-01-16 08:11:42 +01001965 }
1966 }
1967}
Harald Welteb0d93602018-03-20 18:09:34 +01001968template MNCC_PDU tr_MNCC_RTP_CONNECT(template uint32_t call_id,
1969 template uint32_t ip := ?,
1970 template uint32_t rtp_port := ?,
1971 template uint32_t pt := ?) := {
1972 msg_type := MNCC_RTP_CONNECT,
1973 u := {
1974 rtp := {
1975 callref := call_id,
1976 ip := ip,
1977 rtp_port := rtp_port,
1978 payload_type := pt,
Neels Hofmeyr06b859c2019-11-12 01:23:04 +01001979 payload_msg_type := 0,
1980 sdp := ""
Harald Welteb0d93602018-03-20 18:09:34 +01001981 }
1982 }
1983}
1984
Harald Welte8b2a2582018-01-16 08:11:42 +01001985
1986/* MSC <- MNCC: RTP_FREE.req; request connect of RTP */
1987template 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 +01001988
Harald Welte251b52b2018-01-17 13:58:16 +01001989function f_mncc_get_call_id(MNCC_PDU pdu) return uint32_t {
1990 if (ischosen(pdu.u.rtp)) {
1991 return pdu.u.rtp.callref;
1992 } else if (ischosen(pdu.u.data)) {
1993 return pdu.u.data.callref;
1994 } else if (ischosen(pdu.u.signal)) {
1995 return pdu.u.signal.callref;
1996 } else {
1997 setverdict(fail, "Unable to determine Callref for MNCC", pdu);
Daniel Willmanne4ff5372018-07-05 17:35:03 +02001998 mtc.stop
Harald Welte251b52b2018-01-17 13:58:16 +01001999 }
2000}
2001
Harald Welte474fd7d2017-12-29 16:01:39 +01002002} with { encode "RAW" ; variant "FIELDORDER(msb)" }