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