blob: 884a7c081ffbd5d08079f8e17c269f11b8e584a6 [file] [log] [blame]
Harald Welte474fd7d2017-12-29 16:01:39 +01001module MNCC_Types {
2
3import from Osmocom_Types all;
4
5/* for architectures where 'int' is 32bit like x86_64 */
6type integer int with { variant "FIELDLENGTH(32)" };
7
8
9/* GSM 04.08 Bearer Capability: Rate Adaption */
10type enumerated GSM48_bcap_ra {
11 GSM48_BCAP_RA_NONE (0),
12 GSM48_BCAP_RA_V110_X30 (1),
13 GSM48_BCAP_RA_X31 (2),
14 GSM48_BCAP_RA_OTHER (3)
15};
16
17/* GSM 04.08 Bearer Capability: Signalling access protocol */
18type enumerated GSM48_bcap_sig_access {
Harald Welteec3d0652018-01-22 02:54:13 +010019 GSM48_BCAP_SA_NONE (0),
Harald Welte474fd7d2017-12-29 16:01:39 +010020 GSM48_BCAP_SA_I440_I450 (1),
21 GSM48_BCAP_SA_X21 (2),
22 GSM48_BCAP_SA_X28_DP_IN (3),
23 GSM48_BCAP_SA_X28_DP_UN (4),
24 GSM48_BCAP_SA_X28_NDP (5),
25 GSM48_BCAP_SA_X32 (6)
26};
27
28/* GSM 04.08 Bearer Capability: User Rate */
29type enumerated GSM48_bcap_user_rate {
Harald Welteec3d0652018-01-22 02:54:13 +010030 GSM48_BCAP_UR_NONE (0),
Harald Welte474fd7d2017-12-29 16:01:39 +010031 GSM48_BCAP_UR_300 (1),
32 GSM48_BCAP_UR_1200 (2),
33 GSM48_BCAP_UR_2400 (3),
34 GSM48_BCAP_UR_4800 (4),
35 GSM48_BCAP_UR_9600 (5),
36 GSM48_BCAP_UR_12000 (6),
37 GSM48_BCAP_UR_1200_75 (7)
38};
39
40/* GSM 04.08 Bearer Capability: Parity */
41type enumerated GSM48_bcap_parity {
42 GSM48_BCAP_PAR_ODD (0),
43 GSM48_BCAP_PAR_EVEN (2),
44 GSM48_BCAP_PAR_NONE (3),
45 GSM48_BCAP_PAR_ZERO (4),
46 GSM48_BCAP_PAR_ONE (5)
47};
48
49/* GSM 04.08 Bearer Capability: Intermediate Rate */
50type enumerated GSM48_bcap_interm_rate {
Harald Welteec3d0652018-01-22 02:54:13 +010051 GSM48_BCAP_IR_NONE (0),
Harald Welte474fd7d2017-12-29 16:01:39 +010052 GSM48_BCAP_IR_8k (2),
53 GSM48_BCAP_IR_16k (3)
54};
55
56/* GSM 04.08 Bearer Capability: Transparency */
57type enumerated GSM48_bcap_transp {
58 GSM48_BCAP_TR_TRANSP (0),
59 GSM48_BCAP_TR_RLP (1),
60 GSM48_BCAP_TR_TR_PREF (2),
61 GSM48_BCAP_TR_RLP_PREF (3)
62};
63
64/* GSM 04.08 Bearer Capability: Modem Type */
65type enumerated GSM48_bcap_modem_type {
66 GSM48_BCAP_MT_NONE (0),
67 GSM48_BCAP_MT_V21 (1),
68 GSM48_BCAP_MT_V22 (2),
69 GSM48_BCAP_MT_V22bis (3),
70 GSM48_BCAP_MT_V23 (4),
71 GSM48_BCAP_MT_V26ter (5),
72 GSM48_BCAP_MT_V32 (6),
73 GSM48_BCAP_MT_UNDEF (7),
74 GSM48_BCAP_MT_AUTO_1 (8)
75};
76
77type enumerated MNCC_MsgType {
78 MNCC_SETUP_REQ ('0101'O),
79 MNCC_SETUP_IND ('0102'O),
80 MNCC_SETUP_RSP ('0103'O),
81 MNCC_SETUP_CNF ('0104'O),
82 MNCC_SETUP_COMPL_REQ ('0105'O),
83 MNCC_SETUP_COMPL_IND ('0106'O),
84 MNCC_CALL_CONF_IND ('0107'O),
85 MNCC_CALL_PROC_REQ ('0108'O),
86 MNCC_PROGRESS_REQ ('0109'O),
87 MNCC_ALERT_REQ ('010a'O),
88 MNCC_ALERT_IND ('010b'O),
89 MNCC_NOTIFY_REQ ('010c'O),
90 MNCC_NOTIFY_IND ('010d'O),
91 MNCC_DISC_REQ ('010e'O),
92 MNCC_DISC_IND ('010f'O),
93 MNCC_REL_REQ ('0110'O),
94 MNCC_REL_IND ('0111'O),
95 MNCC_REL_CNF ('0112'O),
96 MNCC_FACILITY_REQ ('0113'O),
97 MNCC_FACILITY_IND ('0114'O),
98 MNCC_START_DTMF_IND ('0115'O),
99 MNCC_START_DTMF_RSP ('0116'O),
100 MNCC_START_DTMF_REJ ('0117'O),
101 MNCC_STOP_DTMF_IND ('0118'O),
102 MNCC_STOP_DTMF_RSP ('0119'O),
103 MNCC_MODIFY_REQ ('011a'O),
104 MNCC_MODIFY_IND ('011b'O),
105 MNCC_MODIFY_RSP ('011c'O),
106 MNCC_MODIFY_CNF ('011d'O),
107 MNCC_MODIFY_REJ ('011e'O),
108 MNCC_HOLD_IND ('011f'O),
109 MNCC_HOLD_CNF ('0120'O),
110 MNCC_HOLD_REJ ('0121'O),
111 MNCC_RETRIEVE_IND ('0122'O),
112 MNCC_RETRIEVE_CNF ('0123'O),
113 MNCC_RETRIEVE_REJ ('0124'O),
114 MNCC_USERINFO_REQ ('0125'O),
115 MNCC_USERINFO_IND ('0126'O),
116 MNCC_REJ_REQ ('0127'O),
117 MNCC_REJ_IND ('0128'O),
118
119 MNCC_BRIDGE ('0200'O),
120 MNCC_FRAME_RECV ('0201'O),
121 MNCC_FRAME_DROP ('0202'O),
122 MNCC_LCHAN_MODIFY ('0203'O),
123 MNCC_RTP_CREATE ('0204'O),
124 MNCC_RTP_CONNECT ('0205'O),
125 MNCC_RTP_FREE ('0206'O),
126
127 GSM_TCHF_FRAME ('0300'O),
128 GSM_TCHF_FRAME_EFR ('0301'O),
129 GSM_TCHH_FRAME ('0302'O),
130 GSM_TCH_FRAME_AMR ('0303'O),
131 GSM_BAD_FRAME ('03ff'O),
132
133 MNCC_SOCKET_HELLO ('0400'O)
134};
135
136const integer GSM_MAX_FACILITY := 128;
137const integer GSM_MAX_SSVERSION := 128;
138const integer GSM_MAX_USERUSER := 128;
139
140type record MNCC_bearer_cap_data {
141 GSM48_bcap_ra rate_adaptation,
142 GSM48_bcap_sig_access sig_access,
143 int async,
144 int nr_stop_bits,
145 int nr_data_bits,
146 GSM48_bcap_user_rate user_rate,
147 GSM48_bcap_parity parity,
148 GSM48_bcap_interm_rate interm_rate,
149 GSM48_bcap_transp transp,
150 GSM48_bcap_modem_type modem_type
151};
152
153type record length(0..8) of int MNCC_speech_vers;
154
155/* Expanded fields from GSM TS 04.08, Table 10.5.102 */
156type record MNCC_bearer_cap {
157 int transfer,
158 int mode,
159 int coding,
160 int radio,
161 int speech_ctm,
162 MNCC_speech_vers speech_ver,
163 MNCC_bearer_cap_data data optional
164};
165
166template MNCC_bearer_cap ts_MNCC_bcap_voice := {
167 transfer := 0, /* speech */
168 mode := 0, /* circuit */
169 coding := 0, /* GSM standard */
170 radio := 3, /* FR/HR, FR preferred */
171 speech_ctm := 0, /* not supported */
Harald Welte515f5d12018-01-22 02:55:10 +0100172 speech_ver := { 0, 2, 4, 1, 5, -1 },
Harald Welte474fd7d2017-12-29 16:01:39 +0100173 data := omit
174};
175
176type record MNCC_number {
177 GSM48_type_of_number number_type,
178 GSM48_num_plan_ind plan,
179 GSM48_present_ind presence,
180 GSM48_screening_ind screen,
181 charstring number
182};
183
184/* 24.008 10.5.118 */
185type enumerated GSM48_num_plan_ind {
186 GSM48_NUMPLAN_UNKNOWN (0),
187 GSM48_NUMPLAN_E164 (1),
188 GSM48_NUMPLAN_X121 (3),
189 GSM48_NUMPLAN_F69 (4),
190 GSM48_NUMPLAN_NATIONAL (8),
191 GSM48_NUMPLAN_PRIVATE (9),
192 GSM48_NUMPLAN_CTS (11),
193 GSM48_NUMPLAN_RESERVED (15)
194};
195
196/* 04.08 10.5.118 */
197type enumerated GSM48_type_of_number {
198 GSM48_TON_UNKNOWN (0),
199 GSM48_TON_INTERNATIONAL (1),
200 GSM48_TON_NATIONAL (2),
201 GSM48_TON_NETWORK_SPECIFIC (3),
202 GSM48_TON_SHORT_CODE (4)
203};
204
205/* 04.08 10.5.120 */
206type enumerated GSM48_present_ind {
207 GSM48_PRES_IND_ALLOWED (0),
208 GSM48_PRES_IND_RESTRICTED (1),
209 GSM48_PRES_IND_NUM_NOT_AVAIL (2),
210 GSM48_PRES_IND_RESERVED (3)
211};
212
213type enumerated GSM48_screening_ind {
214 GSM48_SCR_IND_NOT_SCREENED (0),
215 GSM48_SCR_IND_VERIF_PASSED (1),
216 GSM48_SCR_IND_VERIF_FAILED (2),
217 GSM48_SCR_IND_NETW_PROVIDED (3)
218};
219
Harald Weltefe75a202018-01-17 13:59:20 +0100220/* 24.008 Table 10.5.122 */
221type enumerated GSM48_cause_coding {
222 GSM48_CAUSE_CS_Q931 ('00'B),
223 GSM48_CAUSE_CS_RSVD ('01'B),
224 GSM48_CAUSE_CS_NATIONAL ('10'B),
225 GSM48_CAUSE_CS_GSM ('11'B)
226}
227
228type enumerated GSM48_cause_loc {
229 GSM48_CAUSE_LOC_USER ('0000'B),
230 GSM48_CAUSE_LOC_PRN_S_LU ('0001'B),
231 GSM48_CAUSE_LOC_PUN_S_LU ('0010'B),
232 GSM48_CAUSE_LOC_TRANS_NET ('0011'B),
233 GSM48_CAUSE_LOC_PUN_S_RU ('0100'B),
234 GSM48_CAUSE_LOC_PRN_S_RU ('0101'B),
235 GSM48_CAUSE_LOC_INN_NET ('0111'B),
236 GSM48_CAUSE_LOC_NET_BEYOND ('1010'B)
237}
238
239
Harald Welte474fd7d2017-12-29 16:01:39 +0100240
Harald Welted748a052018-01-22 02:59:24 +0100241template (value) MNCC_number ts_MNCC_number(charstring number,
Harald Welte474fd7d2017-12-29 16:01:39 +0100242 GSM48_type_of_number ton := GSM48_TON_INTERNATIONAL,
243 GSM48_num_plan_ind npi := GSM48_NUMPLAN_E164,
244 GSM48_present_ind pres := GSM48_PRES_IND_ALLOWED,
245 GSM48_screening_ind screen := GSM48_SCR_IND_NOT_SCREENED) := {
246 number_type := ton,
247 plan := npi,
248 presence := pres,
249 screen := screen,
250 number := number
251}
252
Harald Welted748a052018-01-22 02:59:24 +0100253template MNCC_number tr_MNCC_number(template charstring number,
254 template GSM48_type_of_number ton := ?,
255 template GSM48_num_plan_ind npi := ?,
256 template GSM48_present_ind pres := ?,
257 template GSM48_screening_ind screen := ?) := {
258 number_type := ton,
259 plan := npi,
260 presence := pres,
261 screen := screen,
262 number := number
263}
264
Harald Welte474fd7d2017-12-29 16:01:39 +0100265type record MNCC_cause {
Harald Weltefe75a202018-01-17 13:59:20 +0100266 GSM48_cause_loc location,
267 GSM48_cause_coding coding,
Harald Welte474fd7d2017-12-29 16:01:39 +0100268 int rec,
269 int rec_val,
270 int val,
271 octetstring diag
Harald Weltefe75a202018-01-17 13:59:20 +0100272} with {
273 variant (location) "FIELDLENGTH(32)";
274 variant (coding) "FIELDLENGTH(32)";
275}
Harald Welte474fd7d2017-12-29 16:01:39 +0100276
Harald Welte2bb825f2018-01-22 11:31:18 +0100277template MNCC_cause ts_MNCC_cause(int val,
278 GSM48_cause_loc loc := GSM48_CAUSE_LOC_PUN_S_LU,
279 GSM48_cause_coding coding := GSM48_CAUSE_CS_GSM,
280 octetstring diag := ''O) := {
281 location := loc,
282 coding := coding,
283 rec := 0,
284 rec_val := 0,
285 val := val,
286 diag := diag
287}
288
Harald Welte474fd7d2017-12-29 16:01:39 +0100289type record MNCC_useruser {
290 int proto,
291 charstring info
292};
293
294type record MNCC_progress {
295 int coding,
296 int location,
297 int descr
298};
299
300type record MNCC_cccap {
301 int dtmf,
302 int pcp
303};
304
Harald Welte8b2a2582018-01-16 08:11:42 +0100305type int MNCC_notify (0..127);
306type int MNCC_keypad (0..127);
307
Harald Welte474fd7d2017-12-29 16:01:39 +0100308type enumerated MNCC_bcap {
309 GSM_MNCC_BCAP_SPEECH (0),
310 GSM_MNCC_BCAP_UNR_DIG (1),
311 GSM_MNCC_BCAP_AUDIO (2),
312 GSM_MNCC_BCAP_FAX_G3 (3),
313 GSM_MNCC_BCAP_OTHER_ITC (4),
314 GSM_MNCC_BCAP_RESERVED (7)
315};
316
317
318type record MNCC_PDU_Signal {
319 uint32_t callref,
320
321 MNCC_bearer_cap bearer_cap optional,
322 MNCC_number called optional,
323 MNCC_number calling optional,
324 MNCC_number redirecting optional,
325 MNCC_number connected optional,
326 MNCC_cause cause optional,
327 MNCC_progress progress optional,
328 MNCC_useruser useruser optional,
329 charstring facility optional,
330 MNCC_cccap cccap optional,
331 charstring ssversion optional,
332
333 int clir_sup,
334 int clir_inv,
335 int signal optional,
336
Harald Welte8b2a2582018-01-16 08:11:42 +0100337 MNCC_keypad keypad optional,
Harald Welte474fd7d2017-12-29 16:01:39 +0100338 int more,
Harald Welte8b2a2582018-01-16 08:11:42 +0100339 MNCC_notify notify,
Harald Welte474fd7d2017-12-29 16:01:39 +0100340 int emergency optional,
341 charstring imsi,
342
343 uint8_t lchan_type, /* empty in OSmoMSC */
344 uint8_t lchan_mode /* empty in OsmoMSC */
345};
346
347
348type record MNCC_PDU_Data {
349 uint32_t callref,
350 octetstring data
351};
352
353type record MNCC_PDU_Rtp {
354 uint32_t callref,
355 uint32_t ip,
356 uint16_t rtp_port,
357 uint32_t payload_type,
358 uint32_t payload_msg_type
359};
360
361type record MNCC_PDU_Hello {
362 uint32_t version,
363 uint32_t mncc_size,
364 uint32_t data_frame_size,
365 uint32_t called_offset,
366 uint32_t signal_offset,
367 uint32_t emergency_offset,
368 uint32_t lchan_type_offset
369};
370
371
372type union MNCC_MsgUnion {
373 MNCC_PDU_Signal signal,
374 MNCC_PDU_Data data,
375 MNCC_PDU_Rtp rtp,
376 MNCC_PDU_Hello hello
377};
378
379
380type record MNCC_PDU {
381 MNCC_MsgType msg_type,
382 MNCC_MsgUnion u
383} with { variant (u) "CROSSTAG(
384 hello, msg_type = MNCC_SOCKET_HELLO;
385 rtp, { msg_type = MNCC_RTP_CREATE,
386 msg_type = MNCC_RTP_CONNECT,
387 msg_type = MNCC_RTP_FREE };
388 data, { msg_type = GSM_TCHF_FRAME,
389 msg_type = GSM_TCHF_FRAME_EFR,
390 msg_type = GSM_TCHH_FRAME,
391 msg_type = GSM_TCH_FRAME_AMR,
392 msg_type = GSM_BAD_FRAME };
393 signal, OTHERWISE
394 )"
395};
396
397external function enc_MNCC_PDU(in MNCC_PDU pdu) return octetstring;
398
399external function dec_MNCC_PDU(in octetstring stream) return MNCC_PDU;
400
401
402template MNCC_PDU ts_MNCC_Sign(MNCC_MsgType msg_type, MNCC_PDU_Signal sign) := {
403 msg_type := msg_type,
404 u := {
405 signal := sign
406 }
407}
408
Harald Welte8b2a2582018-01-16 08:11:42 +0100409template MNCC_PDU ts_MNCC_SIMPLE(MNCC_MsgType msg_type, uint32_t call_id) := {
410 msg_type := msg_type,
Harald Welte474fd7d2017-12-29 16:01:39 +0100411 u := {
412 signal := {
413 callref := call_id,
Harald Welte8b2a2582018-01-16 08:11:42 +0100414 bearer_cap := omit,
415 called := omit,
416 calling := omit,
Harald Welte474fd7d2017-12-29 16:01:39 +0100417 redirecting := omit,
418 connected := omit,
419 cause := omit,
420 progress := omit,
421 useruser := omit,
422 facility := omit,
423 cccap := omit,
424 ssversion := omit,
425 clir_sup := 0,
426 clir_inv := 0,
427 signal := omit,
428 keypad := omit,
429 more := 0,
430 notify := 0,
431 emergency := omit,
Harald Welte8b2a2582018-01-16 08:11:42 +0100432 imsi := "",
433 lchan_type := 0,
434 lchan_mode := 0
435 }
436 }
437}
438
439template MNCC_PDU tr_MNCC_SIMPLE(template MNCC_MsgType msg_type, template uint32_t call_id) := {
440 msg_type := msg_type,
441 u := {
442 signal := {
443 callref := call_id,
444 bearer_cap := omit,
445 called := omit,
446 calling := omit,
447 redirecting := omit,
448 connected := omit,
449 cause := omit,
450 progress := omit,
451 useruser := omit,
452 facility := omit,
453 cccap := omit,
454 ssversion := omit,
455 clir_sup := 0,
456 clir_inv := 0,
457 signal := omit,
458 keypad := omit,
459 more := 0,
460 notify := 0,
461 emergency := *,
462 imsi := ?,
463 lchan_type := ?,
464 lchan_mode := ?
465 }
466 }
467}
468
469
470
471/* MT: MSC <- MNCC: SETUP.req from ext. MNCC handler to MSC */
472template MNCC_PDU ts_MNCC_SETUP_req(uint32_t call_id, charstring called, charstring calling, charstring imsi := "") := {
473 msg_type := MNCC_SETUP_REQ,
474 u := {
475 signal := { /* See 24.008 9.3.23.1 */
476 callref := call_id,
477 bearer_cap := ts_MNCC_bcap_voice, /* mandatory */
478 called := valueof(ts_MNCC_number(called)), /* optional */
479 calling := valueof(ts_MNCC_number(calling)), /* optional */
480 redirecting := omit, /* optional */
481 connected := omit,
482 cause := omit,
483 progress := omit, /* optional */
484 useruser := omit, /* optional */
485 facility := omit, /* optional */
486 cccap := omit,
487 ssversion := omit,
488 clir_sup := 0,
489 clir_inv := 0,
490 signal := omit, /* optional */
491 keypad := omit,
492 more := 0,
493 notify := 0,
494 emergency := omit,
495 imsi := imsi,
Harald Welte474fd7d2017-12-29 16:01:39 +0100496 lchan_type := 0,
497 lchan_mode := 0
498 }
499 }
500};
501
Harald Welte4017d552018-01-26 21:40:05 +0100502/* MO: MSC <- MNCC: Respons to SETUP.ind */
503template MNCC_PDU ts_MNCC_SETUP_rsp(uint32_t call_id, charstring imsi := "",
504 template MNCC_number connected := omit) := {
Harald Welte8b2a2582018-01-16 08:11:42 +0100505 msg_type := MNCC_SETUP_RSP,
506 u := {
507 signal := { /* See 24.008 9.3.5 */
508 callref := call_id,
509 bearer_cap := omit,
510 called := omit,
511 calling := omit,
512 redirecting := omit,
513 connected := connected,
514 cause := omit,
515 progress := omit,
Harald Welte4017d552018-01-26 21:40:05 +0100516 useruser := omit, /* optional */
517 facility := omit, /* optional */
Harald Welte8b2a2582018-01-16 08:11:42 +0100518 cccap := omit,
Harald Welte4017d552018-01-26 21:40:05 +0100519 ssversion := omit, /* optional */
Harald Welte8b2a2582018-01-16 08:11:42 +0100520 clir_sup := 0,
521 clir_inv := 0,
522 signal := omit,
523 keypad := omit,
524 more := 0,
525 notify := 0,
Harald Welte4017d552018-01-26 21:40:05 +0100526 emergency := omit,
Harald Welte8b2a2582018-01-16 08:11:42 +0100527 imsi := imsi,
Harald Welte4017d552018-01-26 21:40:05 +0100528 lchan_type := 0,
529 lchan_mode := 0
Harald Welte8b2a2582018-01-16 08:11:42 +0100530 }
531 }
532};
533
534/* MO: MSC -> MNCC: SETUP.ind from MSC to ext. MNCC handler */
535template MNCC_PDU tr_MNCC_SETUP_ind(template uint32_t call_id := ?, template MNCC_number called := ?,
536 template MNCC_number calling := *, template charstring imsi :=?) := {
537 msg_type := MNCC_SETUP_IND,
538 u := {
539 signal := { /* See 24.008 9.3.23.2 */
540 callref := call_id,
541 bearer_cap := ?, /* mandatory */
542 called := called, /* mandatory */
543 calling := calling, /* optional */
544 redirecting := omit,
545 connected := omit,
546 cause := omit,
547 progress := omit,
548 useruser := *, /* optional */
549 facility := *, /* optional */
550 cccap := *, /* optional */
551 ssversion := *, /* optional */
552 clir_sup := ?, /* optional */
553 clir_inv := ?, /* optional */
554 signal := omit,
555 keypad := omit,
556 more := 0,
557 notify := 0,
558 emergency := *,
559 imsi := imsi,
560 lchan_type := ?,
561 lchan_mode := ?
562 }
563 }
564
565}
566
567/* MO: MSC <- MNCC: SETUP.cnf; Response to SETUP.ind */
568template MNCC_PDU ts_MNCC_SETUP_CNF(uint32_t call_id, template MNCC_number connected := omit) := {
569 msg_type := MNCC_SETUP_CNF,
570 u := {
571 signal := { /* See 24.008 9.3.5 */
572 callref := call_id,
573 bearer_cap := omit,
574 called := omit,
575 calling := omit,
576 redirecting := omit,
577 connected := connected,
578 cause := omit,
579 progress := *,
580 useruser := *,
581 facility := *,
582 cccap := omit,
583 ssversion := omit,
584 clir_sup := 0,
585 clir_inv := 0,
586 signal := omit,
587 keypad := omit,
588 more := 0,
589 notify := 0,
590 emergency := *,
591 imsi := "",
592 lchan_type := ?,
593 lchan_mode := ?
594 }
595 }
596}
597
Harald Welte4017d552018-01-26 21:40:05 +0100598/* MT: MSC -> MNCC: SETUP_COMPL.req; request to send CONNECT ACK */
599template MNCC_PDU tr_MNCC_SETUP_COMPL_req(template uint32_t call_id) :=
600 tr_MNCC_SIMPLE(MNCC_SETUP_COMPL_REQ, call_id); /* See 24.008 9.3.6 */
Harald Welte8b2a2582018-01-16 08:11:42 +0100601
602/* MT: MSC -> MNCC: SETUP_COMPL.ind; receipt of CONNECT ACK */
603template MNCC_PDU tr_MNCC_SETUP_COMPL_ind(template uint32_t call_id := ?) :=
604 tr_MNCC_SIMPLE(MNCC_SETUP_COMPL_IND, call_id); /* See 24.008 9.3.6 */
605
606/* MT: MSC -> MNCC: REJ.req; reject MT call */
607template MNCC_PDU tr_MNCC_REJ_req(template uint32_t call_id, template MNCC_cause cause := *) := {
608 msg_type := MNCC_REJ_REQ,
609 u := {
610 signal := { /* See 24.008 9.3.19 */
611 callref := call_id,
612 bearer_cap := omit,
613 called := omit,
614 calling := omit,
615 redirecting := omit,
616 connected := omit,
617 cause := cause,
618 progress := omit,
619 useruser := *,
620 facility := *,
621 cccap := omit,
622 ssversion := omit,
623 clir_sup := 0,
624 clir_inv := 0,
625 signal := omit,
626 keypad := omit,
627 more := 0,
628 notify := 0,
629 emergency := omit,
630 imsi := ?,
631 lchan_type := ?,
632 lchan_mode := ?
633 }
634 }
635}
636
637/* MO: MSC <- MNCC: REJ.ind; reject MO call */
638template MNCC_PDU ts_MNCC_REJ_ind(uint32_t call_id, template MNCC_cause cause := omit) := {
639 msg_type := MNCC_REJ_IND,
640 u := {
641 signal := { /* See 24.008 9.3.19 */
642 callref := call_id,
643 bearer_cap := omit,
644 called := omit,
645 calling := omit,
646 redirecting := omit,
647 connected := omit,
648 cause := cause,
649 progress := omit,
650 useruser := omit,
651 facility := omit,
652 cccap := omit,
653 ssversion := omit,
654 clir_sup := 0,
655 clir_inv := 0,
656 signal := omit,
657 keypad := omit,
658 more := 0,
659 notify := 0,
660 emergency := omit,
661 imsi := "",
662 lchan_type := 0,
663 lchan_mode := 0
664 }
665 }
666}
667
668/* MT: MSC <- MNCC: CALL_CONF.req; send CALL CONFIRMED to MS */
669template MNCC_PDU ts_MNCC_CALL_CONF_req(uint32_t call_id, template MNCC_bearer_cap bcap := omit,
670 template MNCC_cause cause := omit,
671 template MNCC_cccap cccap := omit) := {
672 msg_type := MNCC_CALL_CONF_IND,
673 u := {
674 signal := { /* See 24.008 9.3.2 */
675 callref := call_id,
676 bearer_cap := bcap,
677 called := omit,
678 calling := omit,
679 redirecting := omit,
680 connected := omit,
681 cause := cause,
682 progress := omit,
683 useruser := omit,
684 facility := omit,
685 cccap := cccap,
686 ssversion := omit,
687 clir_sup := 0,
688 clir_inv := 0,
689 signal := omit,
690 keypad := omit,
691 more := 0,
692 notify := 0,
693 emergency := omit,
694 imsi := "",
695 lchan_type := 0,
696 lchan_mode := 0
697 }
698 }
699}
700
701/* MO: MSC <- MNCC: CALL_PROC.req; call establishment initiated in network */
702template MNCC_PDU ts_MNCC_CALL_PROC_req(uint32_t call_id, template MNCC_bearer_cap bcap := omit,
703 template MNCC_progress prog := omit,
704 template charstring fac := omit,
705 template MNCC_cccap cccap := omit) := {
706 msg_type := MNCC_CALL_PROC_REQ,
707 u := {
708 signal := { /* See 24.008 9.3.2 */
709 callref := call_id,
710 bearer_cap := bcap,
711 called := omit,
712 calling := omit,
713 redirecting := omit,
714 connected := omit,
715 cause := omit,
716 progress := prog,
717 useruser := omit,
718 facility := fac,
719 cccap := cccap,
720 ssversion := omit,
721 clir_sup := 0,
722 clir_inv := 0,
723 signal := omit,
724 keypad := omit,
725 more := 0,
726 notify := 0,
727 emergency := omit,
728 imsi := "",
729 lchan_type := 0,
730 lchan_mode := 0
731 }
732 }
733}
734
735/* MSC <- MNCC: PROGRESS.req; PROGRESS message from ISDN */
736template MNCC_PDU ts_MNCC_PROGRESS_req(uint32_t call_id, MNCC_progress prog,
737 template MNCC_useruser uu := omit) := {
738 msg_type := MNCC_PROGRESS_REQ,
739 u := {
740 signal := { /* See 24.008 9.3.17 */
741 callref := call_id,
742 bearer_cap := omit,
743 called := omit,
744 calling := omit,
745 redirecting := omit,
746 connected := omit,
747 cause := omit,
748 progress := prog,
749 useruser := uu,
750 facility := omit,
751 cccap := omit,
752 ssversion := omit,
753 clir_sup := 0,
754 clir_inv := 0,
755 signal := omit,
756 keypad := omit,
757 more := 0,
758 notify := 0,
759 emergency := omit,
760 imsi := "",
761 lchan_type := 0,
762 lchan_mode := 0
763 }
764 }
765}
766
767/* MO: MSC <- MNCC: ALERT.req; indicate that user alerting has been initiated */
768template MNCC_PDU ts_MNCC_ALERT_req(uint32_t call_id, template MNCC_progress prog := omit,
769 template charstring fac := omit,
770 template MNCC_useruser uu := omit) := {
771 msg_type := MNCC_ALERT_REQ,
772 u := {
773 signal := { /* See 24.008 9.3.1 */
774 callref := call_id,
775 bearer_cap := omit,
776 called := omit,
777 calling := omit,
778 redirecting := omit,
779 connected := omit,
780 cause := omit,
781 progress := prog,
782 useruser := uu,
783 facility := fac,
784 cccap := omit,
785 ssversion := omit,
786 clir_sup := 0,
787 clir_inv := 0,
788 signal := omit,
789 keypad := omit,
790 more := 0,
791 notify := 0,
792 emergency := omit,
793 imsi := "",
794 lchan_type := 0,
795 lchan_mode := 0
796 }
797 }
798}
799
800
801/* MT: MSC -> MNCC: ALERRT.ind; indicates that mobile user alerting has been initiated */
802template MNCC_PDU tr_MNCC_ALERT_ind(template uint32_t call_id, template MNCC_progress prog := omit,
803 template charstring fac := omit,
804 template MNCC_useruser uu := omit) := {
805 msg_type := MNCC_ALERT_REQ,
806 u := {
807 signal := { /* See 24.008 9.3.1 */
808 callref := call_id,
809 bearer_cap := omit,
810 called := omit,
811 calling := omit,
812 redirecting := omit,
813 connected := omit,
814 cause := omit,
815 progress := prog,
816 useruser := uu,
817 facility := fac,
818 cccap := omit,
819 ssversion := omit,
820 clir_sup := 0,
821 clir_inv := 0,
822 signal := omit,
823 keypad := omit,
824 more := 0,
825 notify := 0,
826 emergency := *,
827 imsi := ?,
828 lchan_type := ?,
829 lchan_mode := ?
830 }
831 }
832}
833
834/* : MSC <- MNCC: NOTIFY.req; request to send information pertaining to a call (such as user suspended) */
835template MNCC_PDU ts_MNCC_NOTIFY_req(uint32_t call_id, MNCC_notify notify) := {
836 msg_type := MNCC_NOTIFY_REQ,
837 u := {
838 signal := { /* See 24.008 9.3.16 */
839 callref := call_id,
840 bearer_cap := omit,
841 called := omit,
842 calling := omit,
843 redirecting := omit,
844 connected := omit,
845 cause := omit,
846 progress := omit,
847 useruser := omit,
848 facility := omit,
849 cccap := omit,
850 ssversion := omit,
851 clir_sup := 0,
852 clir_inv := 0,
853 signal := omit,
854 keypad := omit,
855 more := 0,
856 notify := notify,
857 emergency := omit,
858 imsi := "",
859 lchan_type := 0,
860 lchan_mode := 0
861 }
862 }
863}
864
865/* : MSC -> MNCC: NOTIFY.ind; indication to the mobile user */
866template MNCC_PDU tr_MNCC_NOTIFY_ind(template uint32_t call_id, template MNCC_notify notify) := {
867 msg_type := MNCC_NOTIFY_IND,
868 u := {
869 signal := { /* See 24.008 9.3.16 */
870 callref := call_id,
871 bearer_cap := omit,
872 called := omit,
873 calling := omit,
874 redirecting := omit,
875 connected := omit,
876 cause := omit,
877 progress := omit,
878 useruser := omit,
879 facility := omit,
880 cccap := omit,
881 ssversion := omit,
882 clir_sup := 0,
883 clir_inv := 0,
884 signal := omit,
885 keypad := omit,
886 more := 0,
887 notify := notify,
888 emergency := *,
889 imsi := ?,
890 lchan_type := ?,
891 lchan_mode := ?
892 }
893 }
894}
895
896/* : MSC -> MNCC: DISC.ind; mobile user requests disconnect */
897template MNCC_PDU tr_MNCC_DISC_ind(template uint32_t call_id := ?, template MNCC_cause cause := ?,
898 template MNCC_progress prog := *,
899 template charstring fac := *,
900 template MNCC_useruser uu := *) := {
901 msg_type := MNCC_DISC_IND,
902 u := {
903 signal := { /* See 24.008 9.3.7 */
904 callref := call_id,
905 bearer_cap := omit,
906 called := omit,
907 calling := omit,
908 redirecting := omit,
909 connected := omit,
910 cause := cause,
911 progress := prog,
912 useruser := uu,
913 facility := fac,
914 cccap := omit,
915 ssversion := omit,
916 clir_sup := 0,
917 clir_inv := 0,
918 signal := omit,
919 keypad := omit,
920 more := 0,
921 notify := 0,
922 emergency := *,
923 imsi := ?,
924 lchan_type := ?,
925 lchan_mode := ?
926 }
927 }
928}
929
930/* : MSC <- MNCC: DISC.req; indicate disconnect to mobile user */
931template MNCC_PDU ts_MNCC_DISC_req(uint32_t call_id, MNCC_cause cause,
932 template MNCC_progress prog := omit,
933 template charstring fac := omit,
934 template MNCC_useruser uu := omit) := {
935 msg_type := MNCC_DISC_REQ,
936 u := {
937 signal := { /* See 24.008 9.3.7 */
938 callref := call_id,
939 bearer_cap := omit,
940 called := omit,
941 calling := omit,
942 redirecting := omit,
943 connected := omit,
944 cause := cause,
945 progress := prog,
946 useruser := uu,
947 facility := fac,
948 cccap := omit,
949 ssversion := omit,
950 clir_sup := 0,
951 clir_inv := 0,
952 signal := omit,
953 keypad := omit,
954 more := 0,
955 notify := 0,
956 emergency := omit,
957 imsi := "",
958 lchan_type := 0,
959 lchan_mode := 0
960 }
961 }
962}
963
964/* : MSC -> MNCC: REL.ind; mobile user informs network that user wants to release call + MM */
965template MNCC_PDU tr_MNCC_REL_ind(template uint32_t call_id := ?, template MNCC_cause cause := ?,
966 template charstring fac := *, template MNCC_useruser uu := *) := {
967 msg_type := MNCC_REL_IND,
968 u := {
969 signal := { /* See 24.008 9.3.18 */
970 callref := call_id,
971 bearer_cap := omit,
972 called := omit,
973 calling := omit,
974 redirecting := omit,
975 connected := omit,
976 cause := cause,
977 progress := omit,
978 useruser := uu,
979 facility := fac,
980 cccap := omit,
981 ssversion := omit,
982 clir_sup := 0,
983 clir_inv := 0,
984 signal := omit,
985 keypad := omit,
986 more := 0,
987 notify := 0,
988 emergency := *,
989 imsi := ?,
990 lchan_type := ?,
991 lchan_mode := ?
992 }
993 }
994}
995
996/* : MSC <- MNCC: REL.req; indicate to mobile user tat network intents to release MM */
997template MNCC_PDU ts_MNCC_REL_req(uint32_t call_id, MNCC_cause cause,
998 template charstring fac := omit, template MNCC_useruser uu := omit) := {
999 msg_type := MNCC_REL_REQ,
1000 u := {
1001 signal := { /* See 24.008 9.3.18 */
1002 callref := call_id,
1003 bearer_cap := omit,
1004 called := omit,
1005 calling := omit,
1006 redirecting := omit,
1007 connected := omit,
1008 cause := cause,
1009 progress := omit,
1010 useruser := uu,
1011 facility := fac,
1012 cccap := omit,
1013 ssversion := omit,
1014 clir_sup := 0,
1015 clir_inv := 0,
1016 signal := omit,
1017 keypad := omit,
1018 more := 0,
1019 notify := 0,
1020 emergency := omit,
1021 imsi := "",
1022 lchan_type := 0,
1023 lchan_mode := 0
1024 }
1025 }
1026}
1027
1028/* : MSC -> MNCC: REL.cnf; confirm REL_req */
1029template MNCC_PDU tr_MNCC_REL_cnf(template uint32_t call_id := ?, template MNCC_cause cause := ?,
1030 template charstring fac := *, template MNCC_useruser uu := *)
1031modifies tr_MNCC_REL_ind := {
1032 msg_type := MNCC_REL_CNF
1033};
1034
1035/* : MSC <- MNCC: FACILITY.req; request transmission of facility */
1036template MNCC_PDU ts_MNCC_FACILITY_req(uint32_t call_id, charstring fac) := {
1037 msg_type := MNCC_FACILITY_REQ,
1038 u := {
1039 signal := { /* See 24.008 9.3.9 */
1040 callref := call_id,
1041 bearer_cap := omit,
1042 called := omit,
1043 calling := omit,
1044 redirecting := omit,
1045 connected := omit,
1046 cause := omit,
1047 progress := omit,
1048 useruser := omit,
1049 facility := fac,
1050 cccap := omit,
1051 ssversion := omit,
1052 clir_sup := 0,
1053 clir_inv := 0,
1054 signal := omit,
1055 keypad := omit,
1056 more := 0,
1057 notify := 0,
1058 emergency := omit,
1059 imsi := "",
1060 lchan_type := 0,
1061 lchan_mode := 0
1062 }
1063 }
1064}
1065
1066/* : MSC -> MNCC: FACILITY.req; indicate reception of facility */
1067template MNCC_PDU tr_MNCC_FACILITY_ind(template uint32_t call_id := ?, template charstring fac := ?) := {
1068 msg_type := MNCC_FACILITY_IND,
1069 u := {
1070 signal := { /* See 24.008 9.3.9 */
1071 callref := call_id,
1072 bearer_cap := omit,
1073 called := omit,
1074 calling := omit,
1075 redirecting := omit,
1076 connected := omit,
1077 cause := omit,
1078 progress := omit,
1079 useruser := omit,
1080 facility := fac,
1081 cccap := omit,
1082 ssversion := omit,
1083 clir_sup := 0,
1084 clir_inv := 0,
1085 signal := omit,
1086 keypad := omit,
1087 more := 0,
1088 notify := 0,
1089 emergency := *,
1090 imsi := ?,
1091 lchan_type := ?,
1092 lchan_mode := ?
1093 }
1094 }
1095}
1096
1097/* : MSC -> MNCC: START_DTMF.ind; MS has */
1098template MNCC_PDU tr_MNCC_START_DTMF_ind(template uint32_t call_id := ?, template MNCC_keypad keypad := ?) := {
1099 msg_type := MNCC_START_DTMF_IND,
1100 u := {
1101 signal := { /* See 24.008 9.3.24 */
1102 callref := call_id,
1103 bearer_cap := omit,
1104 called := omit,
1105 calling := omit,
1106 redirecting := omit,
1107 connected := omit,
1108 cause := omit,
1109 progress := omit,
1110 useruser := omit,
1111 facility := omit,
1112 cccap := omit,
1113 ssversion := omit,
1114 clir_sup := 0,
1115 clir_inv := 0,
1116 signal := omit,
1117 keypad := keypad,
1118 more := 0,
1119 notify := 0,
1120 emergency := *,
1121 imsi := ?,
1122 lchan_type := ?,
1123 lchan_mode := ?
1124 }
1125 }
1126}
1127
1128/* : MSC <- MNCC: START_DTMF.rsp; Acknowledge start of DTMF */
1129template MNCC_PDU ts_MNCC_START_DTMF_rsp(uint32_t call_id, MNCC_keypad keypad) := {
1130 msg_type := MNCC_START_DTMF_RSP,
1131 u := {
1132 signal := { /* See 24.008 9.3.25 */
1133 callref := call_id,
1134 bearer_cap := omit,
1135 called := omit,
1136 calling := omit,
1137 redirecting := omit,
1138 connected := omit,
1139 cause := omit,
1140 progress := omit,
1141 useruser := omit,
1142 facility := omit,
1143 cccap := omit,
1144 ssversion := omit,
1145 clir_sup := 0,
1146 clir_inv := 0,
1147 signal := omit,
1148 keypad := keypad,
1149 more := 0,
1150 notify := 0,
1151 emergency := omit,
1152 imsi := "",
1153 lchan_type := 0,
1154 lchan_mode := 0
1155 }
1156 }
1157}
1158
1159/* : MSC <- MNCC: START_DTMF.rsp; Acknowledge start of DTMF */
1160template MNCC_PDU ts_MNCC_START_DTMF_rej(uint32_t call_id, MNCC_cause cause) := {
1161 msg_type := MNCC_START_DTMF_REJ,
1162 u := {
1163 signal := { /* See 24.008 9.3.26 */
1164 callref := call_id,
1165 bearer_cap := omit,
1166 called := omit,
1167 calling := omit,
1168 redirecting := omit,
1169 connected := omit,
1170 cause := cause,
1171 progress := omit,
1172 useruser := omit,
1173 facility := omit,
1174 cccap := omit,
1175 ssversion := omit,
1176 clir_sup := 0,
1177 clir_inv := 0,
1178 signal := omit,
1179 keypad := omit,
1180 more := 0,
1181 notify := 0,
1182 emergency := omit,
1183 imsi := "",
1184 lchan_type := 0,
1185 lchan_mode := 0
1186 }
1187 }
1188}
1189
1190/* : MSC -> MNCC: STOP_DTMF.ind */
1191template MNCC_PDU tr_MNCC_STOP_DTMF_ind(template uint32_t call_id := ?) :=
1192 tr_MNCC_SIMPLE(MNCC_STOP_DTMF_IND, call_id); /* See 24.008 9.3.29 */
1193
1194/* : MSC <- MNCC: STOP_DTMF.rsp; Acknowledge stop of DTMF */
1195template MNCC_PDU ts_MNCC_STOP_DTMF_rsp(uint32_t call_id) :=
1196 ts_MNCC_SIMPLE(MNCC_STOP_DTMF_RSP, call_id); /* See 24.008 9.3.30 */
1197
1198/* : MSC -> MNCC: MODIFY.ind; request to start MO in-call modification */
1199template MNCC_PDU tr_MNCC_MODIFY_ind(template uint32_t call_id := ?, template MNCC_bearer_cap bcap := ?) := {
1200 msg_type := MNCC_MODIFY_IND,
1201 u := {
1202 signal := { /* See 24.008 9.3.14 */
1203 callref := call_id,
1204 bearer_cap := bcap,
1205 called := omit,
1206 calling := omit,
1207 redirecting := omit,
1208 connected := omit,
1209 cause := omit,
1210 progress := omit,
1211 useruser := omit,
1212 facility := omit,
1213 cccap := omit,
1214 ssversion := omit,
1215 clir_sup := 0,
1216 clir_inv := 0,
1217 signal := omit,
1218 keypad := omit,
1219 more := 0,
1220 notify := 0,
1221 emergency := *,
1222 imsi := ?,
1223 lchan_type := ?,
1224 lchan_mode := ?
1225 }
1226 }
1227}
1228
1229/* : MSC <- MNCC: MODIFY.rsp; tespond to MO in-call modification */
1230template MNCC_PDU ts_MNCC_MODIFY_rsp(uint32_t call_id, MNCC_bearer_cap bcap) := {
1231 msg_type := MNCC_MODIFY_RSP,
1232 u := {
1233 signal := { /* See 24.008 9.3.14 */
1234 callref := call_id,
1235 bearer_cap := bcap,
1236 called := omit,
1237 calling := omit,
1238 redirecting := omit,
1239 connected := omit,
1240 cause := omit,
1241 progress := omit,
1242 useruser := omit,
1243 facility := omit,
1244 cccap := omit,
1245 ssversion := omit,
1246 clir_sup := 0,
1247 clir_inv := 0,
1248 signal := omit,
1249 keypad := omit,
1250 more := 0,
1251 notify := 0,
1252 emergency := omit,
1253 imsi := "",
1254 lchan_type := 0,
1255 lchan_mode := 0
1256 }
1257 }
1258}
1259
1260/* : MSC <- MNCC: MODIFY.req; request to start MT in-call modification */
1261template MNCC_PDU ts_MNCC_MODIFY_req(uint32_t call_id, MNCC_bearer_cap bcap) := {
1262 msg_type := MNCC_MODIFY_REQ,
1263 u := {
1264 signal := { /* See 24.008 9.3.14 */
1265 callref := call_id,
1266 bearer_cap := bcap,
1267 called := omit,
1268 calling := omit,
1269 redirecting := omit,
1270 connected := omit,
1271 cause := omit,
1272 progress := omit,
1273 useruser := omit,
1274 facility := omit,
1275 cccap := omit,
1276 ssversion := omit,
1277 clir_sup := 0,
1278 clir_inv := 0,
1279 signal := omit,
1280 keypad := omit,
1281 more := 0,
1282 notify := 0,
1283 emergency := omit,
1284 imsi := "",
1285 lchan_type := 0,
1286 lchan_mode := 0
1287 }
1288 }
1289}
1290
1291/* : MSC -> MNCC: MODIFY.cnf; MS has responded to MT in-call modification */
1292template MNCC_PDU tr_MNCC_MODIFY_cnf(template uint32_t call_id := ?,
1293 template MNCC_bearer_cap bcap := ?) := {
1294 msg_type := MNCC_MODIFY_CNF,
1295 u := {
1296 signal := { /* See 24.008 9.3.14 */
1297 callref := call_id,
1298 bearer_cap := bcap,
1299 called := omit,
1300 calling := omit,
1301 redirecting := omit,
1302 connected := omit,
1303 cause := omit,
1304 progress := omit,
1305 useruser := omit,
1306 facility := omit,
1307 cccap := omit,
1308 ssversion := omit,
1309 clir_sup := 0,
1310 clir_inv := 0,
1311 signal := omit,
1312 keypad := omit,
1313 more := 0,
1314 notify := 0,
1315 emergency := *,
1316 imsi := ?,
1317 lchan_type := ?,
1318 lchan_mode := ?
1319 }
1320 }
1321}
1322
1323/* : MSC <- MNCC: Request transmission of USERINFO to MS */
1324template MNCC_PDU ts_MNCC_USERINFO_req(uint32_t call_id, MNCC_useruser uu, integer more) := {
1325 msg_type := MNCC_USERINFO_REQ,
1326 u := {
1327 signal := { /* See 24.008 9.3.31 */
1328 callref := call_id,
1329 bearer_cap := omit,
1330 called := omit,
1331 calling := omit,
1332 redirecting := omit,
1333 connected := omit,
1334 cause := omit,
1335 progress := omit,
1336 useruser := uu,
1337 facility := omit,
1338 cccap := omit,
1339 ssversion := omit,
1340 clir_sup := 0,
1341 clir_inv := 0,
1342 signal := omit,
1343 keypad := omit,
1344 more := more,
1345 notify := 0,
1346 emergency := omit,
1347 imsi := "",
1348 lchan_type := 0,
1349 lchan_mode := 0
1350 }
1351 }
1352}
1353
1354/* : MSC -> MNCC: Indicate reception of USERINFO from MS */
1355template MNCC_PDU tr_MNCC_USERINFO_ind(template uint32_t call_id := ?, template MNCC_useruser uu := ?,
1356 integer more) := {
1357 msg_type := MNCC_USERINFO_IND,
1358 u := {
1359 signal := { /* See 24.008 9.3.31 */
1360 callref := call_id,
1361 bearer_cap := omit,
1362 called := omit,
1363 calling := omit,
1364 redirecting := omit,
1365 connected := omit,
1366 cause := omit,
1367 progress := omit,
1368 useruser := uu,
1369 facility := omit,
1370 cccap := omit,
1371 ssversion := omit,
1372 clir_sup := 0,
1373 clir_inv := 0,
1374 signal := omit,
1375 keypad := omit,
1376 more := more,
1377 notify := 0,
1378 emergency := omit,
1379 imsi := "",
1380 lchan_type := 0,
1381 lchan_mode := 0
1382 }
1383 }
1384}
1385
1386/* : MSC -> MNCC: HOLD.ind; MS requests hold of call */
1387template MNCC_PDU tr_MNCC_HOLD_ind(template uint32_t call_id := ?) :=
1388 tr_MNCC_SIMPLE(MNCC_HOLD_IND, call_id); /* See 24.008 9.3.10 */
1389
1390/* : MSC <- MNCC: HOLD.cnf; network confirms hold of call */
1391template MNCC_PDU ts_MNCC_HOLD_cnf(uint32_t call_id) :=
1392 ts_MNCC_SIMPLE(MNCC_HOLD_CNF, call_id); /* See 24.008 9.3.11 */
1393
1394/* : MSC <- MNCC: HOLD.rej; network rejects hold of call */
1395template MNCC_PDU ts_MNCC_HOLD_rej(uint32_t call_id, MNCC_cause cause) := {
1396 msg_type := MNCC_HOLD_REJ,
1397 u := {
1398 signal := { /* See 24.008 9.3.12 */
1399 callref := call_id,
1400 bearer_cap := omit,
1401 called := omit,
1402 calling := omit,
1403 redirecting := omit,
1404 connected := omit,
1405 cause := cause,
1406 progress := omit,
1407 useruser := omit,
1408 facility := omit,
1409 cccap := omit,
1410 ssversion := omit,
1411 clir_sup := 0,
1412 clir_inv := 0,
1413 signal := omit,
1414 keypad := omit,
1415 more := 0,
1416 notify := 0,
1417 emergency := omit,
1418 imsi := "",
1419 lchan_type := 0,
1420 lchan_mode := 0
1421 }
1422 }
1423}
1424
1425/* : MSC -> MNCC: RETRIEVE.ind; MS requests retrieval of held call */
1426template MNCC_PDU tr_MNCC_RETRIEVE_ind(template uint32_t call_id := ?) :=
1427 tr_MNCC_SIMPLE(MNCC_RETRIEVE_IND, call_id); /* See 24.008 9.3.20 */
1428
1429/* : MSC <- MNCC: RETRIEVE.cnf; network confirms retrieve of call */
1430template MNCC_PDU ts_MNCC_RETRIEVE_cnf(uint32_t call_id) :=
1431 ts_MNCC_SIMPLE(MNCC_RETRIEVE_CNF, call_id); /* See 24.008 9.3.21 */
1432
1433/* : MSC <- MNCC: RETRIEVE.rej; network rejects retrieve of call */
1434template MNCC_PDU ts_MNCC_RETRIEVE_rej(uint32_t call_id, MNCC_cause cause)
1435modifies ts_MNCC_HOLD_rej := { /* See 24.008 9.3.22 */
1436 msg_type := MNCC_RETRIEVE_REJ
1437}
1438
1439
1440template MNCC_PDU ts_MNCC_SIMPLE_RTP(MNCC_MsgType msg_type, uint32_t call_id) := {
1441 msg_type := msg_type,
1442 u := {
1443 rtp := {
1444 callref := call_id,
1445 ip := 0,
1446 rtp_port := 0,
1447 payload_type := 0,
1448 payload_msg_type := 0
1449 }
1450 }
1451}
1452
1453/* MSC <- MNCC: RTP_CREATE.req; request creation of RTP */
1454template MNCC_PDU ts_MNCC_RTP_CREATE(uint32_t call_id) := ts_MNCC_SIMPLE_RTP(MNCC_RTP_CREATE, call_id);
1455
1456/* MSC -> MNCC: RTP_CREATE.rsp; acknowledge creation of RTP (stating MSC side IP/Port) */
1457template MNCC_PDU tr_MNCC_RTP_CREATE(template uint32_t call_id := ?) := {
1458 msg_type := MNCC_RTP_CREATE,
1459 u := {
1460 rtp := {
1461 callref := call_id,
1462 ip := ?,
1463 rtp_port := ?,
1464 payload_type := ?,
1465 payload_msg_type := ?
1466 }
1467 }
1468}
1469
1470/* MSC <- MNCC: RTP_CONNECT.req; request connect of RTP */
1471template MNCC_PDU ts_MNCC_RTP_CONNECT(uint32_t call_id, uint32_t ip, uint32_t rtp_port, uint32_t pt) := {
1472 msg_type := MNCC_RTP_CONNECT,
1473 u := {
1474 rtp := {
1475 callref := call_id,
1476 ip := ip,
1477 rtp_port := rtp_port,
1478 payload_type := pt,
1479 payload_msg_type := 0
1480 }
1481 }
1482}
1483
1484/* MSC <- MNCC: RTP_FREE.req; request connect of RTP */
1485template 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 +01001486
Harald Welte251b52b2018-01-17 13:58:16 +01001487function f_mncc_get_call_id(MNCC_PDU pdu) return uint32_t {
1488 if (ischosen(pdu.u.rtp)) {
1489 return pdu.u.rtp.callref;
1490 } else if (ischosen(pdu.u.data)) {
1491 return pdu.u.data.callref;
1492 } else if (ischosen(pdu.u.signal)) {
1493 return pdu.u.signal.callref;
1494 } else {
1495 setverdict(fail, "Unable to determine Callref for MNCC", pdu);
1496 self.stop
1497 }
1498}
1499
Harald Welte474fd7d2017-12-29 16:01:39 +01001500} with { encode "RAW" ; variant "FIELDORDER(msb)" }