Harald Welte | 34b5a95 | 2019-05-27 11:54:11 +0200 | [diff] [blame] | 1 | /* 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 Welte | 474fd7d | 2017-12-29 16:01:39 +0100 | [diff] [blame] | 13 | module MNCC_Types { |
| 14 | |
| 15 | import from Osmocom_Types all; |
| 16 | |
| 17 | /* for architectures where 'int' is 32bit like x86_64 */ |
| 18 | type integer int with { variant "FIELDLENGTH(32)" }; |
| 19 | |
| 20 | |
| 21 | /* GSM 04.08 Bearer Capability: Rate Adaption */ |
| 22 | type 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 */ |
| 30 | type enumerated GSM48_bcap_sig_access { |
Harald Welte | ec3d065 | 2018-01-22 02:54:13 +0100 | [diff] [blame] | 31 | GSM48_BCAP_SA_NONE (0), |
Harald Welte | 474fd7d | 2017-12-29 16:01:39 +0100 | [diff] [blame] | 32 | 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 */ |
| 41 | type enumerated GSM48_bcap_user_rate { |
Harald Welte | ec3d065 | 2018-01-22 02:54:13 +0100 | [diff] [blame] | 42 | GSM48_BCAP_UR_NONE (0), |
Harald Welte | 474fd7d | 2017-12-29 16:01:39 +0100 | [diff] [blame] | 43 | 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 */ |
| 53 | type 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 */ |
| 62 | type enumerated GSM48_bcap_interm_rate { |
Harald Welte | ec3d065 | 2018-01-22 02:54:13 +0100 | [diff] [blame] | 63 | GSM48_BCAP_IR_NONE (0), |
Harald Welte | 474fd7d | 2017-12-29 16:01:39 +0100 | [diff] [blame] | 64 | GSM48_BCAP_IR_8k (2), |
| 65 | GSM48_BCAP_IR_16k (3) |
| 66 | }; |
| 67 | |
| 68 | /* GSM 04.08 Bearer Capability: Transparency */ |
| 69 | type 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 */ |
| 77 | type 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 | |
| 89 | type 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 Yanitskiy | e0bb4f0 | 2018-11-01 03:40:38 +0700 | [diff] [blame] | 130 | 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 Welte | 474fd7d | 2017-12-29 16:01:39 +0100 | [diff] [blame] | 137 | |
| 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 | |
| 155 | const integer GSM_MAX_FACILITY := 128; |
| 156 | const integer GSM_MAX_SSVERSION := 128; |
| 157 | const integer GSM_MAX_USERUSER := 128; |
| 158 | |
| 159 | type 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 | |
| 172 | type record length(0..8) of int MNCC_speech_vers; |
| 173 | |
| 174 | /* Expanded fields from GSM TS 04.08, Table 10.5.102 */ |
| 175 | type 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 | |
| 185 | template 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 Welte | 515f5d1 | 2018-01-22 02:55:10 +0100 | [diff] [blame] | 191 | speech_ver := { 0, 2, 4, 1, 5, -1 }, |
Harald Welte | 474fd7d | 2017-12-29 16:01:39 +0100 | [diff] [blame] | 192 | data := omit |
| 193 | }; |
| 194 | |
| 195 | type 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 */ |
| 204 | type 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 */ |
| 216 | type 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 */ |
| 225 | type 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 | |
| 232 | type 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 Welte | fe75a20 | 2018-01-17 13:59:20 +0100 | [diff] [blame] | 239 | /* 24.008 Table 10.5.122 */ |
| 240 | type 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 | |
| 247 | type 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 Welte | 474fd7d | 2017-12-29 16:01:39 +0100 | [diff] [blame] | 259 | |
Harald Welte | d748a05 | 2018-01-22 02:59:24 +0100 | [diff] [blame] | 260 | template (value) MNCC_number ts_MNCC_number(charstring number, |
Harald Welte | 474fd7d | 2017-12-29 16:01:39 +0100 | [diff] [blame] | 261 | 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 Welte | d748a05 | 2018-01-22 02:59:24 +0100 | [diff] [blame] | 272 | template 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 Welte | 474fd7d | 2017-12-29 16:01:39 +0100 | [diff] [blame] | 284 | type record MNCC_cause { |
Harald Welte | fe75a20 | 2018-01-17 13:59:20 +0100 | [diff] [blame] | 285 | GSM48_cause_loc location, |
| 286 | GSM48_cause_coding coding, |
Harald Welte | 474fd7d | 2017-12-29 16:01:39 +0100 | [diff] [blame] | 287 | int rec, |
| 288 | int rec_val, |
| 289 | int val, |
| 290 | octetstring diag |
Harald Welte | fe75a20 | 2018-01-17 13:59:20 +0100 | [diff] [blame] | 291 | } with { |
| 292 | variant (location) "FIELDLENGTH(32)"; |
| 293 | variant (coding) "FIELDLENGTH(32)"; |
| 294 | } |
Harald Welte | 474fd7d | 2017-12-29 16:01:39 +0100 | [diff] [blame] | 295 | |
Harald Welte | 9093839 | 2018-03-25 16:36:40 +0200 | [diff] [blame] | 296 | template (value) MNCC_cause ts_MNCC_cause(int val, |
Harald Welte | 2bb825f | 2018-01-22 11:31:18 +0100 | [diff] [blame] | 297 | 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 Welte | 474fd7d | 2017-12-29 16:01:39 +0100 | [diff] [blame] | 308 | type record MNCC_useruser { |
| 309 | int proto, |
| 310 | charstring info |
| 311 | }; |
| 312 | |
| 313 | type record MNCC_progress { |
| 314 | int coding, |
| 315 | int location, |
| 316 | int descr |
| 317 | }; |
| 318 | |
| 319 | type record MNCC_cccap { |
| 320 | int dtmf, |
| 321 | int pcp |
| 322 | }; |
| 323 | |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 324 | type int MNCC_notify (0..127); |
Harald Welte | d13700d | 2018-02-02 20:06:52 +0100 | [diff] [blame] | 325 | type charstring MNCC_keypad length (1); |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 326 | |
Harald Welte | 474fd7d | 2017-12-29 16:01:39 +0100 | [diff] [blame] | 327 | type 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 | |
| 337 | type 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 Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 356 | MNCC_keypad keypad optional, |
Harald Welte | 474fd7d | 2017-12-29 16:01:39 +0100 | [diff] [blame] | 357 | int more, |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 358 | MNCC_notify notify, |
Harald Welte | 474fd7d | 2017-12-29 16:01:39 +0100 | [diff] [blame] | 359 | int emergency optional, |
| 360 | charstring imsi, |
| 361 | |
| 362 | uint8_t lchan_type, /* empty in OSmoMSC */ |
Neels Hofmeyr | 06b859c | 2019-11-12 01:23:04 +0100 | [diff] [blame] | 363 | uint8_t lchan_mode, /* empty in OsmoMSC */ |
| 364 | |
| 365 | charstring sdp optional |
Harald Welte | 474fd7d | 2017-12-29 16:01:39 +0100 | [diff] [blame] | 366 | }; |
| 367 | |
| 368 | |
| 369 | type record MNCC_PDU_Data { |
| 370 | uint32_t callref, |
| 371 | octetstring data |
| 372 | }; |
| 373 | |
| 374 | type record MNCC_PDU_Rtp { |
| 375 | uint32_t callref, |
Pau Espin Pedrol | 563b3d0 | 2020-09-09 20:19:52 +0200 | [diff] [blame] | 376 | boolean is_ipv6, |
| 377 | octetstring ip, |
Harald Welte | 474fd7d | 2017-12-29 16:01:39 +0100 | [diff] [blame] | 378 | uint16_t rtp_port, |
| 379 | uint32_t payload_type, |
Neels Hofmeyr | 06b859c | 2019-11-12 01:23:04 +0100 | [diff] [blame] | 380 | uint32_t payload_msg_type, |
| 381 | |
| 382 | charstring sdp optional |
Harald Welte | 474fd7d | 2017-12-29 16:01:39 +0100 | [diff] [blame] | 383 | }; |
| 384 | |
| 385 | type record MNCC_PDU_Hello { |
| 386 | uint32_t version, |
| 387 | uint32_t mncc_size, |
| 388 | uint32_t data_frame_size, |
| 389 | uint32_t called_offset, |
| 390 | uint32_t signal_offset, |
| 391 | uint32_t emergency_offset, |
| 392 | uint32_t lchan_type_offset |
| 393 | }; |
| 394 | |
| 395 | |
| 396 | type union MNCC_MsgUnion { |
| 397 | MNCC_PDU_Signal signal, |
| 398 | MNCC_PDU_Data data, |
| 399 | MNCC_PDU_Rtp rtp, |
| 400 | MNCC_PDU_Hello hello |
| 401 | }; |
| 402 | |
| 403 | |
| 404 | type record MNCC_PDU { |
| 405 | MNCC_MsgType msg_type, |
| 406 | MNCC_MsgUnion u |
| 407 | } with { variant (u) "CROSSTAG( |
| 408 | hello, msg_type = MNCC_SOCKET_HELLO; |
| 409 | rtp, { msg_type = MNCC_RTP_CREATE, |
| 410 | msg_type = MNCC_RTP_CONNECT, |
| 411 | msg_type = MNCC_RTP_FREE }; |
| 412 | data, { msg_type = GSM_TCHF_FRAME, |
| 413 | msg_type = GSM_TCHF_FRAME_EFR, |
| 414 | msg_type = GSM_TCHH_FRAME, |
| 415 | msg_type = GSM_TCH_FRAME_AMR, |
| 416 | msg_type = GSM_BAD_FRAME }; |
| 417 | signal, OTHERWISE |
| 418 | )" |
| 419 | }; |
| 420 | |
| 421 | external function enc_MNCC_PDU(in MNCC_PDU pdu) return octetstring; |
| 422 | |
| 423 | external function dec_MNCC_PDU(in octetstring stream) return MNCC_PDU; |
| 424 | |
Pau Espin Pedrol | 563b3d0 | 2020-09-09 20:19:52 +0200 | [diff] [blame] | 425 | external function set_MNCC_version(in integer version) return boolean; |
| 426 | |
Harald Welte | 1450953 | 2018-03-24 22:32:01 +0100 | [diff] [blame] | 427 | template (value) MNCC_PDU ts_MNCC_HELLO(uint32_t version := 5) := { |
| 428 | msg_type := MNCC_SOCKET_HELLO, |
| 429 | u := { |
| 430 | hello := { |
| 431 | version := version, |
| 432 | mncc_size := 836, |
| 433 | data_frame_size := 8, |
| 434 | called_offset := 104, |
| 435 | signal_offset := 796, |
| 436 | emergency_offset := 812, |
| 437 | lchan_type_offset := 0 |
| 438 | } |
| 439 | } |
| 440 | } |
Harald Welte | 474fd7d | 2017-12-29 16:01:39 +0100 | [diff] [blame] | 441 | |
| 442 | template MNCC_PDU ts_MNCC_Sign(MNCC_MsgType msg_type, MNCC_PDU_Signal sign) := { |
| 443 | msg_type := msg_type, |
| 444 | u := { |
| 445 | signal := sign |
| 446 | } |
| 447 | } |
| 448 | |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 449 | template MNCC_PDU ts_MNCC_SIMPLE(MNCC_MsgType msg_type, uint32_t call_id) := { |
| 450 | msg_type := msg_type, |
Harald Welte | 474fd7d | 2017-12-29 16:01:39 +0100 | [diff] [blame] | 451 | u := { |
| 452 | signal := { |
| 453 | callref := call_id, |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 454 | bearer_cap := omit, |
| 455 | called := omit, |
| 456 | calling := omit, |
Harald Welte | 474fd7d | 2017-12-29 16:01:39 +0100 | [diff] [blame] | 457 | redirecting := omit, |
| 458 | connected := omit, |
| 459 | cause := omit, |
| 460 | progress := omit, |
| 461 | useruser := omit, |
| 462 | facility := omit, |
| 463 | cccap := omit, |
| 464 | ssversion := omit, |
| 465 | clir_sup := 0, |
| 466 | clir_inv := 0, |
| 467 | signal := omit, |
| 468 | keypad := omit, |
| 469 | more := 0, |
| 470 | notify := 0, |
| 471 | emergency := omit, |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 472 | imsi := "", |
| 473 | lchan_type := 0, |
Neels Hofmeyr | 06b859c | 2019-11-12 01:23:04 +0100 | [diff] [blame] | 474 | lchan_mode := 0, |
| 475 | sdp := "" |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 476 | } |
| 477 | } |
| 478 | } |
| 479 | |
| 480 | template MNCC_PDU tr_MNCC_SIMPLE(template MNCC_MsgType msg_type, template uint32_t call_id) := { |
| 481 | msg_type := msg_type, |
| 482 | u := { |
| 483 | signal := { |
| 484 | callref := call_id, |
| 485 | bearer_cap := omit, |
| 486 | called := omit, |
| 487 | calling := omit, |
| 488 | redirecting := omit, |
| 489 | connected := omit, |
| 490 | cause := omit, |
| 491 | progress := omit, |
| 492 | useruser := omit, |
| 493 | facility := omit, |
| 494 | cccap := omit, |
| 495 | ssversion := omit, |
| 496 | clir_sup := 0, |
| 497 | clir_inv := 0, |
| 498 | signal := omit, |
| 499 | keypad := omit, |
| 500 | more := 0, |
| 501 | notify := 0, |
| 502 | emergency := *, |
| 503 | imsi := ?, |
| 504 | lchan_type := ?, |
Neels Hofmeyr | 06b859c | 2019-11-12 01:23:04 +0100 | [diff] [blame] | 505 | lchan_mode := ?, |
| 506 | sdp := * |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 507 | } |
| 508 | } |
| 509 | } |
| 510 | |
| 511 | |
| 512 | |
| 513 | /* MT: MSC <- MNCC: SETUP.req from ext. MNCC handler to MSC */ |
| 514 | template MNCC_PDU ts_MNCC_SETUP_req(uint32_t call_id, charstring called, charstring calling, charstring imsi := "") := { |
| 515 | msg_type := MNCC_SETUP_REQ, |
| 516 | u := { |
| 517 | signal := { /* See 24.008 9.3.23.1 */ |
| 518 | callref := call_id, |
| 519 | bearer_cap := ts_MNCC_bcap_voice, /* mandatory */ |
| 520 | called := valueof(ts_MNCC_number(called)), /* optional */ |
| 521 | calling := valueof(ts_MNCC_number(calling)), /* optional */ |
| 522 | redirecting := omit, /* optional */ |
| 523 | connected := omit, |
| 524 | cause := omit, |
| 525 | progress := omit, /* optional */ |
| 526 | useruser := omit, /* optional */ |
| 527 | facility := omit, /* optional */ |
| 528 | cccap := omit, |
| 529 | ssversion := omit, |
| 530 | clir_sup := 0, |
| 531 | clir_inv := 0, |
| 532 | signal := omit, /* optional */ |
| 533 | keypad := omit, |
| 534 | more := 0, |
| 535 | notify := 0, |
| 536 | emergency := omit, |
| 537 | imsi := imsi, |
Harald Welte | 474fd7d | 2017-12-29 16:01:39 +0100 | [diff] [blame] | 538 | lchan_type := 0, |
Neels Hofmeyr | 06b859c | 2019-11-12 01:23:04 +0100 | [diff] [blame] | 539 | lchan_mode := 0, |
| 540 | sdp := "" |
Harald Welte | 474fd7d | 2017-12-29 16:01:39 +0100 | [diff] [blame] | 541 | } |
| 542 | } |
| 543 | }; |
Harald Welte | b0d9360 | 2018-03-20 18:09:34 +0100 | [diff] [blame] | 544 | template MNCC_PDU tr_MNCC_SETUP_req(template uint32_t call_id := ?, |
| 545 | template charstring called := ?, |
| 546 | template charstring calling := *, |
| 547 | template charstring imsi := ?) := { |
| 548 | msg_type := MNCC_SETUP_REQ, |
| 549 | u := { |
| 550 | signal := { /* See 24.008 9.3.23.1 */ |
| 551 | callref := call_id, |
| 552 | bearer_cap := *, /* mandatory in CC */ |
| 553 | called := tr_MNCC_number(called), /* optional */ |
| 554 | calling := tr_MNCC_number(calling), /* optional */ |
| 555 | redirecting := *, /* optional */ |
| 556 | connected := omit, |
| 557 | cause := omit, |
| 558 | progress := *, /* optional */ |
| 559 | useruser := *, /* optional */ |
| 560 | facility := *, /* optional */ |
| 561 | cccap := omit, |
| 562 | ssversion := omit, |
| 563 | clir_sup := 0, |
| 564 | clir_inv := 0, |
| 565 | signal := *, /* optional */ |
| 566 | keypad := omit, |
| 567 | more := 0, |
| 568 | notify := 0, |
| 569 | emergency := *, |
| 570 | imsi := imsi, |
| 571 | lchan_type := ?, |
Neels Hofmeyr | 06b859c | 2019-11-12 01:23:04 +0100 | [diff] [blame] | 572 | lchan_mode := ?, |
| 573 | sdp := * |
Harald Welte | b0d9360 | 2018-03-20 18:09:34 +0100 | [diff] [blame] | 574 | } |
| 575 | } |
| 576 | }; |
| 577 | |
Harald Welte | 474fd7d | 2017-12-29 16:01:39 +0100 | [diff] [blame] | 578 | |
Harald Welte | 4017d55 | 2018-01-26 21:40:05 +0100 | [diff] [blame] | 579 | /* MO: MSC <- MNCC: Respons to SETUP.ind */ |
| 580 | template MNCC_PDU ts_MNCC_SETUP_rsp(uint32_t call_id, charstring imsi := "", |
| 581 | template MNCC_number connected := omit) := { |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 582 | msg_type := MNCC_SETUP_RSP, |
| 583 | u := { |
| 584 | signal := { /* See 24.008 9.3.5 */ |
| 585 | callref := call_id, |
| 586 | bearer_cap := omit, |
| 587 | called := omit, |
| 588 | calling := omit, |
| 589 | redirecting := omit, |
| 590 | connected := connected, |
| 591 | cause := omit, |
| 592 | progress := omit, |
Harald Welte | 4017d55 | 2018-01-26 21:40:05 +0100 | [diff] [blame] | 593 | useruser := omit, /* optional */ |
| 594 | facility := omit, /* optional */ |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 595 | cccap := omit, |
Harald Welte | 4017d55 | 2018-01-26 21:40:05 +0100 | [diff] [blame] | 596 | ssversion := omit, /* optional */ |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 597 | clir_sup := 0, |
| 598 | clir_inv := 0, |
| 599 | signal := omit, |
| 600 | keypad := omit, |
| 601 | more := 0, |
| 602 | notify := 0, |
Harald Welte | 4017d55 | 2018-01-26 21:40:05 +0100 | [diff] [blame] | 603 | emergency := omit, |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 604 | imsi := imsi, |
Harald Welte | 4017d55 | 2018-01-26 21:40:05 +0100 | [diff] [blame] | 605 | lchan_type := 0, |
Neels Hofmeyr | 06b859c | 2019-11-12 01:23:04 +0100 | [diff] [blame] | 606 | lchan_mode := 0, |
| 607 | sdp := "" |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 608 | } |
| 609 | } |
| 610 | }; |
Harald Welte | 9093839 | 2018-03-25 16:36:40 +0200 | [diff] [blame] | 611 | template MNCC_PDU tr_MNCC_SETUP_rsp(template uint32_t call_id, |
| 612 | template charstring imsi := ?, |
| 613 | template MNCC_number connected := *) := { |
| 614 | msg_type := MNCC_SETUP_RSP, |
| 615 | u := { |
| 616 | signal := { /* See 24.008 9.3.5 */ |
| 617 | callref := call_id, |
| 618 | bearer_cap := omit, |
| 619 | called := omit, |
| 620 | calling := omit, |
| 621 | redirecting := omit, |
| 622 | connected := connected, |
| 623 | cause := omit, |
| 624 | progress := omit, |
| 625 | useruser := *, /* optional */ |
| 626 | facility := *, /* optional */ |
| 627 | cccap := omit, |
| 628 | ssversion := *, /* optional */ |
| 629 | clir_sup := 0, |
| 630 | clir_inv := 0, |
| 631 | signal := omit, |
| 632 | keypad := omit, |
| 633 | more := 0, |
| 634 | notify := 0, |
| 635 | emergency := omit, |
| 636 | imsi := imsi, |
| 637 | lchan_type := ?, |
Neels Hofmeyr | 06b859c | 2019-11-12 01:23:04 +0100 | [diff] [blame] | 638 | lchan_mode := ?, |
| 639 | sdp := * |
Harald Welte | 9093839 | 2018-03-25 16:36:40 +0200 | [diff] [blame] | 640 | } |
| 641 | } |
| 642 | }; |
| 643 | |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 644 | |
| 645 | /* MO: MSC -> MNCC: SETUP.ind from MSC to ext. MNCC handler */ |
| 646 | template MNCC_PDU tr_MNCC_SETUP_ind(template uint32_t call_id := ?, template MNCC_number called := ?, |
| 647 | template MNCC_number calling := *, template charstring imsi :=?) := { |
| 648 | msg_type := MNCC_SETUP_IND, |
| 649 | u := { |
| 650 | signal := { /* See 24.008 9.3.23.2 */ |
| 651 | callref := call_id, |
| 652 | bearer_cap := ?, /* mandatory */ |
| 653 | called := called, /* mandatory */ |
| 654 | calling := calling, /* optional */ |
| 655 | redirecting := omit, |
| 656 | connected := omit, |
| 657 | cause := omit, |
| 658 | progress := omit, |
| 659 | useruser := *, /* optional */ |
| 660 | facility := *, /* optional */ |
| 661 | cccap := *, /* optional */ |
| 662 | ssversion := *, /* optional */ |
| 663 | clir_sup := ?, /* optional */ |
| 664 | clir_inv := ?, /* optional */ |
| 665 | signal := omit, |
| 666 | keypad := omit, |
| 667 | more := 0, |
| 668 | notify := 0, |
| 669 | emergency := *, |
| 670 | imsi := imsi, |
| 671 | lchan_type := ?, |
Neels Hofmeyr | 06b859c | 2019-11-12 01:23:04 +0100 | [diff] [blame] | 672 | lchan_mode := ?, |
| 673 | sdp := * |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 674 | } |
| 675 | } |
Harald Welte | afec471 | 2018-03-19 22:52:17 +0100 | [diff] [blame] | 676 | } |
| 677 | template (value) MNCC_PDU ts_MNCC_SETUP_ind(uint32_t call_id, MNCC_number called, |
| 678 | template (omit) MNCC_number calling := omit, |
| 679 | template (omit) charstring imsi := omit, |
| 680 | template (value) MNCC_bearer_cap bcap := ts_MNCC_bcap_voice) := { |
| 681 | msg_type := MNCC_SETUP_IND, |
| 682 | u := { |
| 683 | signal := { /* See 24.008 9.3.23.2 */ |
| 684 | callref := call_id, |
| 685 | bearer_cap := valueof(bcap), /* mandatory */ |
| 686 | called := called, /* mandatory */ |
| 687 | calling := calling, /* optional */ |
| 688 | redirecting := omit, |
| 689 | connected := omit, |
| 690 | cause := omit, |
| 691 | progress := omit, |
| 692 | useruser := omit, /* optional */ |
| 693 | facility := omit, /* optional */ |
| 694 | cccap := omit, /* optional */ |
| 695 | ssversion := omit, /* optional */ |
| 696 | clir_sup := 0, /* optional */ |
| 697 | clir_inv := 0, /* optional */ |
| 698 | signal := omit, |
| 699 | keypad := omit, |
| 700 | more := 0, |
| 701 | notify := 0, |
| 702 | emergency := omit, |
| 703 | imsi := imsi, |
| 704 | lchan_type := 0, |
Neels Hofmeyr | 06b859c | 2019-11-12 01:23:04 +0100 | [diff] [blame] | 705 | lchan_mode := 0, |
| 706 | sdp := "" |
Harald Welte | afec471 | 2018-03-19 22:52:17 +0100 | [diff] [blame] | 707 | } |
| 708 | } |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 709 | } |
| 710 | |
| 711 | /* MO: MSC <- MNCC: SETUP.cnf; Response to SETUP.ind */ |
| 712 | template MNCC_PDU ts_MNCC_SETUP_CNF(uint32_t call_id, template MNCC_number connected := omit) := { |
| 713 | msg_type := MNCC_SETUP_CNF, |
| 714 | u := { |
| 715 | signal := { /* See 24.008 9.3.5 */ |
| 716 | callref := call_id, |
| 717 | bearer_cap := omit, |
| 718 | called := omit, |
| 719 | calling := omit, |
| 720 | redirecting := omit, |
| 721 | connected := connected, |
| 722 | cause := omit, |
Harald Welte | b0d9360 | 2018-03-20 18:09:34 +0100 | [diff] [blame] | 723 | progress := omit, |
| 724 | useruser := omit, |
| 725 | facility := omit, |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 726 | cccap := omit, |
| 727 | ssversion := omit, |
| 728 | clir_sup := 0, |
| 729 | clir_inv := 0, |
| 730 | signal := omit, |
| 731 | keypad := omit, |
| 732 | more := 0, |
| 733 | notify := 0, |
Harald Welte | b0d9360 | 2018-03-20 18:09:34 +0100 | [diff] [blame] | 734 | emergency := omit, |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 735 | imsi := "", |
Harald Welte | b0d9360 | 2018-03-20 18:09:34 +0100 | [diff] [blame] | 736 | lchan_type := 0, |
Neels Hofmeyr | 06b859c | 2019-11-12 01:23:04 +0100 | [diff] [blame] | 737 | lchan_mode := 0, |
| 738 | sdp := "" |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 739 | } |
| 740 | } |
| 741 | } |
| 742 | |
Harald Welte | 33ec09b | 2018-02-10 15:34:46 +0100 | [diff] [blame] | 743 | /* MT: MSC -> MNCC: SETUP.cnf; Response to SETUP.req */ |
| 744 | template MNCC_PDU tr_MNCC_SETUP_cnf(uint32_t call_id, template MNCC_number connected := *) := { |
| 745 | msg_type := MNCC_SETUP_CNF, |
| 746 | u := { |
| 747 | signal := { /* See 24.008 9.3.5 */ |
| 748 | callref := call_id, |
| 749 | bearer_cap := omit, |
| 750 | called := omit, |
| 751 | calling := omit, |
| 752 | redirecting := omit, |
| 753 | connected := connected, |
| 754 | cause := omit, |
| 755 | progress := *, |
| 756 | useruser := *, |
| 757 | facility := *, |
| 758 | cccap := omit, |
| 759 | ssversion := omit, |
| 760 | clir_sup := 0, |
| 761 | clir_inv := 0, |
| 762 | signal := omit, |
| 763 | keypad := omit, |
| 764 | more := 0, |
| 765 | notify := 0, |
| 766 | emergency := *, |
| 767 | imsi := ?, |
| 768 | lchan_type := ?, |
Neels Hofmeyr | 06b859c | 2019-11-12 01:23:04 +0100 | [diff] [blame] | 769 | lchan_mode := ?, |
| 770 | sdp := * |
Harald Welte | 33ec09b | 2018-02-10 15:34:46 +0100 | [diff] [blame] | 771 | } |
| 772 | } |
| 773 | } |
| 774 | |
Harald Welte | 4017d55 | 2018-01-26 21:40:05 +0100 | [diff] [blame] | 775 | /* MT: MSC -> MNCC: SETUP_COMPL.req; request to send CONNECT ACK */ |
| 776 | template MNCC_PDU tr_MNCC_SETUP_COMPL_req(template uint32_t call_id) := |
| 777 | tr_MNCC_SIMPLE(MNCC_SETUP_COMPL_REQ, call_id); /* See 24.008 9.3.6 */ |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 778 | |
| 779 | /* MT: MSC -> MNCC: SETUP_COMPL.ind; receipt of CONNECT ACK */ |
| 780 | template MNCC_PDU tr_MNCC_SETUP_COMPL_ind(template uint32_t call_id := ?) := |
| 781 | tr_MNCC_SIMPLE(MNCC_SETUP_COMPL_IND, call_id); /* See 24.008 9.3.6 */ |
Harald Welte | 9093839 | 2018-03-25 16:36:40 +0200 | [diff] [blame] | 782 | template (value) MNCC_PDU ts_MNCC_SETUP_COMPL_ind(uint32_t call_id) := |
| 783 | ts_MNCC_SIMPLE(MNCC_SETUP_COMPL_IND, call_id); /* See 24.008 9.3.6 */ |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 784 | |
| 785 | /* MT: MSC -> MNCC: REJ.req; reject MT call */ |
| 786 | template MNCC_PDU tr_MNCC_REJ_req(template uint32_t call_id, template MNCC_cause cause := *) := { |
| 787 | msg_type := MNCC_REJ_REQ, |
| 788 | u := { |
| 789 | signal := { /* See 24.008 9.3.19 */ |
| 790 | callref := call_id, |
| 791 | bearer_cap := omit, |
| 792 | called := omit, |
| 793 | calling := omit, |
| 794 | redirecting := omit, |
| 795 | connected := omit, |
| 796 | cause := cause, |
| 797 | progress := omit, |
| 798 | useruser := *, |
| 799 | facility := *, |
| 800 | cccap := omit, |
| 801 | ssversion := omit, |
| 802 | clir_sup := 0, |
| 803 | clir_inv := 0, |
| 804 | signal := omit, |
| 805 | keypad := omit, |
| 806 | more := 0, |
| 807 | notify := 0, |
| 808 | emergency := omit, |
| 809 | imsi := ?, |
| 810 | lchan_type := ?, |
Neels Hofmeyr | 06b859c | 2019-11-12 01:23:04 +0100 | [diff] [blame] | 811 | lchan_mode := ?, |
| 812 | sdp := * |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 813 | } |
| 814 | } |
| 815 | } |
| 816 | |
| 817 | /* MO: MSC <- MNCC: REJ.ind; reject MO call */ |
| 818 | template MNCC_PDU ts_MNCC_REJ_ind(uint32_t call_id, template MNCC_cause cause := omit) := { |
| 819 | msg_type := MNCC_REJ_IND, |
| 820 | u := { |
| 821 | signal := { /* See 24.008 9.3.19 */ |
| 822 | callref := call_id, |
| 823 | bearer_cap := omit, |
| 824 | called := omit, |
| 825 | calling := omit, |
| 826 | redirecting := omit, |
| 827 | connected := omit, |
| 828 | cause := cause, |
| 829 | progress := omit, |
| 830 | useruser := omit, |
| 831 | facility := omit, |
| 832 | cccap := omit, |
| 833 | ssversion := omit, |
| 834 | clir_sup := 0, |
| 835 | clir_inv := 0, |
| 836 | signal := omit, |
| 837 | keypad := omit, |
| 838 | more := 0, |
| 839 | notify := 0, |
| 840 | emergency := omit, |
| 841 | imsi := "", |
| 842 | lchan_type := 0, |
Neels Hofmeyr | 06b859c | 2019-11-12 01:23:04 +0100 | [diff] [blame] | 843 | lchan_mode := 0, |
| 844 | sdp := "" |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 845 | } |
| 846 | } |
| 847 | } |
| 848 | |
Harald Welte | 812f7a4 | 2018-01-27 00:49:18 +0100 | [diff] [blame] | 849 | /* MT: MSC -> MNCC: CALL_CONF.req; send CALL CONFIRMED to MS */ |
| 850 | template MNCC_PDU tr_MNCC_CALL_CONF_ind(template uint32_t call_id, template MNCC_bearer_cap bcap := *, |
| 851 | template MNCC_cause cause := *, |
| 852 | template MNCC_cccap cccap := *) := { |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 853 | msg_type := MNCC_CALL_CONF_IND, |
| 854 | u := { |
| 855 | signal := { /* See 24.008 9.3.2 */ |
| 856 | callref := call_id, |
| 857 | bearer_cap := bcap, |
| 858 | called := omit, |
| 859 | calling := omit, |
| 860 | redirecting := omit, |
| 861 | connected := omit, |
| 862 | cause := cause, |
| 863 | progress := omit, |
| 864 | useruser := omit, |
| 865 | facility := omit, |
| 866 | cccap := cccap, |
| 867 | ssversion := omit, |
| 868 | clir_sup := 0, |
| 869 | clir_inv := 0, |
| 870 | signal := omit, |
| 871 | keypad := omit, |
| 872 | more := 0, |
| 873 | notify := 0, |
| 874 | emergency := omit, |
Harald Welte | 812f7a4 | 2018-01-27 00:49:18 +0100 | [diff] [blame] | 875 | imsi := ?, |
| 876 | lchan_type := ?, |
Neels Hofmeyr | 06b859c | 2019-11-12 01:23:04 +0100 | [diff] [blame] | 877 | lchan_mode := ?, |
| 878 | sdp := * |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 879 | } |
| 880 | } |
| 881 | } |
Harald Welte | b0d9360 | 2018-03-20 18:09:34 +0100 | [diff] [blame] | 882 | template MNCC_PDU ts_MNCC_CALL_CONF_ind(uint32_t call_id, |
| 883 | template (omit) MNCC_bearer_cap bcap := omit, |
| 884 | template (omit) MNCC_cause cause := omit, |
| 885 | template (omit) MNCC_cccap cccap := omit) := { |
| 886 | msg_type := MNCC_CALL_CONF_IND, |
| 887 | u := { |
| 888 | signal := { /* See 24.008 9.3.2 */ |
| 889 | callref := call_id, |
| 890 | bearer_cap := bcap, |
| 891 | called := omit, |
| 892 | calling := omit, |
| 893 | redirecting := omit, |
| 894 | connected := omit, |
| 895 | cause := cause, |
| 896 | progress := omit, |
| 897 | useruser := omit, |
| 898 | facility := omit, |
| 899 | cccap := cccap, |
| 900 | ssversion := omit, |
| 901 | clir_sup := 0, |
| 902 | clir_inv := 0, |
| 903 | signal := omit, |
| 904 | keypad := omit, |
| 905 | more := 0, |
| 906 | notify := 0, |
| 907 | emergency := omit, |
| 908 | imsi := "", |
| 909 | lchan_type := 0, |
Neels Hofmeyr | 06b859c | 2019-11-12 01:23:04 +0100 | [diff] [blame] | 910 | lchan_mode := 0, |
| 911 | sdp := "" |
Harald Welte | b0d9360 | 2018-03-20 18:09:34 +0100 | [diff] [blame] | 912 | } |
| 913 | } |
| 914 | } |
| 915 | |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 916 | |
| 917 | /* MO: MSC <- MNCC: CALL_PROC.req; call establishment initiated in network */ |
| 918 | template MNCC_PDU ts_MNCC_CALL_PROC_req(uint32_t call_id, template MNCC_bearer_cap bcap := omit, |
| 919 | template MNCC_progress prog := omit, |
| 920 | template charstring fac := omit, |
| 921 | template MNCC_cccap cccap := omit) := { |
| 922 | msg_type := MNCC_CALL_PROC_REQ, |
| 923 | u := { |
| 924 | signal := { /* See 24.008 9.3.2 */ |
| 925 | callref := call_id, |
| 926 | bearer_cap := bcap, |
| 927 | called := omit, |
| 928 | calling := omit, |
| 929 | redirecting := omit, |
| 930 | connected := omit, |
| 931 | cause := omit, |
| 932 | progress := prog, |
| 933 | useruser := omit, |
| 934 | facility := fac, |
| 935 | cccap := cccap, |
| 936 | ssversion := omit, |
| 937 | clir_sup := 0, |
| 938 | clir_inv := 0, |
| 939 | signal := omit, |
| 940 | keypad := omit, |
| 941 | more := 0, |
| 942 | notify := 0, |
| 943 | emergency := omit, |
| 944 | imsi := "", |
| 945 | lchan_type := 0, |
Neels Hofmeyr | 06b859c | 2019-11-12 01:23:04 +0100 | [diff] [blame] | 946 | lchan_mode := 0, |
| 947 | sdp := "" |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 948 | } |
| 949 | } |
| 950 | } |
Harald Welte | 9093839 | 2018-03-25 16:36:40 +0200 | [diff] [blame] | 951 | template MNCC_PDU tr_MNCC_CALL_PROC_req(template uint32_t call_id, |
| 952 | template MNCC_bearer_cap bcap := *, |
| 953 | template MNCC_progress prog := *, |
| 954 | template charstring fac := *, |
| 955 | template MNCC_cccap cccap := *) := { |
| 956 | msg_type := MNCC_CALL_PROC_REQ, |
| 957 | u := { |
| 958 | signal := { /* See 24.008 9.3.2 */ |
| 959 | callref := call_id, |
| 960 | bearer_cap := bcap, |
| 961 | called := omit, |
| 962 | calling := omit, |
| 963 | redirecting := omit, |
| 964 | connected := omit, |
| 965 | cause := omit, |
| 966 | progress := prog, |
| 967 | useruser := omit, |
| 968 | facility := fac, |
| 969 | cccap := cccap, |
| 970 | ssversion := omit, |
| 971 | clir_sup := 0, |
| 972 | clir_inv := 0, |
| 973 | signal := omit, |
| 974 | keypad := omit, |
| 975 | more := 0, |
| 976 | notify := 0, |
| 977 | emergency := omit, |
| 978 | imsi := ?, |
| 979 | lchan_type := ?, |
Neels Hofmeyr | 06b859c | 2019-11-12 01:23:04 +0100 | [diff] [blame] | 980 | lchan_mode := ?, |
| 981 | sdp := * |
Harald Welte | 9093839 | 2018-03-25 16:36:40 +0200 | [diff] [blame] | 982 | } |
| 983 | } |
| 984 | } |
| 985 | |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 986 | |
| 987 | /* MSC <- MNCC: PROGRESS.req; PROGRESS message from ISDN */ |
| 988 | template MNCC_PDU ts_MNCC_PROGRESS_req(uint32_t call_id, MNCC_progress prog, |
| 989 | template MNCC_useruser uu := omit) := { |
| 990 | msg_type := MNCC_PROGRESS_REQ, |
| 991 | u := { |
| 992 | signal := { /* See 24.008 9.3.17 */ |
| 993 | callref := call_id, |
| 994 | bearer_cap := omit, |
| 995 | called := omit, |
| 996 | calling := omit, |
| 997 | redirecting := omit, |
| 998 | connected := omit, |
| 999 | cause := omit, |
| 1000 | progress := prog, |
| 1001 | useruser := uu, |
| 1002 | facility := omit, |
| 1003 | cccap := omit, |
| 1004 | ssversion := omit, |
| 1005 | clir_sup := 0, |
| 1006 | clir_inv := 0, |
| 1007 | signal := omit, |
| 1008 | keypad := omit, |
| 1009 | more := 0, |
| 1010 | notify := 0, |
| 1011 | emergency := omit, |
| 1012 | imsi := "", |
| 1013 | lchan_type := 0, |
Neels Hofmeyr | 06b859c | 2019-11-12 01:23:04 +0100 | [diff] [blame] | 1014 | lchan_mode := 0, |
| 1015 | sdp := "" |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 1016 | } |
| 1017 | } |
| 1018 | } |
| 1019 | |
| 1020 | /* MO: MSC <- MNCC: ALERT.req; indicate that user alerting has been initiated */ |
| 1021 | template MNCC_PDU ts_MNCC_ALERT_req(uint32_t call_id, template MNCC_progress prog := omit, |
| 1022 | template charstring fac := omit, |
| 1023 | template MNCC_useruser uu := omit) := { |
| 1024 | msg_type := MNCC_ALERT_REQ, |
| 1025 | u := { |
| 1026 | signal := { /* See 24.008 9.3.1 */ |
| 1027 | callref := call_id, |
| 1028 | bearer_cap := omit, |
| 1029 | called := omit, |
| 1030 | calling := omit, |
| 1031 | redirecting := omit, |
| 1032 | connected := omit, |
| 1033 | cause := omit, |
| 1034 | progress := prog, |
| 1035 | useruser := uu, |
| 1036 | facility := fac, |
| 1037 | cccap := omit, |
| 1038 | ssversion := omit, |
| 1039 | clir_sup := 0, |
| 1040 | clir_inv := 0, |
| 1041 | signal := omit, |
| 1042 | keypad := omit, |
| 1043 | more := 0, |
| 1044 | notify := 0, |
| 1045 | emergency := omit, |
| 1046 | imsi := "", |
| 1047 | lchan_type := 0, |
Neels Hofmeyr | 06b859c | 2019-11-12 01:23:04 +0100 | [diff] [blame] | 1048 | lchan_mode := 0, |
| 1049 | sdp := "" |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 1050 | } |
| 1051 | } |
| 1052 | } |
Harald Welte | 9093839 | 2018-03-25 16:36:40 +0200 | [diff] [blame] | 1053 | template MNCC_PDU tr_MNCC_ALERT_req(template uint32_t call_id, |
| 1054 | template MNCC_progress prog := *, |
| 1055 | template charstring fac := *, |
| 1056 | template MNCC_useruser uu := *) := { |
| 1057 | msg_type := MNCC_ALERT_REQ, |
| 1058 | u := { |
| 1059 | signal := { /* See 24.008 9.3.1 */ |
| 1060 | callref := call_id, |
| 1061 | bearer_cap := omit, |
| 1062 | called := omit, |
| 1063 | calling := omit, |
| 1064 | redirecting := omit, |
| 1065 | connected := omit, |
| 1066 | cause := omit, |
| 1067 | progress := prog, |
| 1068 | useruser := uu, |
| 1069 | facility := fac, |
| 1070 | cccap := omit, |
| 1071 | ssversion := omit, |
| 1072 | clir_sup := 0, |
| 1073 | clir_inv := 0, |
| 1074 | signal := omit, |
| 1075 | keypad := omit, |
| 1076 | more := 0, |
| 1077 | notify := 0, |
| 1078 | emergency := omit, |
| 1079 | imsi := ?, |
| 1080 | lchan_type := ?, |
Neels Hofmeyr | 06b859c | 2019-11-12 01:23:04 +0100 | [diff] [blame] | 1081 | lchan_mode := ?, |
| 1082 | sdp := * |
Harald Welte | 9093839 | 2018-03-25 16:36:40 +0200 | [diff] [blame] | 1083 | } |
| 1084 | } |
| 1085 | } |
| 1086 | |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 1087 | |
| 1088 | |
| 1089 | /* MT: MSC -> MNCC: ALERRT.ind; indicates that mobile user alerting has been initiated */ |
| 1090 | template MNCC_PDU tr_MNCC_ALERT_ind(template uint32_t call_id, template MNCC_progress prog := omit, |
| 1091 | template charstring fac := omit, |
| 1092 | template MNCC_useruser uu := omit) := { |
Harald Welte | 33ec09b | 2018-02-10 15:34:46 +0100 | [diff] [blame] | 1093 | msg_type := MNCC_ALERT_IND, |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 1094 | u := { |
| 1095 | signal := { /* See 24.008 9.3.1 */ |
| 1096 | callref := call_id, |
| 1097 | bearer_cap := omit, |
| 1098 | called := omit, |
| 1099 | calling := omit, |
| 1100 | redirecting := omit, |
| 1101 | connected := omit, |
| 1102 | cause := omit, |
| 1103 | progress := prog, |
| 1104 | useruser := uu, |
| 1105 | facility := fac, |
| 1106 | cccap := omit, |
| 1107 | ssversion := omit, |
| 1108 | clir_sup := 0, |
| 1109 | clir_inv := 0, |
| 1110 | signal := omit, |
| 1111 | keypad := omit, |
| 1112 | more := 0, |
| 1113 | notify := 0, |
| 1114 | emergency := *, |
| 1115 | imsi := ?, |
| 1116 | lchan_type := ?, |
Neels Hofmeyr | 06b859c | 2019-11-12 01:23:04 +0100 | [diff] [blame] | 1117 | lchan_mode := ?, |
| 1118 | sdp := * |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 1119 | } |
| 1120 | } |
| 1121 | } |
Harald Welte | b0d9360 | 2018-03-20 18:09:34 +0100 | [diff] [blame] | 1122 | template (value) MNCC_PDU ts_MNCC_ALERT_ind(uint32_t call_id, |
| 1123 | template (omit) MNCC_progress prog := omit, |
| 1124 | template (omit) charstring fac := omit, |
| 1125 | template (omit) MNCC_useruser uu := omit) := { |
| 1126 | msg_type := MNCC_ALERT_IND, |
| 1127 | u := { |
| 1128 | signal := { /* See 24.008 9.3.1 */ |
| 1129 | callref := call_id, |
| 1130 | bearer_cap := omit, |
| 1131 | called := omit, |
| 1132 | calling := omit, |
| 1133 | redirecting := omit, |
| 1134 | connected := omit, |
| 1135 | cause := omit, |
| 1136 | progress := prog, |
| 1137 | useruser := uu, |
| 1138 | facility := fac, |
| 1139 | cccap := omit, |
| 1140 | ssversion := omit, |
| 1141 | clir_sup := 0, |
| 1142 | clir_inv := 0, |
| 1143 | signal := omit, |
| 1144 | keypad := omit, |
| 1145 | more := 0, |
| 1146 | notify := 0, |
| 1147 | emergency := omit, |
| 1148 | imsi := "", |
| 1149 | lchan_type := 0, |
Neels Hofmeyr | 06b859c | 2019-11-12 01:23:04 +0100 | [diff] [blame] | 1150 | lchan_mode := 0, |
| 1151 | sdp := "" |
Harald Welte | b0d9360 | 2018-03-20 18:09:34 +0100 | [diff] [blame] | 1152 | } |
| 1153 | } |
| 1154 | } |
| 1155 | |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 1156 | |
| 1157 | /* : MSC <- MNCC: NOTIFY.req; request to send information pertaining to a call (such as user suspended) */ |
| 1158 | template MNCC_PDU ts_MNCC_NOTIFY_req(uint32_t call_id, MNCC_notify notify) := { |
| 1159 | msg_type := MNCC_NOTIFY_REQ, |
| 1160 | u := { |
| 1161 | signal := { /* See 24.008 9.3.16 */ |
| 1162 | callref := call_id, |
| 1163 | bearer_cap := omit, |
| 1164 | called := omit, |
| 1165 | calling := omit, |
| 1166 | redirecting := omit, |
| 1167 | connected := omit, |
| 1168 | cause := omit, |
| 1169 | progress := omit, |
| 1170 | useruser := omit, |
| 1171 | facility := omit, |
| 1172 | cccap := omit, |
| 1173 | ssversion := omit, |
| 1174 | clir_sup := 0, |
| 1175 | clir_inv := 0, |
| 1176 | signal := omit, |
| 1177 | keypad := omit, |
| 1178 | more := 0, |
| 1179 | notify := notify, |
| 1180 | emergency := omit, |
| 1181 | imsi := "", |
| 1182 | lchan_type := 0, |
Neels Hofmeyr | 06b859c | 2019-11-12 01:23:04 +0100 | [diff] [blame] | 1183 | lchan_mode := 0, |
| 1184 | sdp := "" |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 1185 | } |
| 1186 | } |
| 1187 | } |
| 1188 | |
| 1189 | /* : MSC -> MNCC: NOTIFY.ind; indication to the mobile user */ |
| 1190 | template MNCC_PDU tr_MNCC_NOTIFY_ind(template uint32_t call_id, template MNCC_notify notify) := { |
| 1191 | msg_type := MNCC_NOTIFY_IND, |
| 1192 | u := { |
| 1193 | signal := { /* See 24.008 9.3.16 */ |
| 1194 | callref := call_id, |
| 1195 | bearer_cap := omit, |
| 1196 | called := omit, |
| 1197 | calling := omit, |
| 1198 | redirecting := omit, |
| 1199 | connected := omit, |
| 1200 | cause := omit, |
| 1201 | progress := omit, |
| 1202 | useruser := omit, |
| 1203 | facility := omit, |
| 1204 | cccap := omit, |
| 1205 | ssversion := omit, |
| 1206 | clir_sup := 0, |
| 1207 | clir_inv := 0, |
| 1208 | signal := omit, |
| 1209 | keypad := omit, |
| 1210 | more := 0, |
| 1211 | notify := notify, |
| 1212 | emergency := *, |
| 1213 | imsi := ?, |
| 1214 | lchan_type := ?, |
Neels Hofmeyr | 06b859c | 2019-11-12 01:23:04 +0100 | [diff] [blame] | 1215 | lchan_mode := ?, |
| 1216 | sdp := * |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 1217 | } |
| 1218 | } |
| 1219 | } |
| 1220 | |
| 1221 | /* : MSC -> MNCC: DISC.ind; mobile user requests disconnect */ |
| 1222 | template MNCC_PDU tr_MNCC_DISC_ind(template uint32_t call_id := ?, template MNCC_cause cause := ?, |
| 1223 | template MNCC_progress prog := *, |
| 1224 | template charstring fac := *, |
| 1225 | template MNCC_useruser uu := *) := { |
| 1226 | msg_type := MNCC_DISC_IND, |
| 1227 | u := { |
| 1228 | signal := { /* See 24.008 9.3.7 */ |
| 1229 | callref := call_id, |
| 1230 | bearer_cap := omit, |
| 1231 | called := omit, |
| 1232 | calling := omit, |
| 1233 | redirecting := omit, |
| 1234 | connected := omit, |
| 1235 | cause := cause, |
| 1236 | progress := prog, |
| 1237 | useruser := uu, |
| 1238 | facility := fac, |
| 1239 | cccap := omit, |
| 1240 | ssversion := omit, |
| 1241 | clir_sup := 0, |
| 1242 | clir_inv := 0, |
| 1243 | signal := omit, |
| 1244 | keypad := omit, |
| 1245 | more := 0, |
| 1246 | notify := 0, |
| 1247 | emergency := *, |
| 1248 | imsi := ?, |
| 1249 | lchan_type := ?, |
Neels Hofmeyr | 06b859c | 2019-11-12 01:23:04 +0100 | [diff] [blame] | 1250 | lchan_mode := ?, |
| 1251 | sdp := * |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 1252 | } |
| 1253 | } |
| 1254 | } |
Harald Welte | 9093839 | 2018-03-25 16:36:40 +0200 | [diff] [blame] | 1255 | template (value) MNCC_PDU ts_MNCC_DISC_ind(uint32_t call_id, template (value) MNCC_cause cause, |
| 1256 | template (omit) MNCC_progress prog := omit, |
| 1257 | template (omit) charstring fac := omit, |
| 1258 | template (omit) MNCC_useruser uu := omit) := { |
| 1259 | msg_type := MNCC_DISC_IND, |
| 1260 | u := { |
| 1261 | signal := { /* See 24.008 9.3.7 */ |
| 1262 | callref := call_id, |
| 1263 | bearer_cap := omit, |
| 1264 | called := omit, |
| 1265 | calling := omit, |
| 1266 | redirecting := omit, |
| 1267 | connected := omit, |
| 1268 | cause := cause, |
| 1269 | progress := prog, |
| 1270 | useruser := uu, |
| 1271 | facility := fac, |
| 1272 | cccap := omit, |
| 1273 | ssversion := omit, |
| 1274 | clir_sup := 0, |
| 1275 | clir_inv := 0, |
| 1276 | signal := omit, |
| 1277 | keypad := omit, |
| 1278 | more := 0, |
| 1279 | notify := 0, |
| 1280 | emergency := omit, |
| 1281 | imsi := "", |
| 1282 | lchan_type := 0, |
Neels Hofmeyr | 06b859c | 2019-11-12 01:23:04 +0100 | [diff] [blame] | 1283 | lchan_mode := 0, |
| 1284 | sdp := "" |
Harald Welte | 9093839 | 2018-03-25 16:36:40 +0200 | [diff] [blame] | 1285 | } |
| 1286 | } |
| 1287 | } |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 1288 | |
| 1289 | /* : MSC <- MNCC: DISC.req; indicate disconnect to mobile user */ |
| 1290 | template MNCC_PDU ts_MNCC_DISC_req(uint32_t call_id, MNCC_cause cause, |
| 1291 | template MNCC_progress prog := omit, |
| 1292 | template charstring fac := omit, |
| 1293 | template MNCC_useruser uu := omit) := { |
| 1294 | msg_type := MNCC_DISC_REQ, |
| 1295 | u := { |
| 1296 | signal := { /* See 24.008 9.3.7 */ |
| 1297 | callref := call_id, |
| 1298 | bearer_cap := omit, |
| 1299 | called := omit, |
| 1300 | calling := omit, |
| 1301 | redirecting := omit, |
| 1302 | connected := omit, |
| 1303 | cause := cause, |
| 1304 | progress := prog, |
| 1305 | useruser := uu, |
| 1306 | facility := fac, |
| 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 := omit, |
| 1316 | imsi := "", |
| 1317 | lchan_type := 0, |
Neels Hofmeyr | 06b859c | 2019-11-12 01:23:04 +0100 | [diff] [blame] | 1318 | lchan_mode := 0, |
| 1319 | sdp := "" |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 1320 | } |
| 1321 | } |
| 1322 | } |
Harald Welte | 9093839 | 2018-03-25 16:36:40 +0200 | [diff] [blame] | 1323 | template MNCC_PDU tr_MNCC_DISC_req(template uint32_t call_id, |
| 1324 | template MNCC_cause cause := *, |
| 1325 | template MNCC_progress prog := omit, |
| 1326 | template charstring fac := omit, |
| 1327 | template MNCC_useruser uu := omit) := { |
| 1328 | msg_type := MNCC_DISC_REQ, |
| 1329 | u := { |
| 1330 | signal := { /* See 24.008 9.3.7 */ |
| 1331 | callref := call_id, |
| 1332 | bearer_cap := omit, |
| 1333 | called := omit, |
| 1334 | calling := omit, |
| 1335 | redirecting := omit, |
| 1336 | connected := omit, |
| 1337 | cause := cause, |
| 1338 | progress := prog, |
| 1339 | useruser := uu, |
| 1340 | facility := fac, |
| 1341 | cccap := omit, |
| 1342 | ssversion := omit, |
| 1343 | clir_sup := 0, |
| 1344 | clir_inv := 0, |
| 1345 | signal := omit, |
| 1346 | keypad := omit, |
| 1347 | more := 0, |
| 1348 | notify := 0, |
| 1349 | emergency := *, |
| 1350 | imsi := ?, |
| 1351 | lchan_type := ?, |
Neels Hofmeyr | 06b859c | 2019-11-12 01:23:04 +0100 | [diff] [blame] | 1352 | lchan_mode := ?, |
| 1353 | sdp := * |
Harald Welte | 9093839 | 2018-03-25 16:36:40 +0200 | [diff] [blame] | 1354 | } |
| 1355 | } |
| 1356 | } |
| 1357 | |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 1358 | |
| 1359 | /* : MSC -> MNCC: REL.ind; mobile user informs network that user wants to release call + MM */ |
| 1360 | template MNCC_PDU tr_MNCC_REL_ind(template uint32_t call_id := ?, template MNCC_cause cause := ?, |
| 1361 | template charstring fac := *, template MNCC_useruser uu := *) := { |
| 1362 | msg_type := MNCC_REL_IND, |
| 1363 | u := { |
| 1364 | signal := { /* See 24.008 9.3.18 */ |
| 1365 | callref := call_id, |
| 1366 | bearer_cap := omit, |
| 1367 | called := omit, |
| 1368 | calling := omit, |
| 1369 | redirecting := omit, |
| 1370 | connected := omit, |
| 1371 | cause := cause, |
| 1372 | progress := omit, |
| 1373 | useruser := uu, |
| 1374 | facility := fac, |
| 1375 | cccap := omit, |
| 1376 | ssversion := omit, |
| 1377 | clir_sup := 0, |
| 1378 | clir_inv := 0, |
| 1379 | signal := omit, |
| 1380 | keypad := omit, |
| 1381 | more := 0, |
| 1382 | notify := 0, |
| 1383 | emergency := *, |
| 1384 | imsi := ?, |
| 1385 | lchan_type := ?, |
Neels Hofmeyr | 06b859c | 2019-11-12 01:23:04 +0100 | [diff] [blame] | 1386 | lchan_mode := ?, |
| 1387 | sdp := * |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 1388 | } |
| 1389 | } |
| 1390 | } |
Harald Welte | 9093839 | 2018-03-25 16:36:40 +0200 | [diff] [blame] | 1391 | template (value) MNCC_PDU ts_MNCC_REL_ind(uint32_t call_id, |
| 1392 | template (value) MNCC_cause cause, |
| 1393 | template (omit) charstring fac := omit, |
| 1394 | template (omit) MNCC_useruser uu := omit) := { |
| 1395 | msg_type := MNCC_REL_IND, |
| 1396 | u := { |
| 1397 | signal := { /* See 24.008 9.3.18 */ |
| 1398 | callref := call_id, |
| 1399 | bearer_cap := omit, |
| 1400 | called := omit, |
| 1401 | calling := omit, |
| 1402 | redirecting := omit, |
| 1403 | connected := omit, |
| 1404 | cause := cause, |
| 1405 | progress := omit, |
| 1406 | useruser := uu, |
| 1407 | facility := fac, |
| 1408 | cccap := omit, |
| 1409 | ssversion := omit, |
| 1410 | clir_sup := 0, |
| 1411 | clir_inv := 0, |
| 1412 | signal := omit, |
| 1413 | keypad := omit, |
| 1414 | more := 0, |
| 1415 | notify := 0, |
| 1416 | emergency := omit, |
| 1417 | imsi := "", |
| 1418 | lchan_type := 0, |
Neels Hofmeyr | 06b859c | 2019-11-12 01:23:04 +0100 | [diff] [blame] | 1419 | lchan_mode := 0, |
| 1420 | sdp := "" |
Harald Welte | 9093839 | 2018-03-25 16:36:40 +0200 | [diff] [blame] | 1421 | } |
| 1422 | } |
| 1423 | } |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 1424 | |
| 1425 | /* : MSC <- MNCC: REL.req; indicate to mobile user tat network intents to release MM */ |
| 1426 | template MNCC_PDU ts_MNCC_REL_req(uint32_t call_id, MNCC_cause cause, |
| 1427 | template charstring fac := omit, template MNCC_useruser uu := omit) := { |
| 1428 | msg_type := MNCC_REL_REQ, |
| 1429 | u := { |
| 1430 | signal := { /* See 24.008 9.3.18 */ |
| 1431 | callref := call_id, |
| 1432 | bearer_cap := omit, |
| 1433 | called := omit, |
| 1434 | calling := omit, |
| 1435 | redirecting := omit, |
| 1436 | connected := omit, |
| 1437 | cause := cause, |
| 1438 | progress := omit, |
| 1439 | useruser := uu, |
| 1440 | facility := fac, |
| 1441 | cccap := omit, |
| 1442 | ssversion := omit, |
| 1443 | clir_sup := 0, |
| 1444 | clir_inv := 0, |
| 1445 | signal := omit, |
| 1446 | keypad := omit, |
| 1447 | more := 0, |
| 1448 | notify := 0, |
| 1449 | emergency := omit, |
| 1450 | imsi := "", |
| 1451 | lchan_type := 0, |
Neels Hofmeyr | 06b859c | 2019-11-12 01:23:04 +0100 | [diff] [blame] | 1452 | lchan_mode := 0, |
| 1453 | sdp := "" |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 1454 | } |
| 1455 | } |
| 1456 | } |
Harald Welte | 9093839 | 2018-03-25 16:36:40 +0200 | [diff] [blame] | 1457 | template MNCC_PDU tr_MNCC_REL_req(template uint32_t call_id, template MNCC_cause cause := *, |
| 1458 | template charstring fac := *, template MNCC_useruser uu := *) := { |
| 1459 | msg_type := MNCC_REL_REQ, |
| 1460 | u := { |
| 1461 | signal := { /* See 24.008 9.3.18 */ |
| 1462 | callref := call_id, |
| 1463 | bearer_cap := omit, |
| 1464 | called := *, |
| 1465 | calling := *, |
| 1466 | redirecting := *, |
| 1467 | connected := *, |
| 1468 | cause := cause, |
| 1469 | progress := omit, |
| 1470 | useruser := uu, |
| 1471 | facility := fac, |
| 1472 | cccap := omit, |
| 1473 | ssversion := omit, |
| 1474 | clir_sup := 0, |
| 1475 | clir_inv := 0, |
| 1476 | signal := omit, |
| 1477 | keypad := omit, |
| 1478 | more := 0, |
| 1479 | notify := 0, |
| 1480 | emergency := omit, |
| 1481 | imsi := ?, |
| 1482 | lchan_type := 0, |
Neels Hofmeyr | 06b859c | 2019-11-12 01:23:04 +0100 | [diff] [blame] | 1483 | lchan_mode := 0, |
Oliver Smith | 81a2546 | 2019-11-28 13:40:37 +0100 | [diff] [blame] | 1484 | sdp := * |
Harald Welte | 9093839 | 2018-03-25 16:36:40 +0200 | [diff] [blame] | 1485 | } |
| 1486 | } |
| 1487 | } |
| 1488 | |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 1489 | |
| 1490 | /* : MSC -> MNCC: REL.cnf; confirm REL_req */ |
| 1491 | template MNCC_PDU tr_MNCC_REL_cnf(template uint32_t call_id := ?, template MNCC_cause cause := ?, |
| 1492 | template charstring fac := *, template MNCC_useruser uu := *) |
| 1493 | modifies tr_MNCC_REL_ind := { |
| 1494 | msg_type := MNCC_REL_CNF |
| 1495 | }; |
Harald Welte | 9093839 | 2018-03-25 16:36:40 +0200 | [diff] [blame] | 1496 | template (value) MNCC_PDU ts_MNCC_REL_cnf(uint32_t call_id, |
| 1497 | template (value) MNCC_cause cause, |
| 1498 | template (omit) charstring fac := omit, |
| 1499 | template (omit) MNCC_useruser uu := omit) |
| 1500 | modifies ts_MNCC_REL_ind := { |
| 1501 | msg_type := MNCC_REL_CNF |
| 1502 | }; |
| 1503 | |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 1504 | |
| 1505 | /* : MSC <- MNCC: FACILITY.req; request transmission of facility */ |
| 1506 | template MNCC_PDU ts_MNCC_FACILITY_req(uint32_t call_id, charstring fac) := { |
| 1507 | msg_type := MNCC_FACILITY_REQ, |
| 1508 | u := { |
| 1509 | signal := { /* See 24.008 9.3.9 */ |
| 1510 | callref := call_id, |
| 1511 | bearer_cap := omit, |
| 1512 | called := omit, |
| 1513 | calling := omit, |
| 1514 | redirecting := omit, |
| 1515 | connected := omit, |
| 1516 | cause := omit, |
| 1517 | progress := omit, |
| 1518 | useruser := omit, |
| 1519 | facility := fac, |
| 1520 | cccap := omit, |
| 1521 | ssversion := omit, |
| 1522 | clir_sup := 0, |
| 1523 | clir_inv := 0, |
| 1524 | signal := omit, |
| 1525 | keypad := omit, |
| 1526 | more := 0, |
| 1527 | notify := 0, |
| 1528 | emergency := omit, |
| 1529 | imsi := "", |
| 1530 | lchan_type := 0, |
Neels Hofmeyr | 06b859c | 2019-11-12 01:23:04 +0100 | [diff] [blame] | 1531 | lchan_mode := 0, |
| 1532 | sdp := "" |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 1533 | } |
| 1534 | } |
| 1535 | } |
| 1536 | |
| 1537 | /* : MSC -> MNCC: FACILITY.req; indicate reception of facility */ |
| 1538 | template MNCC_PDU tr_MNCC_FACILITY_ind(template uint32_t call_id := ?, template charstring fac := ?) := { |
| 1539 | msg_type := MNCC_FACILITY_IND, |
| 1540 | u := { |
| 1541 | signal := { /* See 24.008 9.3.9 */ |
| 1542 | callref := call_id, |
| 1543 | bearer_cap := omit, |
| 1544 | called := omit, |
| 1545 | calling := omit, |
| 1546 | redirecting := omit, |
| 1547 | connected := omit, |
| 1548 | cause := omit, |
| 1549 | progress := omit, |
| 1550 | useruser := omit, |
| 1551 | facility := fac, |
| 1552 | cccap := omit, |
| 1553 | ssversion := omit, |
| 1554 | clir_sup := 0, |
| 1555 | clir_inv := 0, |
| 1556 | signal := omit, |
| 1557 | keypad := omit, |
| 1558 | more := 0, |
| 1559 | notify := 0, |
| 1560 | emergency := *, |
| 1561 | imsi := ?, |
| 1562 | lchan_type := ?, |
Neels Hofmeyr | 06b859c | 2019-11-12 01:23:04 +0100 | [diff] [blame] | 1563 | lchan_mode := ?, |
| 1564 | sdp := * |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 1565 | } |
| 1566 | } |
| 1567 | } |
| 1568 | |
| 1569 | /* : MSC -> MNCC: START_DTMF.ind; MS has */ |
| 1570 | template MNCC_PDU tr_MNCC_START_DTMF_ind(template uint32_t call_id := ?, template MNCC_keypad keypad := ?) := { |
| 1571 | msg_type := MNCC_START_DTMF_IND, |
| 1572 | u := { |
| 1573 | signal := { /* See 24.008 9.3.24 */ |
| 1574 | callref := call_id, |
| 1575 | bearer_cap := omit, |
| 1576 | called := omit, |
| 1577 | calling := omit, |
| 1578 | redirecting := omit, |
| 1579 | connected := omit, |
| 1580 | cause := omit, |
| 1581 | progress := omit, |
| 1582 | useruser := omit, |
| 1583 | facility := omit, |
| 1584 | cccap := omit, |
| 1585 | ssversion := omit, |
| 1586 | clir_sup := 0, |
| 1587 | clir_inv := 0, |
| 1588 | signal := omit, |
| 1589 | keypad := keypad, |
| 1590 | more := 0, |
| 1591 | notify := 0, |
| 1592 | emergency := *, |
| 1593 | imsi := ?, |
| 1594 | lchan_type := ?, |
Neels Hofmeyr | 06b859c | 2019-11-12 01:23:04 +0100 | [diff] [blame] | 1595 | lchan_mode := ?, |
| 1596 | sdp := * |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 1597 | } |
| 1598 | } |
| 1599 | } |
| 1600 | |
| 1601 | /* : MSC <- MNCC: START_DTMF.rsp; Acknowledge start of DTMF */ |
| 1602 | template MNCC_PDU ts_MNCC_START_DTMF_rsp(uint32_t call_id, MNCC_keypad keypad) := { |
| 1603 | msg_type := MNCC_START_DTMF_RSP, |
| 1604 | u := { |
| 1605 | signal := { /* See 24.008 9.3.25 */ |
| 1606 | callref := call_id, |
| 1607 | bearer_cap := omit, |
| 1608 | called := omit, |
| 1609 | calling := omit, |
| 1610 | redirecting := omit, |
| 1611 | connected := omit, |
| 1612 | cause := omit, |
| 1613 | progress := omit, |
| 1614 | useruser := omit, |
| 1615 | facility := omit, |
| 1616 | cccap := omit, |
| 1617 | ssversion := omit, |
| 1618 | clir_sup := 0, |
| 1619 | clir_inv := 0, |
| 1620 | signal := omit, |
| 1621 | keypad := keypad, |
| 1622 | more := 0, |
| 1623 | notify := 0, |
| 1624 | emergency := omit, |
| 1625 | imsi := "", |
| 1626 | lchan_type := 0, |
Neels Hofmeyr | 06b859c | 2019-11-12 01:23:04 +0100 | [diff] [blame] | 1627 | lchan_mode := 0, |
| 1628 | sdp := "" |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 1629 | } |
| 1630 | } |
| 1631 | } |
| 1632 | |
| 1633 | /* : MSC <- MNCC: START_DTMF.rsp; Acknowledge start of DTMF */ |
| 1634 | template MNCC_PDU ts_MNCC_START_DTMF_rej(uint32_t call_id, MNCC_cause cause) := { |
| 1635 | msg_type := MNCC_START_DTMF_REJ, |
| 1636 | u := { |
| 1637 | signal := { /* See 24.008 9.3.26 */ |
| 1638 | callref := call_id, |
| 1639 | bearer_cap := omit, |
| 1640 | called := omit, |
| 1641 | calling := omit, |
| 1642 | redirecting := omit, |
| 1643 | connected := omit, |
| 1644 | cause := cause, |
| 1645 | progress := omit, |
| 1646 | useruser := omit, |
| 1647 | facility := omit, |
| 1648 | cccap := omit, |
| 1649 | ssversion := omit, |
| 1650 | clir_sup := 0, |
| 1651 | clir_inv := 0, |
| 1652 | signal := omit, |
| 1653 | keypad := omit, |
| 1654 | more := 0, |
| 1655 | notify := 0, |
| 1656 | emergency := omit, |
| 1657 | imsi := "", |
| 1658 | lchan_type := 0, |
Neels Hofmeyr | 06b859c | 2019-11-12 01:23:04 +0100 | [diff] [blame] | 1659 | lchan_mode := 0, |
| 1660 | sdp := "" |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 1661 | } |
| 1662 | } |
| 1663 | } |
| 1664 | |
| 1665 | /* : MSC -> MNCC: STOP_DTMF.ind */ |
| 1666 | template MNCC_PDU tr_MNCC_STOP_DTMF_ind(template uint32_t call_id := ?) := |
| 1667 | tr_MNCC_SIMPLE(MNCC_STOP_DTMF_IND, call_id); /* See 24.008 9.3.29 */ |
| 1668 | |
| 1669 | /* : MSC <- MNCC: STOP_DTMF.rsp; Acknowledge stop of DTMF */ |
| 1670 | template MNCC_PDU ts_MNCC_STOP_DTMF_rsp(uint32_t call_id) := |
| 1671 | ts_MNCC_SIMPLE(MNCC_STOP_DTMF_RSP, call_id); /* See 24.008 9.3.30 */ |
| 1672 | |
| 1673 | /* : MSC -> MNCC: MODIFY.ind; request to start MO in-call modification */ |
| 1674 | template MNCC_PDU tr_MNCC_MODIFY_ind(template uint32_t call_id := ?, template MNCC_bearer_cap bcap := ?) := { |
| 1675 | msg_type := MNCC_MODIFY_IND, |
| 1676 | u := { |
| 1677 | signal := { /* See 24.008 9.3.14 */ |
| 1678 | callref := call_id, |
| 1679 | bearer_cap := bcap, |
| 1680 | called := omit, |
| 1681 | calling := omit, |
| 1682 | redirecting := omit, |
| 1683 | connected := omit, |
| 1684 | cause := omit, |
| 1685 | progress := omit, |
| 1686 | useruser := omit, |
| 1687 | facility := omit, |
| 1688 | cccap := omit, |
| 1689 | ssversion := omit, |
| 1690 | clir_sup := 0, |
| 1691 | clir_inv := 0, |
| 1692 | signal := omit, |
| 1693 | keypad := omit, |
| 1694 | more := 0, |
| 1695 | notify := 0, |
| 1696 | emergency := *, |
| 1697 | imsi := ?, |
| 1698 | lchan_type := ?, |
Neels Hofmeyr | 06b859c | 2019-11-12 01:23:04 +0100 | [diff] [blame] | 1699 | lchan_mode := ?, |
| 1700 | sdp := * |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 1701 | } |
| 1702 | } |
| 1703 | } |
| 1704 | |
| 1705 | /* : MSC <- MNCC: MODIFY.rsp; tespond to MO in-call modification */ |
| 1706 | template MNCC_PDU ts_MNCC_MODIFY_rsp(uint32_t call_id, MNCC_bearer_cap bcap) := { |
| 1707 | msg_type := MNCC_MODIFY_RSP, |
| 1708 | u := { |
| 1709 | signal := { /* See 24.008 9.3.14 */ |
| 1710 | callref := call_id, |
| 1711 | bearer_cap := bcap, |
| 1712 | called := omit, |
| 1713 | calling := omit, |
| 1714 | redirecting := omit, |
| 1715 | connected := omit, |
| 1716 | cause := omit, |
| 1717 | progress := omit, |
| 1718 | useruser := omit, |
| 1719 | facility := omit, |
| 1720 | cccap := omit, |
| 1721 | ssversion := omit, |
| 1722 | clir_sup := 0, |
| 1723 | clir_inv := 0, |
| 1724 | signal := omit, |
| 1725 | keypad := omit, |
| 1726 | more := 0, |
| 1727 | notify := 0, |
| 1728 | emergency := omit, |
| 1729 | imsi := "", |
| 1730 | lchan_type := 0, |
Neels Hofmeyr | 06b859c | 2019-11-12 01:23:04 +0100 | [diff] [blame] | 1731 | lchan_mode := 0, |
| 1732 | sdp := "" |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 1733 | } |
| 1734 | } |
| 1735 | } |
| 1736 | |
| 1737 | /* : MSC <- MNCC: MODIFY.req; request to start MT in-call modification */ |
| 1738 | template MNCC_PDU ts_MNCC_MODIFY_req(uint32_t call_id, MNCC_bearer_cap bcap) := { |
| 1739 | msg_type := MNCC_MODIFY_REQ, |
| 1740 | u := { |
| 1741 | signal := { /* See 24.008 9.3.14 */ |
| 1742 | callref := call_id, |
| 1743 | bearer_cap := bcap, |
| 1744 | called := omit, |
| 1745 | calling := omit, |
| 1746 | redirecting := omit, |
| 1747 | connected := omit, |
| 1748 | cause := omit, |
| 1749 | progress := omit, |
| 1750 | useruser := omit, |
| 1751 | facility := omit, |
| 1752 | cccap := omit, |
| 1753 | ssversion := omit, |
| 1754 | clir_sup := 0, |
| 1755 | clir_inv := 0, |
| 1756 | signal := omit, |
| 1757 | keypad := omit, |
| 1758 | more := 0, |
| 1759 | notify := 0, |
| 1760 | emergency := omit, |
| 1761 | imsi := "", |
| 1762 | lchan_type := 0, |
Neels Hofmeyr | 06b859c | 2019-11-12 01:23:04 +0100 | [diff] [blame] | 1763 | lchan_mode := 0, |
| 1764 | sdp := "" |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 1765 | } |
| 1766 | } |
| 1767 | } |
| 1768 | |
| 1769 | /* : MSC -> MNCC: MODIFY.cnf; MS has responded to MT in-call modification */ |
| 1770 | template MNCC_PDU tr_MNCC_MODIFY_cnf(template uint32_t call_id := ?, |
| 1771 | template MNCC_bearer_cap bcap := ?) := { |
| 1772 | msg_type := MNCC_MODIFY_CNF, |
| 1773 | u := { |
| 1774 | signal := { /* See 24.008 9.3.14 */ |
| 1775 | callref := call_id, |
| 1776 | bearer_cap := bcap, |
| 1777 | called := omit, |
| 1778 | calling := omit, |
| 1779 | redirecting := omit, |
| 1780 | connected := omit, |
| 1781 | cause := omit, |
| 1782 | progress := omit, |
| 1783 | useruser := omit, |
| 1784 | facility := omit, |
| 1785 | cccap := omit, |
| 1786 | ssversion := omit, |
| 1787 | clir_sup := 0, |
| 1788 | clir_inv := 0, |
| 1789 | signal := omit, |
| 1790 | keypad := omit, |
| 1791 | more := 0, |
| 1792 | notify := 0, |
| 1793 | emergency := *, |
| 1794 | imsi := ?, |
| 1795 | lchan_type := ?, |
Neels Hofmeyr | 06b859c | 2019-11-12 01:23:04 +0100 | [diff] [blame] | 1796 | lchan_mode := ?, |
| 1797 | sdp := * |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 1798 | } |
| 1799 | } |
| 1800 | } |
| 1801 | |
| 1802 | /* : MSC <- MNCC: Request transmission of USERINFO to MS */ |
| 1803 | template MNCC_PDU ts_MNCC_USERINFO_req(uint32_t call_id, MNCC_useruser uu, integer more) := { |
| 1804 | msg_type := MNCC_USERINFO_REQ, |
| 1805 | u := { |
| 1806 | signal := { /* See 24.008 9.3.31 */ |
| 1807 | callref := call_id, |
| 1808 | bearer_cap := omit, |
| 1809 | called := omit, |
| 1810 | calling := omit, |
| 1811 | redirecting := omit, |
| 1812 | connected := omit, |
| 1813 | cause := omit, |
| 1814 | progress := omit, |
| 1815 | useruser := uu, |
| 1816 | facility := omit, |
| 1817 | cccap := omit, |
| 1818 | ssversion := omit, |
| 1819 | clir_sup := 0, |
| 1820 | clir_inv := 0, |
| 1821 | signal := omit, |
| 1822 | keypad := omit, |
| 1823 | more := more, |
| 1824 | notify := 0, |
| 1825 | emergency := omit, |
| 1826 | imsi := "", |
| 1827 | lchan_type := 0, |
Neels Hofmeyr | 06b859c | 2019-11-12 01:23:04 +0100 | [diff] [blame] | 1828 | lchan_mode := 0, |
| 1829 | sdp := "" |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 1830 | } |
| 1831 | } |
| 1832 | } |
| 1833 | |
| 1834 | /* : MSC -> MNCC: Indicate reception of USERINFO from MS */ |
| 1835 | template MNCC_PDU tr_MNCC_USERINFO_ind(template uint32_t call_id := ?, template MNCC_useruser uu := ?, |
| 1836 | integer more) := { |
| 1837 | msg_type := MNCC_USERINFO_IND, |
| 1838 | u := { |
| 1839 | signal := { /* See 24.008 9.3.31 */ |
| 1840 | callref := call_id, |
| 1841 | bearer_cap := omit, |
| 1842 | called := omit, |
| 1843 | calling := omit, |
| 1844 | redirecting := omit, |
| 1845 | connected := omit, |
| 1846 | cause := omit, |
| 1847 | progress := omit, |
| 1848 | useruser := uu, |
| 1849 | facility := omit, |
| 1850 | cccap := omit, |
| 1851 | ssversion := omit, |
| 1852 | clir_sup := 0, |
| 1853 | clir_inv := 0, |
| 1854 | signal := omit, |
| 1855 | keypad := omit, |
| 1856 | more := more, |
| 1857 | notify := 0, |
| 1858 | emergency := omit, |
| 1859 | imsi := "", |
| 1860 | lchan_type := 0, |
Neels Hofmeyr | 06b859c | 2019-11-12 01:23:04 +0100 | [diff] [blame] | 1861 | lchan_mode := 0, |
Oliver Smith | 81a2546 | 2019-11-28 13:40:37 +0100 | [diff] [blame] | 1862 | sdp := * |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 1863 | } |
| 1864 | } |
| 1865 | } |
| 1866 | |
| 1867 | /* : MSC -> MNCC: HOLD.ind; MS requests hold of call */ |
| 1868 | template MNCC_PDU tr_MNCC_HOLD_ind(template uint32_t call_id := ?) := |
| 1869 | tr_MNCC_SIMPLE(MNCC_HOLD_IND, call_id); /* See 24.008 9.3.10 */ |
| 1870 | |
| 1871 | /* : MSC <- MNCC: HOLD.cnf; network confirms hold of call */ |
| 1872 | template MNCC_PDU ts_MNCC_HOLD_cnf(uint32_t call_id) := |
| 1873 | ts_MNCC_SIMPLE(MNCC_HOLD_CNF, call_id); /* See 24.008 9.3.11 */ |
| 1874 | |
| 1875 | /* : MSC <- MNCC: HOLD.rej; network rejects hold of call */ |
| 1876 | template MNCC_PDU ts_MNCC_HOLD_rej(uint32_t call_id, MNCC_cause cause) := { |
| 1877 | msg_type := MNCC_HOLD_REJ, |
| 1878 | u := { |
| 1879 | signal := { /* See 24.008 9.3.12 */ |
| 1880 | callref := call_id, |
| 1881 | bearer_cap := omit, |
| 1882 | called := omit, |
| 1883 | calling := omit, |
| 1884 | redirecting := omit, |
| 1885 | connected := omit, |
| 1886 | cause := cause, |
| 1887 | progress := omit, |
| 1888 | useruser := omit, |
| 1889 | facility := omit, |
| 1890 | cccap := omit, |
| 1891 | ssversion := omit, |
| 1892 | clir_sup := 0, |
| 1893 | clir_inv := 0, |
| 1894 | signal := omit, |
| 1895 | keypad := omit, |
| 1896 | more := 0, |
| 1897 | notify := 0, |
| 1898 | emergency := omit, |
| 1899 | imsi := "", |
| 1900 | lchan_type := 0, |
Neels Hofmeyr | 06b859c | 2019-11-12 01:23:04 +0100 | [diff] [blame] | 1901 | lchan_mode := 0, |
| 1902 | sdp := "" |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 1903 | } |
| 1904 | } |
| 1905 | } |
| 1906 | |
| 1907 | /* : MSC -> MNCC: RETRIEVE.ind; MS requests retrieval of held call */ |
| 1908 | template MNCC_PDU tr_MNCC_RETRIEVE_ind(template uint32_t call_id := ?) := |
| 1909 | tr_MNCC_SIMPLE(MNCC_RETRIEVE_IND, call_id); /* See 24.008 9.3.20 */ |
| 1910 | |
| 1911 | /* : MSC <- MNCC: RETRIEVE.cnf; network confirms retrieve of call */ |
| 1912 | template MNCC_PDU ts_MNCC_RETRIEVE_cnf(uint32_t call_id) := |
| 1913 | ts_MNCC_SIMPLE(MNCC_RETRIEVE_CNF, call_id); /* See 24.008 9.3.21 */ |
| 1914 | |
| 1915 | /* : MSC <- MNCC: RETRIEVE.rej; network rejects retrieve of call */ |
| 1916 | template MNCC_PDU ts_MNCC_RETRIEVE_rej(uint32_t call_id, MNCC_cause cause) |
| 1917 | modifies ts_MNCC_HOLD_rej := { /* See 24.008 9.3.22 */ |
| 1918 | msg_type := MNCC_RETRIEVE_REJ |
| 1919 | } |
| 1920 | |
| 1921 | |
| 1922 | template MNCC_PDU ts_MNCC_SIMPLE_RTP(MNCC_MsgType msg_type, uint32_t call_id) := { |
| 1923 | msg_type := msg_type, |
| 1924 | u := { |
| 1925 | rtp := { |
| 1926 | callref := call_id, |
Pau Espin Pedrol | 563b3d0 | 2020-09-09 20:19:52 +0200 | [diff] [blame] | 1927 | is_ipv6 := false, |
| 1928 | ip := '00000000'O, |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 1929 | rtp_port := 0, |
| 1930 | payload_type := 0, |
Neels Hofmeyr | 06b859c | 2019-11-12 01:23:04 +0100 | [diff] [blame] | 1931 | payload_msg_type := 0, |
| 1932 | sdp := "" |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 1933 | } |
| 1934 | } |
| 1935 | } |
| 1936 | |
| 1937 | /* MSC <- MNCC: RTP_CREATE.req; request creation of RTP */ |
| 1938 | template MNCC_PDU ts_MNCC_RTP_CREATE(uint32_t call_id) := ts_MNCC_SIMPLE_RTP(MNCC_RTP_CREATE, call_id); |
| 1939 | |
| 1940 | /* MSC -> MNCC: RTP_CREATE.rsp; acknowledge creation of RTP (stating MSC side IP/Port) */ |
Neels Hofmeyr | 2ca1ab4 | 2019-03-08 03:45:43 +0100 | [diff] [blame] | 1941 | template MNCC_PDU tr_MNCC_RTP_CREATE(template uint32_t call_id := ?, |
Pau Espin Pedrol | 563b3d0 | 2020-09-09 20:19:52 +0200 | [diff] [blame] | 1942 | template octetstring ip := ?, |
| 1943 | template uint16_t rtp_port := ?, |
Neels Hofmeyr | 2ca1ab4 | 2019-03-08 03:45:43 +0100 | [diff] [blame] | 1944 | template uint32_t payload_type := ?) := { |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 1945 | msg_type := MNCC_RTP_CREATE, |
| 1946 | u := { |
| 1947 | rtp := { |
| 1948 | callref := call_id, |
Pau Espin Pedrol | 563b3d0 | 2020-09-09 20:19:52 +0200 | [diff] [blame] | 1949 | is_ipv6 := ?, |
Neels Hofmeyr | 2ca1ab4 | 2019-03-08 03:45:43 +0100 | [diff] [blame] | 1950 | ip := ip, |
| 1951 | rtp_port := rtp_port, |
| 1952 | payload_type := payload_type, |
Neels Hofmeyr | 06b859c | 2019-11-12 01:23:04 +0100 | [diff] [blame] | 1953 | payload_msg_type := ?, |
| 1954 | sdp := * |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 1955 | } |
| 1956 | } |
| 1957 | } |
| 1958 | |
| 1959 | /* MSC <- MNCC: RTP_CONNECT.req; request connect of RTP */ |
Pau Espin Pedrol | 563b3d0 | 2020-09-09 20:19:52 +0200 | [diff] [blame] | 1960 | template MNCC_PDU ts_MNCC_RTP_CONNECT(uint32_t call_id, boolean is_ipv6, octetstring ip, uint16_t rtp_port, uint32_t pt) := { |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 1961 | msg_type := MNCC_RTP_CONNECT, |
| 1962 | u := { |
| 1963 | rtp := { |
| 1964 | callref := call_id, |
Pau Espin Pedrol | 563b3d0 | 2020-09-09 20:19:52 +0200 | [diff] [blame] | 1965 | is_ipv6 := is_ipv6, |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 1966 | ip := ip, |
| 1967 | rtp_port := rtp_port, |
| 1968 | payload_type := pt, |
Neels Hofmeyr | 06b859c | 2019-11-12 01:23:04 +0100 | [diff] [blame] | 1969 | payload_msg_type := 0, |
| 1970 | sdp := "" |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 1971 | } |
| 1972 | } |
| 1973 | } |
Harald Welte | b0d9360 | 2018-03-20 18:09:34 +0100 | [diff] [blame] | 1974 | template MNCC_PDU tr_MNCC_RTP_CONNECT(template uint32_t call_id, |
Pau Espin Pedrol | 563b3d0 | 2020-09-09 20:19:52 +0200 | [diff] [blame] | 1975 | template octetstring ip := ?, |
| 1976 | template uint16_t rtp_port := ?, |
Harald Welte | b0d9360 | 2018-03-20 18:09:34 +0100 | [diff] [blame] | 1977 | template uint32_t pt := ?) := { |
| 1978 | msg_type := MNCC_RTP_CONNECT, |
| 1979 | u := { |
| 1980 | rtp := { |
| 1981 | callref := call_id, |
Pau Espin Pedrol | 563b3d0 | 2020-09-09 20:19:52 +0200 | [diff] [blame] | 1982 | is_ipv6 := ?, |
Harald Welte | b0d9360 | 2018-03-20 18:09:34 +0100 | [diff] [blame] | 1983 | ip := ip, |
| 1984 | rtp_port := rtp_port, |
| 1985 | payload_type := pt, |
Neels Hofmeyr | 06b859c | 2019-11-12 01:23:04 +0100 | [diff] [blame] | 1986 | payload_msg_type := 0, |
Oliver Smith | 81a2546 | 2019-11-28 13:40:37 +0100 | [diff] [blame] | 1987 | sdp := * |
Harald Welte | b0d9360 | 2018-03-20 18:09:34 +0100 | [diff] [blame] | 1988 | } |
| 1989 | } |
| 1990 | } |
| 1991 | |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 1992 | |
| 1993 | /* MSC <- MNCC: RTP_FREE.req; request connect of RTP */ |
| 1994 | template MNCC_PDU ts_MNCC_RTP_FREE(uint32_t call_id) := ts_MNCC_SIMPLE_RTP(MNCC_RTP_FREE, call_id); |
Harald Welte | 474fd7d | 2017-12-29 16:01:39 +0100 | [diff] [blame] | 1995 | |
Harald Welte | 251b52b | 2018-01-17 13:58:16 +0100 | [diff] [blame] | 1996 | function f_mncc_get_call_id(MNCC_PDU pdu) return uint32_t { |
| 1997 | if (ischosen(pdu.u.rtp)) { |
| 1998 | return pdu.u.rtp.callref; |
| 1999 | } else if (ischosen(pdu.u.data)) { |
| 2000 | return pdu.u.data.callref; |
| 2001 | } else if (ischosen(pdu.u.signal)) { |
| 2002 | return pdu.u.signal.callref; |
| 2003 | } else { |
| 2004 | setverdict(fail, "Unable to determine Callref for MNCC", pdu); |
Daniel Willmann | e4ff537 | 2018-07-05 17:35:03 +0200 | [diff] [blame] | 2005 | mtc.stop |
Harald Welte | 251b52b | 2018-01-17 13:58:16 +0100 | [diff] [blame] | 2006 | } |
| 2007 | } |
| 2008 | |
Harald Welte | 474fd7d | 2017-12-29 16:01:39 +0100 | [diff] [blame] | 2009 | } with { encode "RAW" ; variant "FIELDORDER(msb)" } |