Harald Welte | 474fd7d | 2017-12-29 16:01:39 +0100 | [diff] [blame] | 1 | module MNCC_Types { |
| 2 | |
| 3 | import from Osmocom_Types all; |
| 4 | |
| 5 | /* for architectures where 'int' is 32bit like x86_64 */ |
| 6 | type integer int with { variant "FIELDLENGTH(32)" }; |
| 7 | |
| 8 | |
| 9 | /* GSM 04.08 Bearer Capability: Rate Adaption */ |
| 10 | type 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 */ |
| 18 | type enumerated GSM48_bcap_sig_access { |
Harald Welte | ec3d065 | 2018-01-22 02:54:13 +0100 | [diff] [blame] | 19 | GSM48_BCAP_SA_NONE (0), |
Harald Welte | 474fd7d | 2017-12-29 16:01:39 +0100 | [diff] [blame] | 20 | GSM48_BCAP_SA_I440_I450 (1), |
| 21 | GSM48_BCAP_SA_X21 (2), |
| 22 | GSM48_BCAP_SA_X28_DP_IN (3), |
| 23 | GSM48_BCAP_SA_X28_DP_UN (4), |
| 24 | GSM48_BCAP_SA_X28_NDP (5), |
| 25 | GSM48_BCAP_SA_X32 (6) |
| 26 | }; |
| 27 | |
| 28 | /* GSM 04.08 Bearer Capability: User Rate */ |
| 29 | type enumerated GSM48_bcap_user_rate { |
Harald Welte | ec3d065 | 2018-01-22 02:54:13 +0100 | [diff] [blame] | 30 | GSM48_BCAP_UR_NONE (0), |
Harald Welte | 474fd7d | 2017-12-29 16:01:39 +0100 | [diff] [blame] | 31 | GSM48_BCAP_UR_300 (1), |
| 32 | GSM48_BCAP_UR_1200 (2), |
| 33 | GSM48_BCAP_UR_2400 (3), |
| 34 | GSM48_BCAP_UR_4800 (4), |
| 35 | GSM48_BCAP_UR_9600 (5), |
| 36 | GSM48_BCAP_UR_12000 (6), |
| 37 | GSM48_BCAP_UR_1200_75 (7) |
| 38 | }; |
| 39 | |
| 40 | /* GSM 04.08 Bearer Capability: Parity */ |
| 41 | type enumerated GSM48_bcap_parity { |
| 42 | GSM48_BCAP_PAR_ODD (0), |
| 43 | GSM48_BCAP_PAR_EVEN (2), |
| 44 | GSM48_BCAP_PAR_NONE (3), |
| 45 | GSM48_BCAP_PAR_ZERO (4), |
| 46 | GSM48_BCAP_PAR_ONE (5) |
| 47 | }; |
| 48 | |
| 49 | /* GSM 04.08 Bearer Capability: Intermediate Rate */ |
| 50 | type enumerated GSM48_bcap_interm_rate { |
Harald Welte | ec3d065 | 2018-01-22 02:54:13 +0100 | [diff] [blame] | 51 | GSM48_BCAP_IR_NONE (0), |
Harald Welte | 474fd7d | 2017-12-29 16:01:39 +0100 | [diff] [blame] | 52 | GSM48_BCAP_IR_8k (2), |
| 53 | GSM48_BCAP_IR_16k (3) |
| 54 | }; |
| 55 | |
| 56 | /* GSM 04.08 Bearer Capability: Transparency */ |
| 57 | type enumerated GSM48_bcap_transp { |
| 58 | GSM48_BCAP_TR_TRANSP (0), |
| 59 | GSM48_BCAP_TR_RLP (1), |
| 60 | GSM48_BCAP_TR_TR_PREF (2), |
| 61 | GSM48_BCAP_TR_RLP_PREF (3) |
| 62 | }; |
| 63 | |
| 64 | /* GSM 04.08 Bearer Capability: Modem Type */ |
| 65 | type enumerated GSM48_bcap_modem_type { |
| 66 | GSM48_BCAP_MT_NONE (0), |
| 67 | GSM48_BCAP_MT_V21 (1), |
| 68 | GSM48_BCAP_MT_V22 (2), |
| 69 | GSM48_BCAP_MT_V22bis (3), |
| 70 | GSM48_BCAP_MT_V23 (4), |
| 71 | GSM48_BCAP_MT_V26ter (5), |
| 72 | GSM48_BCAP_MT_V32 (6), |
| 73 | GSM48_BCAP_MT_UNDEF (7), |
| 74 | GSM48_BCAP_MT_AUTO_1 (8) |
| 75 | }; |
| 76 | |
| 77 | type enumerated MNCC_MsgType { |
| 78 | MNCC_SETUP_REQ ('0101'O), |
| 79 | MNCC_SETUP_IND ('0102'O), |
| 80 | MNCC_SETUP_RSP ('0103'O), |
| 81 | MNCC_SETUP_CNF ('0104'O), |
| 82 | MNCC_SETUP_COMPL_REQ ('0105'O), |
| 83 | MNCC_SETUP_COMPL_IND ('0106'O), |
| 84 | MNCC_CALL_CONF_IND ('0107'O), |
| 85 | MNCC_CALL_PROC_REQ ('0108'O), |
| 86 | MNCC_PROGRESS_REQ ('0109'O), |
| 87 | MNCC_ALERT_REQ ('010a'O), |
| 88 | MNCC_ALERT_IND ('010b'O), |
| 89 | MNCC_NOTIFY_REQ ('010c'O), |
| 90 | MNCC_NOTIFY_IND ('010d'O), |
| 91 | MNCC_DISC_REQ ('010e'O), |
| 92 | MNCC_DISC_IND ('010f'O), |
| 93 | MNCC_REL_REQ ('0110'O), |
| 94 | MNCC_REL_IND ('0111'O), |
| 95 | MNCC_REL_CNF ('0112'O), |
| 96 | MNCC_FACILITY_REQ ('0113'O), |
| 97 | MNCC_FACILITY_IND ('0114'O), |
| 98 | MNCC_START_DTMF_IND ('0115'O), |
| 99 | MNCC_START_DTMF_RSP ('0116'O), |
| 100 | MNCC_START_DTMF_REJ ('0117'O), |
| 101 | MNCC_STOP_DTMF_IND ('0118'O), |
| 102 | MNCC_STOP_DTMF_RSP ('0119'O), |
| 103 | MNCC_MODIFY_REQ ('011a'O), |
| 104 | MNCC_MODIFY_IND ('011b'O), |
| 105 | MNCC_MODIFY_RSP ('011c'O), |
| 106 | MNCC_MODIFY_CNF ('011d'O), |
| 107 | MNCC_MODIFY_REJ ('011e'O), |
| 108 | MNCC_HOLD_IND ('011f'O), |
| 109 | MNCC_HOLD_CNF ('0120'O), |
| 110 | MNCC_HOLD_REJ ('0121'O), |
| 111 | MNCC_RETRIEVE_IND ('0122'O), |
| 112 | MNCC_RETRIEVE_CNF ('0123'O), |
| 113 | MNCC_RETRIEVE_REJ ('0124'O), |
| 114 | MNCC_USERINFO_REQ ('0125'O), |
| 115 | MNCC_USERINFO_IND ('0126'O), |
| 116 | MNCC_REJ_REQ ('0127'O), |
| 117 | MNCC_REJ_IND ('0128'O), |
Vadim Yanitskiy | e0bb4f0 | 2018-11-01 03:40:38 +0700 | [diff] [blame] | 118 | MNCC_PROGRESS_IND ('0129'O), |
| 119 | MNCC_CALL_PROC_IND ('012a'O), |
| 120 | MNCC_CALL_CONF_REQ ('012b'O), |
| 121 | MNCC_START_DTMF_REQ ('012c'O), |
| 122 | MNCC_STOP_DTMF_REQ ('012d'O), |
| 123 | MNCC_HOLD_REQ ('012e'O), |
| 124 | MNCC_RETRIEVE_REQ ('012f'O), |
Harald Welte | 474fd7d | 2017-12-29 16:01:39 +0100 | [diff] [blame] | 125 | |
| 126 | MNCC_BRIDGE ('0200'O), |
| 127 | MNCC_FRAME_RECV ('0201'O), |
| 128 | MNCC_FRAME_DROP ('0202'O), |
| 129 | MNCC_LCHAN_MODIFY ('0203'O), |
| 130 | MNCC_RTP_CREATE ('0204'O), |
| 131 | MNCC_RTP_CONNECT ('0205'O), |
| 132 | MNCC_RTP_FREE ('0206'O), |
| 133 | |
| 134 | GSM_TCHF_FRAME ('0300'O), |
| 135 | GSM_TCHF_FRAME_EFR ('0301'O), |
| 136 | GSM_TCHH_FRAME ('0302'O), |
| 137 | GSM_TCH_FRAME_AMR ('0303'O), |
| 138 | GSM_BAD_FRAME ('03ff'O), |
| 139 | |
| 140 | MNCC_SOCKET_HELLO ('0400'O) |
| 141 | }; |
| 142 | |
| 143 | const integer GSM_MAX_FACILITY := 128; |
| 144 | const integer GSM_MAX_SSVERSION := 128; |
| 145 | const integer GSM_MAX_USERUSER := 128; |
| 146 | |
| 147 | type record MNCC_bearer_cap_data { |
| 148 | GSM48_bcap_ra rate_adaptation, |
| 149 | GSM48_bcap_sig_access sig_access, |
| 150 | int async, |
| 151 | int nr_stop_bits, |
| 152 | int nr_data_bits, |
| 153 | GSM48_bcap_user_rate user_rate, |
| 154 | GSM48_bcap_parity parity, |
| 155 | GSM48_bcap_interm_rate interm_rate, |
| 156 | GSM48_bcap_transp transp, |
| 157 | GSM48_bcap_modem_type modem_type |
| 158 | }; |
| 159 | |
| 160 | type record length(0..8) of int MNCC_speech_vers; |
| 161 | |
| 162 | /* Expanded fields from GSM TS 04.08, Table 10.5.102 */ |
| 163 | type record MNCC_bearer_cap { |
| 164 | int transfer, |
| 165 | int mode, |
| 166 | int coding, |
| 167 | int radio, |
| 168 | int speech_ctm, |
| 169 | MNCC_speech_vers speech_ver, |
| 170 | MNCC_bearer_cap_data data optional |
| 171 | }; |
| 172 | |
| 173 | template MNCC_bearer_cap ts_MNCC_bcap_voice := { |
| 174 | transfer := 0, /* speech */ |
| 175 | mode := 0, /* circuit */ |
| 176 | coding := 0, /* GSM standard */ |
| 177 | radio := 3, /* FR/HR, FR preferred */ |
| 178 | speech_ctm := 0, /* not supported */ |
Harald Welte | 515f5d1 | 2018-01-22 02:55:10 +0100 | [diff] [blame] | 179 | speech_ver := { 0, 2, 4, 1, 5, -1 }, |
Harald Welte | 474fd7d | 2017-12-29 16:01:39 +0100 | [diff] [blame] | 180 | data := omit |
| 181 | }; |
| 182 | |
| 183 | type record MNCC_number { |
| 184 | GSM48_type_of_number number_type, |
| 185 | GSM48_num_plan_ind plan, |
| 186 | GSM48_present_ind presence, |
| 187 | GSM48_screening_ind screen, |
| 188 | charstring number |
| 189 | }; |
| 190 | |
| 191 | /* 24.008 10.5.118 */ |
| 192 | type enumerated GSM48_num_plan_ind { |
| 193 | GSM48_NUMPLAN_UNKNOWN (0), |
| 194 | GSM48_NUMPLAN_E164 (1), |
| 195 | GSM48_NUMPLAN_X121 (3), |
| 196 | GSM48_NUMPLAN_F69 (4), |
| 197 | GSM48_NUMPLAN_NATIONAL (8), |
| 198 | GSM48_NUMPLAN_PRIVATE (9), |
| 199 | GSM48_NUMPLAN_CTS (11), |
| 200 | GSM48_NUMPLAN_RESERVED (15) |
| 201 | }; |
| 202 | |
| 203 | /* 04.08 10.5.118 */ |
| 204 | type enumerated GSM48_type_of_number { |
| 205 | GSM48_TON_UNKNOWN (0), |
| 206 | GSM48_TON_INTERNATIONAL (1), |
| 207 | GSM48_TON_NATIONAL (2), |
| 208 | GSM48_TON_NETWORK_SPECIFIC (3), |
| 209 | GSM48_TON_SHORT_CODE (4) |
| 210 | }; |
| 211 | |
| 212 | /* 04.08 10.5.120 */ |
| 213 | type enumerated GSM48_present_ind { |
| 214 | GSM48_PRES_IND_ALLOWED (0), |
| 215 | GSM48_PRES_IND_RESTRICTED (1), |
| 216 | GSM48_PRES_IND_NUM_NOT_AVAIL (2), |
| 217 | GSM48_PRES_IND_RESERVED (3) |
| 218 | }; |
| 219 | |
| 220 | type enumerated GSM48_screening_ind { |
| 221 | GSM48_SCR_IND_NOT_SCREENED (0), |
| 222 | GSM48_SCR_IND_VERIF_PASSED (1), |
| 223 | GSM48_SCR_IND_VERIF_FAILED (2), |
| 224 | GSM48_SCR_IND_NETW_PROVIDED (3) |
| 225 | }; |
| 226 | |
Harald Welte | fe75a20 | 2018-01-17 13:59:20 +0100 | [diff] [blame] | 227 | /* 24.008 Table 10.5.122 */ |
| 228 | type enumerated GSM48_cause_coding { |
| 229 | GSM48_CAUSE_CS_Q931 ('00'B), |
| 230 | GSM48_CAUSE_CS_RSVD ('01'B), |
| 231 | GSM48_CAUSE_CS_NATIONAL ('10'B), |
| 232 | GSM48_CAUSE_CS_GSM ('11'B) |
| 233 | } |
| 234 | |
| 235 | type enumerated GSM48_cause_loc { |
| 236 | GSM48_CAUSE_LOC_USER ('0000'B), |
| 237 | GSM48_CAUSE_LOC_PRN_S_LU ('0001'B), |
| 238 | GSM48_CAUSE_LOC_PUN_S_LU ('0010'B), |
| 239 | GSM48_CAUSE_LOC_TRANS_NET ('0011'B), |
| 240 | GSM48_CAUSE_LOC_PUN_S_RU ('0100'B), |
| 241 | GSM48_CAUSE_LOC_PRN_S_RU ('0101'B), |
| 242 | GSM48_CAUSE_LOC_INN_NET ('0111'B), |
| 243 | GSM48_CAUSE_LOC_NET_BEYOND ('1010'B) |
| 244 | } |
| 245 | |
| 246 | |
Harald Welte | 474fd7d | 2017-12-29 16:01:39 +0100 | [diff] [blame] | 247 | |
Harald Welte | d748a05 | 2018-01-22 02:59:24 +0100 | [diff] [blame] | 248 | template (value) MNCC_number ts_MNCC_number(charstring number, |
Harald Welte | 474fd7d | 2017-12-29 16:01:39 +0100 | [diff] [blame] | 249 | GSM48_type_of_number ton := GSM48_TON_INTERNATIONAL, |
| 250 | GSM48_num_plan_ind npi := GSM48_NUMPLAN_E164, |
| 251 | GSM48_present_ind pres := GSM48_PRES_IND_ALLOWED, |
| 252 | GSM48_screening_ind screen := GSM48_SCR_IND_NOT_SCREENED) := { |
| 253 | number_type := ton, |
| 254 | plan := npi, |
| 255 | presence := pres, |
| 256 | screen := screen, |
| 257 | number := number |
| 258 | } |
| 259 | |
Harald Welte | d748a05 | 2018-01-22 02:59:24 +0100 | [diff] [blame] | 260 | template MNCC_number tr_MNCC_number(template charstring number, |
| 261 | template GSM48_type_of_number ton := ?, |
| 262 | template GSM48_num_plan_ind npi := ?, |
| 263 | template GSM48_present_ind pres := ?, |
| 264 | template GSM48_screening_ind screen := ?) := { |
| 265 | number_type := ton, |
| 266 | plan := npi, |
| 267 | presence := pres, |
| 268 | screen := screen, |
| 269 | number := number |
| 270 | } |
| 271 | |
Harald Welte | 474fd7d | 2017-12-29 16:01:39 +0100 | [diff] [blame] | 272 | type record MNCC_cause { |
Harald Welte | fe75a20 | 2018-01-17 13:59:20 +0100 | [diff] [blame] | 273 | GSM48_cause_loc location, |
| 274 | GSM48_cause_coding coding, |
Harald Welte | 474fd7d | 2017-12-29 16:01:39 +0100 | [diff] [blame] | 275 | int rec, |
| 276 | int rec_val, |
| 277 | int val, |
| 278 | octetstring diag |
Harald Welte | fe75a20 | 2018-01-17 13:59:20 +0100 | [diff] [blame] | 279 | } with { |
| 280 | variant (location) "FIELDLENGTH(32)"; |
| 281 | variant (coding) "FIELDLENGTH(32)"; |
| 282 | } |
Harald Welte | 474fd7d | 2017-12-29 16:01:39 +0100 | [diff] [blame] | 283 | |
Harald Welte | 9093839 | 2018-03-25 16:36:40 +0200 | [diff] [blame] | 284 | template (value) MNCC_cause ts_MNCC_cause(int val, |
Harald Welte | 2bb825f | 2018-01-22 11:31:18 +0100 | [diff] [blame] | 285 | GSM48_cause_loc loc := GSM48_CAUSE_LOC_PUN_S_LU, |
| 286 | GSM48_cause_coding coding := GSM48_CAUSE_CS_GSM, |
| 287 | octetstring diag := ''O) := { |
| 288 | location := loc, |
| 289 | coding := coding, |
| 290 | rec := 0, |
| 291 | rec_val := 0, |
| 292 | val := val, |
| 293 | diag := diag |
| 294 | } |
| 295 | |
Harald Welte | 474fd7d | 2017-12-29 16:01:39 +0100 | [diff] [blame] | 296 | type record MNCC_useruser { |
| 297 | int proto, |
| 298 | charstring info |
| 299 | }; |
| 300 | |
| 301 | type record MNCC_progress { |
| 302 | int coding, |
| 303 | int location, |
| 304 | int descr |
| 305 | }; |
| 306 | |
| 307 | type record MNCC_cccap { |
| 308 | int dtmf, |
| 309 | int pcp |
| 310 | }; |
| 311 | |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 312 | type int MNCC_notify (0..127); |
Harald Welte | d13700d | 2018-02-02 20:06:52 +0100 | [diff] [blame] | 313 | type charstring MNCC_keypad length (1); |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 314 | |
Harald Welte | 474fd7d | 2017-12-29 16:01:39 +0100 | [diff] [blame] | 315 | type enumerated MNCC_bcap { |
| 316 | GSM_MNCC_BCAP_SPEECH (0), |
| 317 | GSM_MNCC_BCAP_UNR_DIG (1), |
| 318 | GSM_MNCC_BCAP_AUDIO (2), |
| 319 | GSM_MNCC_BCAP_FAX_G3 (3), |
| 320 | GSM_MNCC_BCAP_OTHER_ITC (4), |
| 321 | GSM_MNCC_BCAP_RESERVED (7) |
| 322 | }; |
| 323 | |
| 324 | |
| 325 | type record MNCC_PDU_Signal { |
| 326 | uint32_t callref, |
| 327 | |
| 328 | MNCC_bearer_cap bearer_cap optional, |
| 329 | MNCC_number called optional, |
| 330 | MNCC_number calling optional, |
| 331 | MNCC_number redirecting optional, |
| 332 | MNCC_number connected optional, |
| 333 | MNCC_cause cause optional, |
| 334 | MNCC_progress progress optional, |
| 335 | MNCC_useruser useruser optional, |
| 336 | charstring facility optional, |
| 337 | MNCC_cccap cccap optional, |
| 338 | charstring ssversion optional, |
| 339 | |
| 340 | int clir_sup, |
| 341 | int clir_inv, |
| 342 | int signal optional, |
| 343 | |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 344 | MNCC_keypad keypad optional, |
Harald Welte | 474fd7d | 2017-12-29 16:01:39 +0100 | [diff] [blame] | 345 | int more, |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 346 | MNCC_notify notify, |
Harald Welte | 474fd7d | 2017-12-29 16:01:39 +0100 | [diff] [blame] | 347 | int emergency optional, |
| 348 | charstring imsi, |
| 349 | |
| 350 | uint8_t lchan_type, /* empty in OSmoMSC */ |
| 351 | uint8_t lchan_mode /* empty in OsmoMSC */ |
| 352 | }; |
| 353 | |
| 354 | |
| 355 | type record MNCC_PDU_Data { |
| 356 | uint32_t callref, |
| 357 | octetstring data |
| 358 | }; |
| 359 | |
| 360 | type record MNCC_PDU_Rtp { |
| 361 | uint32_t callref, |
| 362 | uint32_t ip, |
| 363 | uint16_t rtp_port, |
| 364 | uint32_t payload_type, |
| 365 | uint32_t payload_msg_type |
| 366 | }; |
| 367 | |
| 368 | type record MNCC_PDU_Hello { |
| 369 | uint32_t version, |
| 370 | uint32_t mncc_size, |
| 371 | uint32_t data_frame_size, |
| 372 | uint32_t called_offset, |
| 373 | uint32_t signal_offset, |
| 374 | uint32_t emergency_offset, |
| 375 | uint32_t lchan_type_offset |
| 376 | }; |
| 377 | |
| 378 | |
| 379 | type union MNCC_MsgUnion { |
| 380 | MNCC_PDU_Signal signal, |
| 381 | MNCC_PDU_Data data, |
| 382 | MNCC_PDU_Rtp rtp, |
| 383 | MNCC_PDU_Hello hello |
| 384 | }; |
| 385 | |
| 386 | |
| 387 | type record MNCC_PDU { |
| 388 | MNCC_MsgType msg_type, |
| 389 | MNCC_MsgUnion u |
| 390 | } with { variant (u) "CROSSTAG( |
| 391 | hello, msg_type = MNCC_SOCKET_HELLO; |
| 392 | rtp, { msg_type = MNCC_RTP_CREATE, |
| 393 | msg_type = MNCC_RTP_CONNECT, |
| 394 | msg_type = MNCC_RTP_FREE }; |
| 395 | data, { msg_type = GSM_TCHF_FRAME, |
| 396 | msg_type = GSM_TCHF_FRAME_EFR, |
| 397 | msg_type = GSM_TCHH_FRAME, |
| 398 | msg_type = GSM_TCH_FRAME_AMR, |
| 399 | msg_type = GSM_BAD_FRAME }; |
| 400 | signal, OTHERWISE |
| 401 | )" |
| 402 | }; |
| 403 | |
| 404 | external function enc_MNCC_PDU(in MNCC_PDU pdu) return octetstring; |
| 405 | |
| 406 | external function dec_MNCC_PDU(in octetstring stream) return MNCC_PDU; |
| 407 | |
Harald Welte | 1450953 | 2018-03-24 22:32:01 +0100 | [diff] [blame] | 408 | template (value) MNCC_PDU ts_MNCC_HELLO(uint32_t version := 5) := { |
| 409 | msg_type := MNCC_SOCKET_HELLO, |
| 410 | u := { |
| 411 | hello := { |
| 412 | version := version, |
| 413 | mncc_size := 836, |
| 414 | data_frame_size := 8, |
| 415 | called_offset := 104, |
| 416 | signal_offset := 796, |
| 417 | emergency_offset := 812, |
| 418 | lchan_type_offset := 0 |
| 419 | } |
| 420 | } |
| 421 | } |
Harald Welte | 474fd7d | 2017-12-29 16:01:39 +0100 | [diff] [blame] | 422 | |
| 423 | template MNCC_PDU ts_MNCC_Sign(MNCC_MsgType msg_type, MNCC_PDU_Signal sign) := { |
| 424 | msg_type := msg_type, |
| 425 | u := { |
| 426 | signal := sign |
| 427 | } |
| 428 | } |
| 429 | |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 430 | template MNCC_PDU ts_MNCC_SIMPLE(MNCC_MsgType msg_type, uint32_t call_id) := { |
| 431 | msg_type := msg_type, |
Harald Welte | 474fd7d | 2017-12-29 16:01:39 +0100 | [diff] [blame] | 432 | u := { |
| 433 | signal := { |
| 434 | callref := call_id, |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 435 | bearer_cap := omit, |
| 436 | called := omit, |
| 437 | calling := omit, |
Harald Welte | 474fd7d | 2017-12-29 16:01:39 +0100 | [diff] [blame] | 438 | redirecting := omit, |
| 439 | connected := omit, |
| 440 | cause := omit, |
| 441 | progress := omit, |
| 442 | useruser := omit, |
| 443 | facility := omit, |
| 444 | cccap := omit, |
| 445 | ssversion := omit, |
| 446 | clir_sup := 0, |
| 447 | clir_inv := 0, |
| 448 | signal := omit, |
| 449 | keypad := omit, |
| 450 | more := 0, |
| 451 | notify := 0, |
| 452 | emergency := omit, |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 453 | imsi := "", |
| 454 | lchan_type := 0, |
| 455 | lchan_mode := 0 |
| 456 | } |
| 457 | } |
| 458 | } |
| 459 | |
| 460 | template MNCC_PDU tr_MNCC_SIMPLE(template MNCC_MsgType msg_type, template uint32_t call_id) := { |
| 461 | msg_type := msg_type, |
| 462 | u := { |
| 463 | signal := { |
| 464 | callref := call_id, |
| 465 | bearer_cap := omit, |
| 466 | called := omit, |
| 467 | calling := omit, |
| 468 | redirecting := omit, |
| 469 | connected := omit, |
| 470 | cause := omit, |
| 471 | progress := omit, |
| 472 | useruser := omit, |
| 473 | facility := omit, |
| 474 | cccap := omit, |
| 475 | ssversion := omit, |
| 476 | clir_sup := 0, |
| 477 | clir_inv := 0, |
| 478 | signal := omit, |
| 479 | keypad := omit, |
| 480 | more := 0, |
| 481 | notify := 0, |
| 482 | emergency := *, |
| 483 | imsi := ?, |
| 484 | lchan_type := ?, |
| 485 | lchan_mode := ? |
| 486 | } |
| 487 | } |
| 488 | } |
| 489 | |
| 490 | |
| 491 | |
| 492 | /* MT: MSC <- MNCC: SETUP.req from ext. MNCC handler to MSC */ |
| 493 | template MNCC_PDU ts_MNCC_SETUP_req(uint32_t call_id, charstring called, charstring calling, charstring imsi := "") := { |
| 494 | msg_type := MNCC_SETUP_REQ, |
| 495 | u := { |
| 496 | signal := { /* See 24.008 9.3.23.1 */ |
| 497 | callref := call_id, |
| 498 | bearer_cap := ts_MNCC_bcap_voice, /* mandatory */ |
| 499 | called := valueof(ts_MNCC_number(called)), /* optional */ |
| 500 | calling := valueof(ts_MNCC_number(calling)), /* optional */ |
| 501 | redirecting := omit, /* optional */ |
| 502 | connected := omit, |
| 503 | cause := omit, |
| 504 | progress := omit, /* optional */ |
| 505 | useruser := omit, /* optional */ |
| 506 | facility := omit, /* optional */ |
| 507 | cccap := omit, |
| 508 | ssversion := omit, |
| 509 | clir_sup := 0, |
| 510 | clir_inv := 0, |
| 511 | signal := omit, /* optional */ |
| 512 | keypad := omit, |
| 513 | more := 0, |
| 514 | notify := 0, |
| 515 | emergency := omit, |
| 516 | imsi := imsi, |
Harald Welte | 474fd7d | 2017-12-29 16:01:39 +0100 | [diff] [blame] | 517 | lchan_type := 0, |
| 518 | lchan_mode := 0 |
| 519 | } |
| 520 | } |
| 521 | }; |
Harald Welte | b0d9360 | 2018-03-20 18:09:34 +0100 | [diff] [blame] | 522 | template MNCC_PDU tr_MNCC_SETUP_req(template uint32_t call_id := ?, |
| 523 | template charstring called := ?, |
| 524 | template charstring calling := *, |
| 525 | template charstring imsi := ?) := { |
| 526 | msg_type := MNCC_SETUP_REQ, |
| 527 | u := { |
| 528 | signal := { /* See 24.008 9.3.23.1 */ |
| 529 | callref := call_id, |
| 530 | bearer_cap := *, /* mandatory in CC */ |
| 531 | called := tr_MNCC_number(called), /* optional */ |
| 532 | calling := tr_MNCC_number(calling), /* optional */ |
| 533 | redirecting := *, /* optional */ |
| 534 | connected := omit, |
| 535 | cause := omit, |
| 536 | progress := *, /* optional */ |
| 537 | useruser := *, /* optional */ |
| 538 | facility := *, /* optional */ |
| 539 | cccap := omit, |
| 540 | ssversion := omit, |
| 541 | clir_sup := 0, |
| 542 | clir_inv := 0, |
| 543 | signal := *, /* optional */ |
| 544 | keypad := omit, |
| 545 | more := 0, |
| 546 | notify := 0, |
| 547 | emergency := *, |
| 548 | imsi := imsi, |
| 549 | lchan_type := ?, |
| 550 | lchan_mode := ? |
| 551 | } |
| 552 | } |
| 553 | }; |
| 554 | |
Harald Welte | 474fd7d | 2017-12-29 16:01:39 +0100 | [diff] [blame] | 555 | |
Harald Welte | 4017d55 | 2018-01-26 21:40:05 +0100 | [diff] [blame] | 556 | /* MO: MSC <- MNCC: Respons to SETUP.ind */ |
| 557 | template MNCC_PDU ts_MNCC_SETUP_rsp(uint32_t call_id, charstring imsi := "", |
| 558 | template MNCC_number connected := omit) := { |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 559 | msg_type := MNCC_SETUP_RSP, |
| 560 | u := { |
| 561 | signal := { /* See 24.008 9.3.5 */ |
| 562 | callref := call_id, |
| 563 | bearer_cap := omit, |
| 564 | called := omit, |
| 565 | calling := omit, |
| 566 | redirecting := omit, |
| 567 | connected := connected, |
| 568 | cause := omit, |
| 569 | progress := omit, |
Harald Welte | 4017d55 | 2018-01-26 21:40:05 +0100 | [diff] [blame] | 570 | useruser := omit, /* optional */ |
| 571 | facility := omit, /* optional */ |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 572 | cccap := omit, |
Harald Welte | 4017d55 | 2018-01-26 21:40:05 +0100 | [diff] [blame] | 573 | ssversion := omit, /* optional */ |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 574 | clir_sup := 0, |
| 575 | clir_inv := 0, |
| 576 | signal := omit, |
| 577 | keypad := omit, |
| 578 | more := 0, |
| 579 | notify := 0, |
Harald Welte | 4017d55 | 2018-01-26 21:40:05 +0100 | [diff] [blame] | 580 | emergency := omit, |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 581 | imsi := imsi, |
Harald Welte | 4017d55 | 2018-01-26 21:40:05 +0100 | [diff] [blame] | 582 | lchan_type := 0, |
| 583 | lchan_mode := 0 |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 584 | } |
| 585 | } |
| 586 | }; |
Harald Welte | 9093839 | 2018-03-25 16:36:40 +0200 | [diff] [blame] | 587 | template MNCC_PDU tr_MNCC_SETUP_rsp(template uint32_t call_id, |
| 588 | template charstring imsi := ?, |
| 589 | template MNCC_number connected := *) := { |
| 590 | msg_type := MNCC_SETUP_RSP, |
| 591 | u := { |
| 592 | signal := { /* See 24.008 9.3.5 */ |
| 593 | callref := call_id, |
| 594 | bearer_cap := omit, |
| 595 | called := omit, |
| 596 | calling := omit, |
| 597 | redirecting := omit, |
| 598 | connected := connected, |
| 599 | cause := omit, |
| 600 | progress := omit, |
| 601 | useruser := *, /* optional */ |
| 602 | facility := *, /* optional */ |
| 603 | cccap := omit, |
| 604 | ssversion := *, /* optional */ |
| 605 | clir_sup := 0, |
| 606 | clir_inv := 0, |
| 607 | signal := omit, |
| 608 | keypad := omit, |
| 609 | more := 0, |
| 610 | notify := 0, |
| 611 | emergency := omit, |
| 612 | imsi := imsi, |
| 613 | lchan_type := ?, |
| 614 | lchan_mode := ? |
| 615 | } |
| 616 | } |
| 617 | }; |
| 618 | |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 619 | |
| 620 | /* MO: MSC -> MNCC: SETUP.ind from MSC to ext. MNCC handler */ |
| 621 | template MNCC_PDU tr_MNCC_SETUP_ind(template uint32_t call_id := ?, template MNCC_number called := ?, |
| 622 | template MNCC_number calling := *, template charstring imsi :=?) := { |
| 623 | msg_type := MNCC_SETUP_IND, |
| 624 | u := { |
| 625 | signal := { /* See 24.008 9.3.23.2 */ |
| 626 | callref := call_id, |
| 627 | bearer_cap := ?, /* mandatory */ |
| 628 | called := called, /* mandatory */ |
| 629 | calling := calling, /* optional */ |
| 630 | redirecting := omit, |
| 631 | connected := omit, |
| 632 | cause := omit, |
| 633 | progress := omit, |
| 634 | useruser := *, /* optional */ |
| 635 | facility := *, /* optional */ |
| 636 | cccap := *, /* optional */ |
| 637 | ssversion := *, /* optional */ |
| 638 | clir_sup := ?, /* optional */ |
| 639 | clir_inv := ?, /* optional */ |
| 640 | signal := omit, |
| 641 | keypad := omit, |
| 642 | more := 0, |
| 643 | notify := 0, |
| 644 | emergency := *, |
| 645 | imsi := imsi, |
| 646 | lchan_type := ?, |
| 647 | lchan_mode := ? |
| 648 | } |
| 649 | } |
Harald Welte | afec471 | 2018-03-19 22:52:17 +0100 | [diff] [blame] | 650 | } |
| 651 | template (value) MNCC_PDU ts_MNCC_SETUP_ind(uint32_t call_id, MNCC_number called, |
| 652 | template (omit) MNCC_number calling := omit, |
| 653 | template (omit) charstring imsi := omit, |
| 654 | template (value) MNCC_bearer_cap bcap := ts_MNCC_bcap_voice) := { |
| 655 | msg_type := MNCC_SETUP_IND, |
| 656 | u := { |
| 657 | signal := { /* See 24.008 9.3.23.2 */ |
| 658 | callref := call_id, |
| 659 | bearer_cap := valueof(bcap), /* mandatory */ |
| 660 | called := called, /* mandatory */ |
| 661 | calling := calling, /* optional */ |
| 662 | redirecting := omit, |
| 663 | connected := omit, |
| 664 | cause := omit, |
| 665 | progress := omit, |
| 666 | useruser := omit, /* optional */ |
| 667 | facility := omit, /* optional */ |
| 668 | cccap := omit, /* optional */ |
| 669 | ssversion := omit, /* optional */ |
| 670 | clir_sup := 0, /* optional */ |
| 671 | clir_inv := 0, /* optional */ |
| 672 | signal := omit, |
| 673 | keypad := omit, |
| 674 | more := 0, |
| 675 | notify := 0, |
| 676 | emergency := omit, |
| 677 | imsi := imsi, |
| 678 | lchan_type := 0, |
| 679 | lchan_mode := 0 |
| 680 | } |
| 681 | } |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 682 | } |
| 683 | |
| 684 | /* MO: MSC <- MNCC: SETUP.cnf; Response to SETUP.ind */ |
| 685 | template MNCC_PDU ts_MNCC_SETUP_CNF(uint32_t call_id, template MNCC_number connected := omit) := { |
| 686 | msg_type := MNCC_SETUP_CNF, |
| 687 | u := { |
| 688 | signal := { /* See 24.008 9.3.5 */ |
| 689 | callref := call_id, |
| 690 | bearer_cap := omit, |
| 691 | called := omit, |
| 692 | calling := omit, |
| 693 | redirecting := omit, |
| 694 | connected := connected, |
| 695 | cause := omit, |
Harald Welte | b0d9360 | 2018-03-20 18:09:34 +0100 | [diff] [blame] | 696 | progress := omit, |
| 697 | useruser := omit, |
| 698 | facility := omit, |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 699 | cccap := omit, |
| 700 | ssversion := omit, |
| 701 | clir_sup := 0, |
| 702 | clir_inv := 0, |
| 703 | signal := omit, |
| 704 | keypad := omit, |
| 705 | more := 0, |
| 706 | notify := 0, |
Harald Welte | b0d9360 | 2018-03-20 18:09:34 +0100 | [diff] [blame] | 707 | emergency := omit, |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 708 | imsi := "", |
Harald Welte | b0d9360 | 2018-03-20 18:09:34 +0100 | [diff] [blame] | 709 | lchan_type := 0, |
| 710 | lchan_mode := 0 |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 711 | } |
| 712 | } |
| 713 | } |
| 714 | |
Harald Welte | 33ec09b | 2018-02-10 15:34:46 +0100 | [diff] [blame] | 715 | /* MT: MSC -> MNCC: SETUP.cnf; Response to SETUP.req */ |
| 716 | template MNCC_PDU tr_MNCC_SETUP_cnf(uint32_t call_id, template MNCC_number connected := *) := { |
| 717 | msg_type := MNCC_SETUP_CNF, |
| 718 | u := { |
| 719 | signal := { /* See 24.008 9.3.5 */ |
| 720 | callref := call_id, |
| 721 | bearer_cap := omit, |
| 722 | called := omit, |
| 723 | calling := omit, |
| 724 | redirecting := omit, |
| 725 | connected := connected, |
| 726 | cause := omit, |
| 727 | progress := *, |
| 728 | useruser := *, |
| 729 | facility := *, |
| 730 | cccap := omit, |
| 731 | ssversion := omit, |
| 732 | clir_sup := 0, |
| 733 | clir_inv := 0, |
| 734 | signal := omit, |
| 735 | keypad := omit, |
| 736 | more := 0, |
| 737 | notify := 0, |
| 738 | emergency := *, |
| 739 | imsi := ?, |
| 740 | lchan_type := ?, |
| 741 | lchan_mode := ? |
| 742 | } |
| 743 | } |
| 744 | } |
| 745 | |
Harald Welte | 4017d55 | 2018-01-26 21:40:05 +0100 | [diff] [blame] | 746 | /* MT: MSC -> MNCC: SETUP_COMPL.req; request to send CONNECT ACK */ |
| 747 | template MNCC_PDU tr_MNCC_SETUP_COMPL_req(template uint32_t call_id) := |
| 748 | 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] | 749 | |
| 750 | /* MT: MSC -> MNCC: SETUP_COMPL.ind; receipt of CONNECT ACK */ |
| 751 | template MNCC_PDU tr_MNCC_SETUP_COMPL_ind(template uint32_t call_id := ?) := |
| 752 | 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] | 753 | template (value) MNCC_PDU ts_MNCC_SETUP_COMPL_ind(uint32_t call_id) := |
| 754 | 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] | 755 | |
| 756 | /* MT: MSC -> MNCC: REJ.req; reject MT call */ |
| 757 | template MNCC_PDU tr_MNCC_REJ_req(template uint32_t call_id, template MNCC_cause cause := *) := { |
| 758 | msg_type := MNCC_REJ_REQ, |
| 759 | u := { |
| 760 | signal := { /* See 24.008 9.3.19 */ |
| 761 | callref := call_id, |
| 762 | bearer_cap := omit, |
| 763 | called := omit, |
| 764 | calling := omit, |
| 765 | redirecting := omit, |
| 766 | connected := omit, |
| 767 | cause := cause, |
| 768 | progress := omit, |
| 769 | useruser := *, |
| 770 | facility := *, |
| 771 | cccap := omit, |
| 772 | ssversion := omit, |
| 773 | clir_sup := 0, |
| 774 | clir_inv := 0, |
| 775 | signal := omit, |
| 776 | keypad := omit, |
| 777 | more := 0, |
| 778 | notify := 0, |
| 779 | emergency := omit, |
| 780 | imsi := ?, |
| 781 | lchan_type := ?, |
| 782 | lchan_mode := ? |
| 783 | } |
| 784 | } |
| 785 | } |
| 786 | |
| 787 | /* MO: MSC <- MNCC: REJ.ind; reject MO call */ |
| 788 | template MNCC_PDU ts_MNCC_REJ_ind(uint32_t call_id, template MNCC_cause cause := omit) := { |
| 789 | msg_type := MNCC_REJ_IND, |
| 790 | u := { |
| 791 | signal := { /* See 24.008 9.3.19 */ |
| 792 | callref := call_id, |
| 793 | bearer_cap := omit, |
| 794 | called := omit, |
| 795 | calling := omit, |
| 796 | redirecting := omit, |
| 797 | connected := omit, |
| 798 | cause := cause, |
| 799 | progress := omit, |
| 800 | useruser := omit, |
| 801 | facility := omit, |
| 802 | cccap := omit, |
| 803 | ssversion := omit, |
| 804 | clir_sup := 0, |
| 805 | clir_inv := 0, |
| 806 | signal := omit, |
| 807 | keypad := omit, |
| 808 | more := 0, |
| 809 | notify := 0, |
| 810 | emergency := omit, |
| 811 | imsi := "", |
| 812 | lchan_type := 0, |
| 813 | lchan_mode := 0 |
| 814 | } |
| 815 | } |
| 816 | } |
| 817 | |
Harald Welte | 812f7a4 | 2018-01-27 00:49:18 +0100 | [diff] [blame] | 818 | /* MT: MSC -> MNCC: CALL_CONF.req; send CALL CONFIRMED to MS */ |
| 819 | template MNCC_PDU tr_MNCC_CALL_CONF_ind(template uint32_t call_id, template MNCC_bearer_cap bcap := *, |
| 820 | template MNCC_cause cause := *, |
| 821 | template MNCC_cccap cccap := *) := { |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 822 | msg_type := MNCC_CALL_CONF_IND, |
| 823 | u := { |
| 824 | signal := { /* See 24.008 9.3.2 */ |
| 825 | callref := call_id, |
| 826 | bearer_cap := bcap, |
| 827 | called := omit, |
| 828 | calling := omit, |
| 829 | redirecting := omit, |
| 830 | connected := omit, |
| 831 | cause := cause, |
| 832 | progress := omit, |
| 833 | useruser := omit, |
| 834 | facility := omit, |
| 835 | cccap := cccap, |
| 836 | ssversion := omit, |
| 837 | clir_sup := 0, |
| 838 | clir_inv := 0, |
| 839 | signal := omit, |
| 840 | keypad := omit, |
| 841 | more := 0, |
| 842 | notify := 0, |
| 843 | emergency := omit, |
Harald Welte | 812f7a4 | 2018-01-27 00:49:18 +0100 | [diff] [blame] | 844 | imsi := ?, |
| 845 | lchan_type := ?, |
| 846 | lchan_mode := ? |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 847 | } |
| 848 | } |
| 849 | } |
Harald Welte | b0d9360 | 2018-03-20 18:09:34 +0100 | [diff] [blame] | 850 | template MNCC_PDU ts_MNCC_CALL_CONF_ind(uint32_t call_id, |
| 851 | template (omit) MNCC_bearer_cap bcap := omit, |
| 852 | template (omit) MNCC_cause cause := omit, |
| 853 | template (omit) MNCC_cccap cccap := omit) := { |
| 854 | msg_type := MNCC_CALL_CONF_IND, |
| 855 | u := { |
| 856 | signal := { /* See 24.008 9.3.2 */ |
| 857 | callref := call_id, |
| 858 | bearer_cap := bcap, |
| 859 | called := omit, |
| 860 | calling := omit, |
| 861 | redirecting := omit, |
| 862 | connected := omit, |
| 863 | cause := cause, |
| 864 | progress := omit, |
| 865 | useruser := omit, |
| 866 | facility := omit, |
| 867 | cccap := cccap, |
| 868 | ssversion := omit, |
| 869 | clir_sup := 0, |
| 870 | clir_inv := 0, |
| 871 | signal := omit, |
| 872 | keypad := omit, |
| 873 | more := 0, |
| 874 | notify := 0, |
| 875 | emergency := omit, |
| 876 | imsi := "", |
| 877 | lchan_type := 0, |
| 878 | lchan_mode := 0 |
| 879 | } |
| 880 | } |
| 881 | } |
| 882 | |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 883 | |
| 884 | /* MO: MSC <- MNCC: CALL_PROC.req; call establishment initiated in network */ |
| 885 | template MNCC_PDU ts_MNCC_CALL_PROC_req(uint32_t call_id, template MNCC_bearer_cap bcap := omit, |
| 886 | template MNCC_progress prog := omit, |
| 887 | template charstring fac := omit, |
| 888 | template MNCC_cccap cccap := omit) := { |
| 889 | msg_type := MNCC_CALL_PROC_REQ, |
| 890 | u := { |
| 891 | signal := { /* See 24.008 9.3.2 */ |
| 892 | callref := call_id, |
| 893 | bearer_cap := bcap, |
| 894 | called := omit, |
| 895 | calling := omit, |
| 896 | redirecting := omit, |
| 897 | connected := omit, |
| 898 | cause := omit, |
| 899 | progress := prog, |
| 900 | useruser := omit, |
| 901 | facility := fac, |
| 902 | cccap := cccap, |
| 903 | ssversion := omit, |
| 904 | clir_sup := 0, |
| 905 | clir_inv := 0, |
| 906 | signal := omit, |
| 907 | keypad := omit, |
| 908 | more := 0, |
| 909 | notify := 0, |
| 910 | emergency := omit, |
| 911 | imsi := "", |
| 912 | lchan_type := 0, |
| 913 | lchan_mode := 0 |
| 914 | } |
| 915 | } |
| 916 | } |
Harald Welte | 9093839 | 2018-03-25 16:36:40 +0200 | [diff] [blame] | 917 | template MNCC_PDU tr_MNCC_CALL_PROC_req(template uint32_t call_id, |
| 918 | template MNCC_bearer_cap bcap := *, |
| 919 | template MNCC_progress prog := *, |
| 920 | template charstring fac := *, |
| 921 | template MNCC_cccap cccap := *) := { |
| 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 := ?, |
| 946 | lchan_mode := ? |
| 947 | } |
| 948 | } |
| 949 | } |
| 950 | |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 951 | |
| 952 | /* MSC <- MNCC: PROGRESS.req; PROGRESS message from ISDN */ |
| 953 | template MNCC_PDU ts_MNCC_PROGRESS_req(uint32_t call_id, MNCC_progress prog, |
| 954 | template MNCC_useruser uu := omit) := { |
| 955 | msg_type := MNCC_PROGRESS_REQ, |
| 956 | u := { |
| 957 | signal := { /* See 24.008 9.3.17 */ |
| 958 | callref := call_id, |
| 959 | bearer_cap := omit, |
| 960 | called := omit, |
| 961 | calling := omit, |
| 962 | redirecting := omit, |
| 963 | connected := omit, |
| 964 | cause := omit, |
| 965 | progress := prog, |
| 966 | useruser := uu, |
| 967 | facility := omit, |
| 968 | cccap := omit, |
| 969 | ssversion := omit, |
| 970 | clir_sup := 0, |
| 971 | clir_inv := 0, |
| 972 | signal := omit, |
| 973 | keypad := omit, |
| 974 | more := 0, |
| 975 | notify := 0, |
| 976 | emergency := omit, |
| 977 | imsi := "", |
| 978 | lchan_type := 0, |
| 979 | lchan_mode := 0 |
| 980 | } |
| 981 | } |
| 982 | } |
| 983 | |
| 984 | /* MO: MSC <- MNCC: ALERT.req; indicate that user alerting has been initiated */ |
| 985 | template MNCC_PDU ts_MNCC_ALERT_req(uint32_t call_id, template MNCC_progress prog := omit, |
| 986 | template charstring fac := omit, |
| 987 | template MNCC_useruser uu := omit) := { |
| 988 | msg_type := MNCC_ALERT_REQ, |
| 989 | u := { |
| 990 | signal := { /* See 24.008 9.3.1 */ |
| 991 | callref := call_id, |
| 992 | bearer_cap := omit, |
| 993 | called := omit, |
| 994 | calling := omit, |
| 995 | redirecting := omit, |
| 996 | connected := omit, |
| 997 | cause := omit, |
| 998 | progress := prog, |
| 999 | useruser := uu, |
| 1000 | facility := fac, |
| 1001 | cccap := omit, |
| 1002 | ssversion := omit, |
| 1003 | clir_sup := 0, |
| 1004 | clir_inv := 0, |
| 1005 | signal := omit, |
| 1006 | keypad := omit, |
| 1007 | more := 0, |
| 1008 | notify := 0, |
| 1009 | emergency := omit, |
| 1010 | imsi := "", |
| 1011 | lchan_type := 0, |
| 1012 | lchan_mode := 0 |
| 1013 | } |
| 1014 | } |
| 1015 | } |
Harald Welte | 9093839 | 2018-03-25 16:36:40 +0200 | [diff] [blame] | 1016 | template MNCC_PDU tr_MNCC_ALERT_req(template uint32_t call_id, |
| 1017 | template MNCC_progress prog := *, |
| 1018 | template charstring fac := *, |
| 1019 | template MNCC_useruser uu := *) := { |
| 1020 | msg_type := MNCC_ALERT_REQ, |
| 1021 | u := { |
| 1022 | signal := { /* See 24.008 9.3.1 */ |
| 1023 | callref := call_id, |
| 1024 | bearer_cap := omit, |
| 1025 | called := omit, |
| 1026 | calling := omit, |
| 1027 | redirecting := omit, |
| 1028 | connected := omit, |
| 1029 | cause := omit, |
| 1030 | progress := prog, |
| 1031 | useruser := uu, |
| 1032 | facility := fac, |
| 1033 | cccap := omit, |
| 1034 | ssversion := omit, |
| 1035 | clir_sup := 0, |
| 1036 | clir_inv := 0, |
| 1037 | signal := omit, |
| 1038 | keypad := omit, |
| 1039 | more := 0, |
| 1040 | notify := 0, |
| 1041 | emergency := omit, |
| 1042 | imsi := ?, |
| 1043 | lchan_type := ?, |
| 1044 | lchan_mode := ? |
| 1045 | } |
| 1046 | } |
| 1047 | } |
| 1048 | |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 1049 | |
| 1050 | |
| 1051 | /* MT: MSC -> MNCC: ALERRT.ind; indicates that mobile user alerting has been initiated */ |
| 1052 | template MNCC_PDU tr_MNCC_ALERT_ind(template uint32_t call_id, template MNCC_progress prog := omit, |
| 1053 | template charstring fac := omit, |
| 1054 | template MNCC_useruser uu := omit) := { |
Harald Welte | 33ec09b | 2018-02-10 15:34:46 +0100 | [diff] [blame] | 1055 | msg_type := MNCC_ALERT_IND, |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 1056 | u := { |
| 1057 | signal := { /* See 24.008 9.3.1 */ |
| 1058 | callref := call_id, |
| 1059 | bearer_cap := omit, |
| 1060 | called := omit, |
| 1061 | calling := omit, |
| 1062 | redirecting := omit, |
| 1063 | connected := omit, |
| 1064 | cause := omit, |
| 1065 | progress := prog, |
| 1066 | useruser := uu, |
| 1067 | facility := fac, |
| 1068 | cccap := omit, |
| 1069 | ssversion := omit, |
| 1070 | clir_sup := 0, |
| 1071 | clir_inv := 0, |
| 1072 | signal := omit, |
| 1073 | keypad := omit, |
| 1074 | more := 0, |
| 1075 | notify := 0, |
| 1076 | emergency := *, |
| 1077 | imsi := ?, |
| 1078 | lchan_type := ?, |
| 1079 | lchan_mode := ? |
| 1080 | } |
| 1081 | } |
| 1082 | } |
Harald Welte | b0d9360 | 2018-03-20 18:09:34 +0100 | [diff] [blame] | 1083 | template (value) MNCC_PDU ts_MNCC_ALERT_ind(uint32_t call_id, |
| 1084 | template (omit) MNCC_progress prog := omit, |
| 1085 | template (omit) charstring fac := omit, |
| 1086 | template (omit) MNCC_useruser uu := omit) := { |
| 1087 | msg_type := MNCC_ALERT_IND, |
| 1088 | u := { |
| 1089 | signal := { /* See 24.008 9.3.1 */ |
| 1090 | callref := call_id, |
| 1091 | bearer_cap := omit, |
| 1092 | called := omit, |
| 1093 | calling := omit, |
| 1094 | redirecting := omit, |
| 1095 | connected := omit, |
| 1096 | cause := omit, |
| 1097 | progress := prog, |
| 1098 | useruser := uu, |
| 1099 | facility := fac, |
| 1100 | cccap := omit, |
| 1101 | ssversion := omit, |
| 1102 | clir_sup := 0, |
| 1103 | clir_inv := 0, |
| 1104 | signal := omit, |
| 1105 | keypad := omit, |
| 1106 | more := 0, |
| 1107 | notify := 0, |
| 1108 | emergency := omit, |
| 1109 | imsi := "", |
| 1110 | lchan_type := 0, |
| 1111 | lchan_mode := 0 |
| 1112 | } |
| 1113 | } |
| 1114 | } |
| 1115 | |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 1116 | |
| 1117 | /* : MSC <- MNCC: NOTIFY.req; request to send information pertaining to a call (such as user suspended) */ |
| 1118 | template MNCC_PDU ts_MNCC_NOTIFY_req(uint32_t call_id, MNCC_notify notify) := { |
| 1119 | msg_type := MNCC_NOTIFY_REQ, |
| 1120 | u := { |
| 1121 | signal := { /* See 24.008 9.3.16 */ |
| 1122 | callref := call_id, |
| 1123 | bearer_cap := omit, |
| 1124 | called := omit, |
| 1125 | calling := omit, |
| 1126 | redirecting := omit, |
| 1127 | connected := omit, |
| 1128 | cause := omit, |
| 1129 | progress := omit, |
| 1130 | useruser := omit, |
| 1131 | facility := omit, |
| 1132 | cccap := omit, |
| 1133 | ssversion := omit, |
| 1134 | clir_sup := 0, |
| 1135 | clir_inv := 0, |
| 1136 | signal := omit, |
| 1137 | keypad := omit, |
| 1138 | more := 0, |
| 1139 | notify := notify, |
| 1140 | emergency := omit, |
| 1141 | imsi := "", |
| 1142 | lchan_type := 0, |
| 1143 | lchan_mode := 0 |
| 1144 | } |
| 1145 | } |
| 1146 | } |
| 1147 | |
| 1148 | /* : MSC -> MNCC: NOTIFY.ind; indication to the mobile user */ |
| 1149 | template MNCC_PDU tr_MNCC_NOTIFY_ind(template uint32_t call_id, template MNCC_notify notify) := { |
| 1150 | msg_type := MNCC_NOTIFY_IND, |
| 1151 | u := { |
| 1152 | signal := { /* See 24.008 9.3.16 */ |
| 1153 | callref := call_id, |
| 1154 | bearer_cap := omit, |
| 1155 | called := omit, |
| 1156 | calling := omit, |
| 1157 | redirecting := omit, |
| 1158 | connected := omit, |
| 1159 | cause := omit, |
| 1160 | progress := omit, |
| 1161 | useruser := omit, |
| 1162 | facility := omit, |
| 1163 | cccap := omit, |
| 1164 | ssversion := omit, |
| 1165 | clir_sup := 0, |
| 1166 | clir_inv := 0, |
| 1167 | signal := omit, |
| 1168 | keypad := omit, |
| 1169 | more := 0, |
| 1170 | notify := notify, |
| 1171 | emergency := *, |
| 1172 | imsi := ?, |
| 1173 | lchan_type := ?, |
| 1174 | lchan_mode := ? |
| 1175 | } |
| 1176 | } |
| 1177 | } |
| 1178 | |
| 1179 | /* : MSC -> MNCC: DISC.ind; mobile user requests disconnect */ |
| 1180 | template MNCC_PDU tr_MNCC_DISC_ind(template uint32_t call_id := ?, template MNCC_cause cause := ?, |
| 1181 | template MNCC_progress prog := *, |
| 1182 | template charstring fac := *, |
| 1183 | template MNCC_useruser uu := *) := { |
| 1184 | msg_type := MNCC_DISC_IND, |
| 1185 | u := { |
| 1186 | signal := { /* See 24.008 9.3.7 */ |
| 1187 | callref := call_id, |
| 1188 | bearer_cap := omit, |
| 1189 | called := omit, |
| 1190 | calling := omit, |
| 1191 | redirecting := omit, |
| 1192 | connected := omit, |
| 1193 | cause := cause, |
| 1194 | progress := prog, |
| 1195 | useruser := uu, |
| 1196 | facility := fac, |
| 1197 | cccap := omit, |
| 1198 | ssversion := omit, |
| 1199 | clir_sup := 0, |
| 1200 | clir_inv := 0, |
| 1201 | signal := omit, |
| 1202 | keypad := omit, |
| 1203 | more := 0, |
| 1204 | notify := 0, |
| 1205 | emergency := *, |
| 1206 | imsi := ?, |
| 1207 | lchan_type := ?, |
| 1208 | lchan_mode := ? |
| 1209 | } |
| 1210 | } |
| 1211 | } |
Harald Welte | 9093839 | 2018-03-25 16:36:40 +0200 | [diff] [blame] | 1212 | template (value) MNCC_PDU ts_MNCC_DISC_ind(uint32_t call_id, template (value) MNCC_cause cause, |
| 1213 | template (omit) MNCC_progress prog := omit, |
| 1214 | template (omit) charstring fac := omit, |
| 1215 | template (omit) MNCC_useruser uu := omit) := { |
| 1216 | msg_type := MNCC_DISC_IND, |
| 1217 | u := { |
| 1218 | signal := { /* See 24.008 9.3.7 */ |
| 1219 | callref := call_id, |
| 1220 | bearer_cap := omit, |
| 1221 | called := omit, |
| 1222 | calling := omit, |
| 1223 | redirecting := omit, |
| 1224 | connected := omit, |
| 1225 | cause := cause, |
| 1226 | progress := prog, |
| 1227 | useruser := uu, |
| 1228 | facility := fac, |
| 1229 | cccap := omit, |
| 1230 | ssversion := omit, |
| 1231 | clir_sup := 0, |
| 1232 | clir_inv := 0, |
| 1233 | signal := omit, |
| 1234 | keypad := omit, |
| 1235 | more := 0, |
| 1236 | notify := 0, |
| 1237 | emergency := omit, |
| 1238 | imsi := "", |
| 1239 | lchan_type := 0, |
| 1240 | lchan_mode := 0 |
| 1241 | } |
| 1242 | } |
| 1243 | } |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 1244 | |
| 1245 | /* : MSC <- MNCC: DISC.req; indicate disconnect to mobile user */ |
| 1246 | template MNCC_PDU ts_MNCC_DISC_req(uint32_t call_id, MNCC_cause cause, |
| 1247 | template MNCC_progress prog := omit, |
| 1248 | template charstring fac := omit, |
| 1249 | template MNCC_useruser uu := omit) := { |
| 1250 | msg_type := MNCC_DISC_REQ, |
| 1251 | u := { |
| 1252 | signal := { /* See 24.008 9.3.7 */ |
| 1253 | callref := call_id, |
| 1254 | bearer_cap := omit, |
| 1255 | called := omit, |
| 1256 | calling := omit, |
| 1257 | redirecting := omit, |
| 1258 | connected := omit, |
| 1259 | cause := cause, |
| 1260 | progress := prog, |
| 1261 | useruser := uu, |
| 1262 | facility := fac, |
| 1263 | cccap := omit, |
| 1264 | ssversion := omit, |
| 1265 | clir_sup := 0, |
| 1266 | clir_inv := 0, |
| 1267 | signal := omit, |
| 1268 | keypad := omit, |
| 1269 | more := 0, |
| 1270 | notify := 0, |
| 1271 | emergency := omit, |
| 1272 | imsi := "", |
| 1273 | lchan_type := 0, |
| 1274 | lchan_mode := 0 |
| 1275 | } |
| 1276 | } |
| 1277 | } |
Harald Welte | 9093839 | 2018-03-25 16:36:40 +0200 | [diff] [blame] | 1278 | template MNCC_PDU tr_MNCC_DISC_req(template uint32_t call_id, |
| 1279 | template MNCC_cause cause := *, |
| 1280 | template MNCC_progress prog := omit, |
| 1281 | template charstring fac := omit, |
| 1282 | template MNCC_useruser uu := omit) := { |
| 1283 | msg_type := MNCC_DISC_REQ, |
| 1284 | u := { |
| 1285 | signal := { /* See 24.008 9.3.7 */ |
| 1286 | callref := call_id, |
| 1287 | bearer_cap := omit, |
| 1288 | called := omit, |
| 1289 | calling := omit, |
| 1290 | redirecting := omit, |
| 1291 | connected := omit, |
| 1292 | cause := cause, |
| 1293 | progress := prog, |
| 1294 | useruser := uu, |
| 1295 | facility := fac, |
| 1296 | cccap := omit, |
| 1297 | ssversion := omit, |
| 1298 | clir_sup := 0, |
| 1299 | clir_inv := 0, |
| 1300 | signal := omit, |
| 1301 | keypad := omit, |
| 1302 | more := 0, |
| 1303 | notify := 0, |
| 1304 | emergency := *, |
| 1305 | imsi := ?, |
| 1306 | lchan_type := ?, |
| 1307 | lchan_mode := ? |
| 1308 | } |
| 1309 | } |
| 1310 | } |
| 1311 | |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 1312 | |
| 1313 | /* : MSC -> MNCC: REL.ind; mobile user informs network that user wants to release call + MM */ |
| 1314 | template MNCC_PDU tr_MNCC_REL_ind(template uint32_t call_id := ?, template MNCC_cause cause := ?, |
| 1315 | template charstring fac := *, template MNCC_useruser uu := *) := { |
| 1316 | msg_type := MNCC_REL_IND, |
| 1317 | u := { |
| 1318 | signal := { /* See 24.008 9.3.18 */ |
| 1319 | callref := call_id, |
| 1320 | bearer_cap := omit, |
| 1321 | called := omit, |
| 1322 | calling := omit, |
| 1323 | redirecting := omit, |
| 1324 | connected := omit, |
| 1325 | cause := cause, |
| 1326 | progress := omit, |
| 1327 | useruser := uu, |
| 1328 | facility := fac, |
| 1329 | cccap := omit, |
| 1330 | ssversion := omit, |
| 1331 | clir_sup := 0, |
| 1332 | clir_inv := 0, |
| 1333 | signal := omit, |
| 1334 | keypad := omit, |
| 1335 | more := 0, |
| 1336 | notify := 0, |
| 1337 | emergency := *, |
| 1338 | imsi := ?, |
| 1339 | lchan_type := ?, |
| 1340 | lchan_mode := ? |
| 1341 | } |
| 1342 | } |
| 1343 | } |
Harald Welte | 9093839 | 2018-03-25 16:36:40 +0200 | [diff] [blame] | 1344 | template (value) MNCC_PDU ts_MNCC_REL_ind(uint32_t call_id, |
| 1345 | template (value) MNCC_cause cause, |
| 1346 | template (omit) charstring fac := omit, |
| 1347 | template (omit) MNCC_useruser uu := omit) := { |
| 1348 | msg_type := MNCC_REL_IND, |
| 1349 | u := { |
| 1350 | signal := { /* See 24.008 9.3.18 */ |
| 1351 | callref := call_id, |
| 1352 | bearer_cap := omit, |
| 1353 | called := omit, |
| 1354 | calling := omit, |
| 1355 | redirecting := omit, |
| 1356 | connected := omit, |
| 1357 | cause := cause, |
| 1358 | progress := omit, |
| 1359 | useruser := uu, |
| 1360 | facility := fac, |
| 1361 | cccap := omit, |
| 1362 | ssversion := omit, |
| 1363 | clir_sup := 0, |
| 1364 | clir_inv := 0, |
| 1365 | signal := omit, |
| 1366 | keypad := omit, |
| 1367 | more := 0, |
| 1368 | notify := 0, |
| 1369 | emergency := omit, |
| 1370 | imsi := "", |
| 1371 | lchan_type := 0, |
| 1372 | lchan_mode := 0 |
| 1373 | } |
| 1374 | } |
| 1375 | } |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 1376 | |
| 1377 | /* : MSC <- MNCC: REL.req; indicate to mobile user tat network intents to release MM */ |
| 1378 | template MNCC_PDU ts_MNCC_REL_req(uint32_t call_id, MNCC_cause cause, |
| 1379 | template charstring fac := omit, template MNCC_useruser uu := omit) := { |
| 1380 | msg_type := MNCC_REL_REQ, |
| 1381 | u := { |
| 1382 | signal := { /* See 24.008 9.3.18 */ |
| 1383 | callref := call_id, |
| 1384 | bearer_cap := omit, |
| 1385 | called := omit, |
| 1386 | calling := omit, |
| 1387 | redirecting := omit, |
| 1388 | connected := omit, |
| 1389 | cause := cause, |
| 1390 | progress := omit, |
| 1391 | useruser := uu, |
| 1392 | facility := fac, |
| 1393 | cccap := omit, |
| 1394 | ssversion := omit, |
| 1395 | clir_sup := 0, |
| 1396 | clir_inv := 0, |
| 1397 | signal := omit, |
| 1398 | keypad := omit, |
| 1399 | more := 0, |
| 1400 | notify := 0, |
| 1401 | emergency := omit, |
| 1402 | imsi := "", |
| 1403 | lchan_type := 0, |
| 1404 | lchan_mode := 0 |
| 1405 | } |
| 1406 | } |
| 1407 | } |
Harald Welte | 9093839 | 2018-03-25 16:36:40 +0200 | [diff] [blame] | 1408 | template MNCC_PDU tr_MNCC_REL_req(template uint32_t call_id, template MNCC_cause cause := *, |
| 1409 | template charstring fac := *, template MNCC_useruser uu := *) := { |
| 1410 | msg_type := MNCC_REL_REQ, |
| 1411 | u := { |
| 1412 | signal := { /* See 24.008 9.3.18 */ |
| 1413 | callref := call_id, |
| 1414 | bearer_cap := omit, |
| 1415 | called := *, |
| 1416 | calling := *, |
| 1417 | redirecting := *, |
| 1418 | connected := *, |
| 1419 | cause := cause, |
| 1420 | progress := omit, |
| 1421 | useruser := uu, |
| 1422 | facility := fac, |
| 1423 | cccap := omit, |
| 1424 | ssversion := omit, |
| 1425 | clir_sup := 0, |
| 1426 | clir_inv := 0, |
| 1427 | signal := omit, |
| 1428 | keypad := omit, |
| 1429 | more := 0, |
| 1430 | notify := 0, |
| 1431 | emergency := omit, |
| 1432 | imsi := ?, |
| 1433 | lchan_type := 0, |
| 1434 | lchan_mode := 0 |
| 1435 | } |
| 1436 | } |
| 1437 | } |
| 1438 | |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 1439 | |
| 1440 | /* : MSC -> MNCC: REL.cnf; confirm REL_req */ |
| 1441 | template MNCC_PDU tr_MNCC_REL_cnf(template uint32_t call_id := ?, template MNCC_cause cause := ?, |
| 1442 | template charstring fac := *, template MNCC_useruser uu := *) |
| 1443 | modifies tr_MNCC_REL_ind := { |
| 1444 | msg_type := MNCC_REL_CNF |
| 1445 | }; |
Harald Welte | 9093839 | 2018-03-25 16:36:40 +0200 | [diff] [blame] | 1446 | template (value) MNCC_PDU ts_MNCC_REL_cnf(uint32_t call_id, |
| 1447 | template (value) MNCC_cause cause, |
| 1448 | template (omit) charstring fac := omit, |
| 1449 | template (omit) MNCC_useruser uu := omit) |
| 1450 | modifies ts_MNCC_REL_ind := { |
| 1451 | msg_type := MNCC_REL_CNF |
| 1452 | }; |
| 1453 | |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 1454 | |
| 1455 | /* : MSC <- MNCC: FACILITY.req; request transmission of facility */ |
| 1456 | template MNCC_PDU ts_MNCC_FACILITY_req(uint32_t call_id, charstring fac) := { |
| 1457 | msg_type := MNCC_FACILITY_REQ, |
| 1458 | u := { |
| 1459 | signal := { /* See 24.008 9.3.9 */ |
| 1460 | callref := call_id, |
| 1461 | bearer_cap := omit, |
| 1462 | called := omit, |
| 1463 | calling := omit, |
| 1464 | redirecting := omit, |
| 1465 | connected := omit, |
| 1466 | cause := omit, |
| 1467 | progress := omit, |
| 1468 | useruser := omit, |
| 1469 | facility := fac, |
| 1470 | cccap := omit, |
| 1471 | ssversion := omit, |
| 1472 | clir_sup := 0, |
| 1473 | clir_inv := 0, |
| 1474 | signal := omit, |
| 1475 | keypad := omit, |
| 1476 | more := 0, |
| 1477 | notify := 0, |
| 1478 | emergency := omit, |
| 1479 | imsi := "", |
| 1480 | lchan_type := 0, |
| 1481 | lchan_mode := 0 |
| 1482 | } |
| 1483 | } |
| 1484 | } |
| 1485 | |
| 1486 | /* : MSC -> MNCC: FACILITY.req; indicate reception of facility */ |
| 1487 | template MNCC_PDU tr_MNCC_FACILITY_ind(template uint32_t call_id := ?, template charstring fac := ?) := { |
| 1488 | msg_type := MNCC_FACILITY_IND, |
| 1489 | u := { |
| 1490 | signal := { /* See 24.008 9.3.9 */ |
| 1491 | callref := call_id, |
| 1492 | bearer_cap := omit, |
| 1493 | called := omit, |
| 1494 | calling := omit, |
| 1495 | redirecting := omit, |
| 1496 | connected := omit, |
| 1497 | cause := omit, |
| 1498 | progress := omit, |
| 1499 | useruser := omit, |
| 1500 | facility := fac, |
| 1501 | cccap := omit, |
| 1502 | ssversion := omit, |
| 1503 | clir_sup := 0, |
| 1504 | clir_inv := 0, |
| 1505 | signal := omit, |
| 1506 | keypad := omit, |
| 1507 | more := 0, |
| 1508 | notify := 0, |
| 1509 | emergency := *, |
| 1510 | imsi := ?, |
| 1511 | lchan_type := ?, |
| 1512 | lchan_mode := ? |
| 1513 | } |
| 1514 | } |
| 1515 | } |
| 1516 | |
| 1517 | /* : MSC -> MNCC: START_DTMF.ind; MS has */ |
| 1518 | template MNCC_PDU tr_MNCC_START_DTMF_ind(template uint32_t call_id := ?, template MNCC_keypad keypad := ?) := { |
| 1519 | msg_type := MNCC_START_DTMF_IND, |
| 1520 | u := { |
| 1521 | signal := { /* See 24.008 9.3.24 */ |
| 1522 | callref := call_id, |
| 1523 | bearer_cap := omit, |
| 1524 | called := omit, |
| 1525 | calling := omit, |
| 1526 | redirecting := omit, |
| 1527 | connected := omit, |
| 1528 | cause := omit, |
| 1529 | progress := omit, |
| 1530 | useruser := omit, |
| 1531 | facility := omit, |
| 1532 | cccap := omit, |
| 1533 | ssversion := omit, |
| 1534 | clir_sup := 0, |
| 1535 | clir_inv := 0, |
| 1536 | signal := omit, |
| 1537 | keypad := keypad, |
| 1538 | more := 0, |
| 1539 | notify := 0, |
| 1540 | emergency := *, |
| 1541 | imsi := ?, |
| 1542 | lchan_type := ?, |
| 1543 | lchan_mode := ? |
| 1544 | } |
| 1545 | } |
| 1546 | } |
| 1547 | |
| 1548 | /* : MSC <- MNCC: START_DTMF.rsp; Acknowledge start of DTMF */ |
| 1549 | template MNCC_PDU ts_MNCC_START_DTMF_rsp(uint32_t call_id, MNCC_keypad keypad) := { |
| 1550 | msg_type := MNCC_START_DTMF_RSP, |
| 1551 | u := { |
| 1552 | signal := { /* See 24.008 9.3.25 */ |
| 1553 | callref := call_id, |
| 1554 | bearer_cap := omit, |
| 1555 | called := omit, |
| 1556 | calling := omit, |
| 1557 | redirecting := omit, |
| 1558 | connected := omit, |
| 1559 | cause := omit, |
| 1560 | progress := omit, |
| 1561 | useruser := omit, |
| 1562 | facility := omit, |
| 1563 | cccap := omit, |
| 1564 | ssversion := omit, |
| 1565 | clir_sup := 0, |
| 1566 | clir_inv := 0, |
| 1567 | signal := omit, |
| 1568 | keypad := keypad, |
| 1569 | more := 0, |
| 1570 | notify := 0, |
| 1571 | emergency := omit, |
| 1572 | imsi := "", |
| 1573 | lchan_type := 0, |
| 1574 | lchan_mode := 0 |
| 1575 | } |
| 1576 | } |
| 1577 | } |
| 1578 | |
| 1579 | /* : MSC <- MNCC: START_DTMF.rsp; Acknowledge start of DTMF */ |
| 1580 | template MNCC_PDU ts_MNCC_START_DTMF_rej(uint32_t call_id, MNCC_cause cause) := { |
| 1581 | msg_type := MNCC_START_DTMF_REJ, |
| 1582 | u := { |
| 1583 | signal := { /* See 24.008 9.3.26 */ |
| 1584 | callref := call_id, |
| 1585 | bearer_cap := omit, |
| 1586 | called := omit, |
| 1587 | calling := omit, |
| 1588 | redirecting := omit, |
| 1589 | connected := omit, |
| 1590 | cause := cause, |
| 1591 | progress := omit, |
| 1592 | useruser := omit, |
| 1593 | facility := omit, |
| 1594 | cccap := omit, |
| 1595 | ssversion := omit, |
| 1596 | clir_sup := 0, |
| 1597 | clir_inv := 0, |
| 1598 | signal := omit, |
| 1599 | keypad := omit, |
| 1600 | more := 0, |
| 1601 | notify := 0, |
| 1602 | emergency := omit, |
| 1603 | imsi := "", |
| 1604 | lchan_type := 0, |
| 1605 | lchan_mode := 0 |
| 1606 | } |
| 1607 | } |
| 1608 | } |
| 1609 | |
| 1610 | /* : MSC -> MNCC: STOP_DTMF.ind */ |
| 1611 | template MNCC_PDU tr_MNCC_STOP_DTMF_ind(template uint32_t call_id := ?) := |
| 1612 | tr_MNCC_SIMPLE(MNCC_STOP_DTMF_IND, call_id); /* See 24.008 9.3.29 */ |
| 1613 | |
| 1614 | /* : MSC <- MNCC: STOP_DTMF.rsp; Acknowledge stop of DTMF */ |
| 1615 | template MNCC_PDU ts_MNCC_STOP_DTMF_rsp(uint32_t call_id) := |
| 1616 | ts_MNCC_SIMPLE(MNCC_STOP_DTMF_RSP, call_id); /* See 24.008 9.3.30 */ |
| 1617 | |
| 1618 | /* : MSC -> MNCC: MODIFY.ind; request to start MO in-call modification */ |
| 1619 | template MNCC_PDU tr_MNCC_MODIFY_ind(template uint32_t call_id := ?, template MNCC_bearer_cap bcap := ?) := { |
| 1620 | msg_type := MNCC_MODIFY_IND, |
| 1621 | u := { |
| 1622 | signal := { /* See 24.008 9.3.14 */ |
| 1623 | callref := call_id, |
| 1624 | bearer_cap := bcap, |
| 1625 | called := omit, |
| 1626 | calling := omit, |
| 1627 | redirecting := omit, |
| 1628 | connected := omit, |
| 1629 | cause := omit, |
| 1630 | progress := omit, |
| 1631 | useruser := omit, |
| 1632 | facility := omit, |
| 1633 | cccap := omit, |
| 1634 | ssversion := omit, |
| 1635 | clir_sup := 0, |
| 1636 | clir_inv := 0, |
| 1637 | signal := omit, |
| 1638 | keypad := omit, |
| 1639 | more := 0, |
| 1640 | notify := 0, |
| 1641 | emergency := *, |
| 1642 | imsi := ?, |
| 1643 | lchan_type := ?, |
| 1644 | lchan_mode := ? |
| 1645 | } |
| 1646 | } |
| 1647 | } |
| 1648 | |
| 1649 | /* : MSC <- MNCC: MODIFY.rsp; tespond to MO in-call modification */ |
| 1650 | template MNCC_PDU ts_MNCC_MODIFY_rsp(uint32_t call_id, MNCC_bearer_cap bcap) := { |
| 1651 | msg_type := MNCC_MODIFY_RSP, |
| 1652 | u := { |
| 1653 | signal := { /* See 24.008 9.3.14 */ |
| 1654 | callref := call_id, |
| 1655 | bearer_cap := bcap, |
| 1656 | called := omit, |
| 1657 | calling := omit, |
| 1658 | redirecting := omit, |
| 1659 | connected := omit, |
| 1660 | cause := omit, |
| 1661 | progress := omit, |
| 1662 | useruser := omit, |
| 1663 | facility := omit, |
| 1664 | cccap := omit, |
| 1665 | ssversion := omit, |
| 1666 | clir_sup := 0, |
| 1667 | clir_inv := 0, |
| 1668 | signal := omit, |
| 1669 | keypad := omit, |
| 1670 | more := 0, |
| 1671 | notify := 0, |
| 1672 | emergency := omit, |
| 1673 | imsi := "", |
| 1674 | lchan_type := 0, |
| 1675 | lchan_mode := 0 |
| 1676 | } |
| 1677 | } |
| 1678 | } |
| 1679 | |
| 1680 | /* : MSC <- MNCC: MODIFY.req; request to start MT in-call modification */ |
| 1681 | template MNCC_PDU ts_MNCC_MODIFY_req(uint32_t call_id, MNCC_bearer_cap bcap) := { |
| 1682 | msg_type := MNCC_MODIFY_REQ, |
| 1683 | u := { |
| 1684 | signal := { /* See 24.008 9.3.14 */ |
| 1685 | callref := call_id, |
| 1686 | bearer_cap := bcap, |
| 1687 | called := omit, |
| 1688 | calling := omit, |
| 1689 | redirecting := omit, |
| 1690 | connected := omit, |
| 1691 | cause := omit, |
| 1692 | progress := omit, |
| 1693 | useruser := omit, |
| 1694 | facility := omit, |
| 1695 | cccap := omit, |
| 1696 | ssversion := omit, |
| 1697 | clir_sup := 0, |
| 1698 | clir_inv := 0, |
| 1699 | signal := omit, |
| 1700 | keypad := omit, |
| 1701 | more := 0, |
| 1702 | notify := 0, |
| 1703 | emergency := omit, |
| 1704 | imsi := "", |
| 1705 | lchan_type := 0, |
| 1706 | lchan_mode := 0 |
| 1707 | } |
| 1708 | } |
| 1709 | } |
| 1710 | |
| 1711 | /* : MSC -> MNCC: MODIFY.cnf; MS has responded to MT in-call modification */ |
| 1712 | template MNCC_PDU tr_MNCC_MODIFY_cnf(template uint32_t call_id := ?, |
| 1713 | template MNCC_bearer_cap bcap := ?) := { |
| 1714 | msg_type := MNCC_MODIFY_CNF, |
| 1715 | u := { |
| 1716 | signal := { /* See 24.008 9.3.14 */ |
| 1717 | callref := call_id, |
| 1718 | bearer_cap := bcap, |
| 1719 | called := omit, |
| 1720 | calling := omit, |
| 1721 | redirecting := omit, |
| 1722 | connected := omit, |
| 1723 | cause := omit, |
| 1724 | progress := omit, |
| 1725 | useruser := omit, |
| 1726 | facility := omit, |
| 1727 | cccap := omit, |
| 1728 | ssversion := omit, |
| 1729 | clir_sup := 0, |
| 1730 | clir_inv := 0, |
| 1731 | signal := omit, |
| 1732 | keypad := omit, |
| 1733 | more := 0, |
| 1734 | notify := 0, |
| 1735 | emergency := *, |
| 1736 | imsi := ?, |
| 1737 | lchan_type := ?, |
| 1738 | lchan_mode := ? |
| 1739 | } |
| 1740 | } |
| 1741 | } |
| 1742 | |
| 1743 | /* : MSC <- MNCC: Request transmission of USERINFO to MS */ |
| 1744 | template MNCC_PDU ts_MNCC_USERINFO_req(uint32_t call_id, MNCC_useruser uu, integer more) := { |
| 1745 | msg_type := MNCC_USERINFO_REQ, |
| 1746 | u := { |
| 1747 | signal := { /* See 24.008 9.3.31 */ |
| 1748 | callref := call_id, |
| 1749 | bearer_cap := omit, |
| 1750 | called := omit, |
| 1751 | calling := omit, |
| 1752 | redirecting := omit, |
| 1753 | connected := omit, |
| 1754 | cause := omit, |
| 1755 | progress := omit, |
| 1756 | useruser := uu, |
| 1757 | facility := omit, |
| 1758 | cccap := omit, |
| 1759 | ssversion := omit, |
| 1760 | clir_sup := 0, |
| 1761 | clir_inv := 0, |
| 1762 | signal := omit, |
| 1763 | keypad := omit, |
| 1764 | more := more, |
| 1765 | notify := 0, |
| 1766 | emergency := omit, |
| 1767 | imsi := "", |
| 1768 | lchan_type := 0, |
| 1769 | lchan_mode := 0 |
| 1770 | } |
| 1771 | } |
| 1772 | } |
| 1773 | |
| 1774 | /* : MSC -> MNCC: Indicate reception of USERINFO from MS */ |
| 1775 | template MNCC_PDU tr_MNCC_USERINFO_ind(template uint32_t call_id := ?, template MNCC_useruser uu := ?, |
| 1776 | integer more) := { |
| 1777 | msg_type := MNCC_USERINFO_IND, |
| 1778 | u := { |
| 1779 | signal := { /* See 24.008 9.3.31 */ |
| 1780 | callref := call_id, |
| 1781 | bearer_cap := omit, |
| 1782 | called := omit, |
| 1783 | calling := omit, |
| 1784 | redirecting := omit, |
| 1785 | connected := omit, |
| 1786 | cause := omit, |
| 1787 | progress := omit, |
| 1788 | useruser := uu, |
| 1789 | facility := omit, |
| 1790 | cccap := omit, |
| 1791 | ssversion := omit, |
| 1792 | clir_sup := 0, |
| 1793 | clir_inv := 0, |
| 1794 | signal := omit, |
| 1795 | keypad := omit, |
| 1796 | more := more, |
| 1797 | notify := 0, |
| 1798 | emergency := omit, |
| 1799 | imsi := "", |
| 1800 | lchan_type := 0, |
| 1801 | lchan_mode := 0 |
| 1802 | } |
| 1803 | } |
| 1804 | } |
| 1805 | |
| 1806 | /* : MSC -> MNCC: HOLD.ind; MS requests hold of call */ |
| 1807 | template MNCC_PDU tr_MNCC_HOLD_ind(template uint32_t call_id := ?) := |
| 1808 | tr_MNCC_SIMPLE(MNCC_HOLD_IND, call_id); /* See 24.008 9.3.10 */ |
| 1809 | |
| 1810 | /* : MSC <- MNCC: HOLD.cnf; network confirms hold of call */ |
| 1811 | template MNCC_PDU ts_MNCC_HOLD_cnf(uint32_t call_id) := |
| 1812 | ts_MNCC_SIMPLE(MNCC_HOLD_CNF, call_id); /* See 24.008 9.3.11 */ |
| 1813 | |
| 1814 | /* : MSC <- MNCC: HOLD.rej; network rejects hold of call */ |
| 1815 | template MNCC_PDU ts_MNCC_HOLD_rej(uint32_t call_id, MNCC_cause cause) := { |
| 1816 | msg_type := MNCC_HOLD_REJ, |
| 1817 | u := { |
| 1818 | signal := { /* See 24.008 9.3.12 */ |
| 1819 | callref := call_id, |
| 1820 | bearer_cap := omit, |
| 1821 | called := omit, |
| 1822 | calling := omit, |
| 1823 | redirecting := omit, |
| 1824 | connected := omit, |
| 1825 | cause := cause, |
| 1826 | progress := omit, |
| 1827 | useruser := omit, |
| 1828 | facility := omit, |
| 1829 | cccap := omit, |
| 1830 | ssversion := omit, |
| 1831 | clir_sup := 0, |
| 1832 | clir_inv := 0, |
| 1833 | signal := omit, |
| 1834 | keypad := omit, |
| 1835 | more := 0, |
| 1836 | notify := 0, |
| 1837 | emergency := omit, |
| 1838 | imsi := "", |
| 1839 | lchan_type := 0, |
| 1840 | lchan_mode := 0 |
| 1841 | } |
| 1842 | } |
| 1843 | } |
| 1844 | |
| 1845 | /* : MSC -> MNCC: RETRIEVE.ind; MS requests retrieval of held call */ |
| 1846 | template MNCC_PDU tr_MNCC_RETRIEVE_ind(template uint32_t call_id := ?) := |
| 1847 | tr_MNCC_SIMPLE(MNCC_RETRIEVE_IND, call_id); /* See 24.008 9.3.20 */ |
| 1848 | |
| 1849 | /* : MSC <- MNCC: RETRIEVE.cnf; network confirms retrieve of call */ |
| 1850 | template MNCC_PDU ts_MNCC_RETRIEVE_cnf(uint32_t call_id) := |
| 1851 | ts_MNCC_SIMPLE(MNCC_RETRIEVE_CNF, call_id); /* See 24.008 9.3.21 */ |
| 1852 | |
| 1853 | /* : MSC <- MNCC: RETRIEVE.rej; network rejects retrieve of call */ |
| 1854 | template MNCC_PDU ts_MNCC_RETRIEVE_rej(uint32_t call_id, MNCC_cause cause) |
| 1855 | modifies ts_MNCC_HOLD_rej := { /* See 24.008 9.3.22 */ |
| 1856 | msg_type := MNCC_RETRIEVE_REJ |
| 1857 | } |
| 1858 | |
| 1859 | |
| 1860 | template MNCC_PDU ts_MNCC_SIMPLE_RTP(MNCC_MsgType msg_type, uint32_t call_id) := { |
| 1861 | msg_type := msg_type, |
| 1862 | u := { |
| 1863 | rtp := { |
| 1864 | callref := call_id, |
| 1865 | ip := 0, |
| 1866 | rtp_port := 0, |
| 1867 | payload_type := 0, |
| 1868 | payload_msg_type := 0 |
| 1869 | } |
| 1870 | } |
| 1871 | } |
| 1872 | |
| 1873 | /* MSC <- MNCC: RTP_CREATE.req; request creation of RTP */ |
| 1874 | template MNCC_PDU ts_MNCC_RTP_CREATE(uint32_t call_id) := ts_MNCC_SIMPLE_RTP(MNCC_RTP_CREATE, call_id); |
| 1875 | |
| 1876 | /* MSC -> MNCC: RTP_CREATE.rsp; acknowledge creation of RTP (stating MSC side IP/Port) */ |
| 1877 | template MNCC_PDU tr_MNCC_RTP_CREATE(template uint32_t call_id := ?) := { |
| 1878 | msg_type := MNCC_RTP_CREATE, |
| 1879 | u := { |
| 1880 | rtp := { |
| 1881 | callref := call_id, |
| 1882 | ip := ?, |
| 1883 | rtp_port := ?, |
| 1884 | payload_type := ?, |
| 1885 | payload_msg_type := ? |
| 1886 | } |
| 1887 | } |
| 1888 | } |
| 1889 | |
| 1890 | /* MSC <- MNCC: RTP_CONNECT.req; request connect of RTP */ |
| 1891 | template MNCC_PDU ts_MNCC_RTP_CONNECT(uint32_t call_id, uint32_t ip, uint32_t rtp_port, uint32_t pt) := { |
| 1892 | msg_type := MNCC_RTP_CONNECT, |
| 1893 | u := { |
| 1894 | rtp := { |
| 1895 | callref := call_id, |
| 1896 | ip := ip, |
| 1897 | rtp_port := rtp_port, |
| 1898 | payload_type := pt, |
| 1899 | payload_msg_type := 0 |
| 1900 | } |
| 1901 | } |
| 1902 | } |
Harald Welte | b0d9360 | 2018-03-20 18:09:34 +0100 | [diff] [blame] | 1903 | template MNCC_PDU tr_MNCC_RTP_CONNECT(template uint32_t call_id, |
| 1904 | template uint32_t ip := ?, |
| 1905 | template uint32_t rtp_port := ?, |
| 1906 | template uint32_t pt := ?) := { |
| 1907 | msg_type := MNCC_RTP_CONNECT, |
| 1908 | u := { |
| 1909 | rtp := { |
| 1910 | callref := call_id, |
| 1911 | ip := ip, |
| 1912 | rtp_port := rtp_port, |
| 1913 | payload_type := pt, |
| 1914 | payload_msg_type := 0 |
| 1915 | } |
| 1916 | } |
| 1917 | } |
| 1918 | |
Harald Welte | 8b2a258 | 2018-01-16 08:11:42 +0100 | [diff] [blame] | 1919 | |
| 1920 | /* MSC <- MNCC: RTP_FREE.req; request connect of RTP */ |
| 1921 | 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] | 1922 | |
Harald Welte | 251b52b | 2018-01-17 13:58:16 +0100 | [diff] [blame] | 1923 | function f_mncc_get_call_id(MNCC_PDU pdu) return uint32_t { |
| 1924 | if (ischosen(pdu.u.rtp)) { |
| 1925 | return pdu.u.rtp.callref; |
| 1926 | } else if (ischosen(pdu.u.data)) { |
| 1927 | return pdu.u.data.callref; |
| 1928 | } else if (ischosen(pdu.u.signal)) { |
| 1929 | return pdu.u.signal.callref; |
| 1930 | } else { |
| 1931 | setverdict(fail, "Unable to determine Callref for MNCC", pdu); |
Daniel Willmann | e4ff537 | 2018-07-05 17:35:03 +0200 | [diff] [blame] | 1932 | mtc.stop |
Harald Welte | 251b52b | 2018-01-17 13:58:16 +0100 | [diff] [blame] | 1933 | } |
| 1934 | } |
| 1935 | |
Harald Welte | 474fd7d | 2017-12-29 16:01:39 +0100 | [diff] [blame] | 1936 | } with { encode "RAW" ; variant "FIELDORDER(msb)" } |