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