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