blob: 47e1f62be1d168e4f6d80f7b2ab407d11b4373f2 [file] [log] [blame]
Harald Weltec76f29f2017-11-22 12:46:46 +01001module L3_Templates {
2
Harald Welte35bb7162018-01-03 21:07:52 +01003/* L3 Templates, building on top of MobileL3*_Types from Ericsson.
4 *
5 * (C) 2017 by Harald Welte <laforge@gnumonks.org>
6 * All rights reserved.
7 *
8 * Released under the terms of GNU General Public License, Version 2 or
9 * (at your option) any later version.
10 */
11
Harald Weltec76f29f2017-11-22 12:46:46 +010012import from General_Types all;
13import from MobileL3_Types all;
14import from MobileL3_CommonIE_Types all;
15import from MobileL3_MM_Types all;
16import from MobileL3_RRM_Types all;
Harald Weltecb6cc332018-01-21 13:59:08 +010017import from MobileL3_CC_Types all;
18//import from MobileL3_GMM_SM_Types all;
19//import from MobileL3_SMS_Types all;
20
Harald Weltec76f29f2017-11-22 12:46:46 +010021
22type enumerated CmServiceType {
23 CM_TYPE_MO_CALL ('0001'B),
24 CM_TYPE_EMERG_CALL ('0010'B),
25 CM_TYPE_MO_SMS ('0100'B),
Harald Welte6ed6bf92018-01-24 21:09:15 +010026 CM_TYPE_SS_ACT ('1000'B),
27 CM_TYPE_VGCS ('1001'B),
28 CM_TYPE_VBS ('1010'B),
29 CM_TYPE_LCS ('1011'B)
Harald Weltec76f29f2017-11-22 12:46:46 +010030}
31
32
33/* send template fro Mobile Identity (TMSI) */
34template MobileIdentityLV ts_MI_TMSI_LV(OCT4 tmsi) := {
35 lengthIndicator := 0, /* overwritten */
36 mobileIdentityV := {
37 typeOfIdentity := '000'B, /* overwritten */
38 oddEvenInd_identity := {
39 tmsi_ptmsi := {
40 oddevenIndicator := '0'B,
41 fillerDigit := '1111'B,
42 octets := tmsi
43 }
44 }
45 }
46}
47
48private function f_enc_IMSI_L3(hexstring digits) return IMSI_L3 {
49 var IMSI_L3 l3;
50 var integer len := lengthof(digits);
51 if (len rem 2 == 1) { /* modulo remainder */
Harald Welte365f4ed2017-11-23 00:00:43 +010052 l3.oddevenIndicator := '1'B;
Harald Welteae136252018-01-24 20:53:21 +010053 l3.fillerDigit := omit;
Harald Weltec76f29f2017-11-22 12:46:46 +010054 } else {
Harald Welte365f4ed2017-11-23 00:00:43 +010055 l3.oddevenIndicator := '0'B;
Harald Welteae136252018-01-24 20:53:21 +010056 l3.fillerDigit := '1111'B;
Harald Weltec76f29f2017-11-22 12:46:46 +010057 }
58 l3.digits := digits;
59 return l3;
60}
61
Harald Welteba7b6d92018-01-23 21:32:34 +010062private function f_enc_IMEI_L3(hexstring digits) return IMEI_L3 {
63 var IMEI_L3 l3;
64 var integer len := lengthof(digits);
65 if (len rem 2 == 1) { /* modulo remainder */
66 l3.oddevenIndicator := '1'B;
67 } else {
68 l3.oddevenIndicator := '0'B;
69 }
70 l3.digits := digits;
71 return l3;
72}
73
Harald Weltec76f29f2017-11-22 12:46:46 +010074/* send template fro Mobile Identity (IMSI) */
75template (value) MobileIdentityLV ts_MI_IMSI_LV(hexstring imsi_digits) := {
76 lengthIndicator := 0, /* overwritten */
77 mobileIdentityV := {
78 typeOfIdentity := '000'B, /* overwritten */
79 oddEvenInd_identity := {
80 imsi := f_enc_IMSI_L3(imsi_digits)
81 }
82 }
83}
84
Harald Welteba7b6d92018-01-23 21:32:34 +010085/* send template fro Mobile Identity (IMEI) */
86template (value) MobileIdentityLV ts_MI_IMEI_LV(hexstring imei_digits) := {
87 lengthIndicator := 0, /* overwritten */
88 mobileIdentityV := {
89 typeOfIdentity := '000'B, /* overwritten */
90 oddEvenInd_identity := {
91 imei := f_enc_IMEI_L3(imei_digits)
92 }
93 }
94}
95
96
Harald Weltec76f29f2017-11-22 12:46:46 +010097/* Send template for Classmark 2 */
98template (value) MobileStationClassmark2_LV ts_CM2 := {
99 lengthIndicator := 0,
100 rf_PowerCapability := '000'B,
101 a5_1 := '0'B,
102 esind := '1'B,
103 revisionLevel := '10'B,
104 spare1_1 := '0'B,
Harald Welte898113b2018-01-31 18:32:21 +0100105 mobileStationClassmark2_oct4 := {
106 fc := '1'B,
107 vgcs := '0'B,
108 vbs := '0'B,
109 sm_Capability := '1'B,
110 ss_ScreenIndicator := '01'B,
111 ps_Capability := '1'B,
112 spare2_1 := '0'B
113 },
114 mobileStationClassmark2_oct5 := {
115 a5_2 := '0'B,
116 a5_3 := '1'B,
117 cmsp := '0'B,
118 solsa := '0'B,
119 ucs2 := '0'B,
120 lcsva_cap := '0'B,
121 spare5_7 :='0'B,
122 cm3 := '0'B
123 }
Harald Weltec76f29f2017-11-22 12:46:46 +0100124};
125
126/* Send template for CM SERVICE REQUEST */
Harald Welte6ed6bf92018-01-24 21:09:15 +0100127template (value) PDU_ML3_MS_NW ts_CM_SERV_REQ(CmServiceType serv_type, MobileIdentityLV mi_lv) := {
Harald Weltec76f29f2017-11-22 12:46:46 +0100128 discriminator := '0000'B, /* overwritten */
129 tiOrSkip := {
130 skipIndicator := '0000'B
131 },
132 msgs := {
133 mm := {
134 cMServiceRequest := {
135 messageType := '000000'B, /* overwritten */
136 nsd := '00'B,
Harald Welte6ed6bf92018-01-24 21:09:15 +0100137 cm_ServiceType := int2bit(enum2int(serv_type), 4),
Harald Weltec76f29f2017-11-22 12:46:46 +0100138 cipheringKeySequenceNumber := { '000'B, '0'B },
139 mobileStationClassmark2 := ts_CM2,
140 mobileIdentity := mi_lv,
141 priorityLevel := omit,
142 additionalUpdateParameterTV := omit,
143 deviceProperties := omit
144 }
145 }
146 }
147}
148
Harald Welte0195ab12018-01-24 21:50:20 +0100149template (value) CipheringKeySequenceNumberV ts_CKSN(integer key_seq) := {
150 keySequence := int2bit(key_seq, 3),
151 spare := '0'B
152}
153
154/* Send template for CM RE-ESTABLISH REQUEST */
155template (value) PDU_ML3_MS_NW ts_CM_REEST_REQ(integer cksn, MobileIdentityLV mi_lv) := {
156 discriminator := '0000'B, /* overwritten */
157 tiOrSkip := {
158 skipIndicator := '0000'B
159 },
160 msgs := {
161 mm := {
162 cMReEstablReq := {
163 messageType := '101000'B, /* overwritten */
164 nsd := '00'B,
165 cipheringKeySequenceNumber := ts_CKSN(cksn),
166 spare := '0000'B,
167 mobileStationClassmark2 := ts_CM2,
168 mobileIdentityLV := mi_lv,
169 locationAreaIdentification := omit,
170 deviceProperties := omit
171 }
172 }
173 }
174}
175
176
Harald Welte6ff81902018-01-21 19:09:08 +0100177template PDU_ML3_NW_MS tr_MT_simple(template BIT4 discr := ?) := {
178 discriminator := discr,
179 tiOrSkip := {
180 skipIndicator := '0000'B
181 },
182 msgs := ?
183}
184
185
186template PDU_ML3_NW_MS tr_CM_SERV_ACC := {
187 discriminator := '0101'B,
188 tiOrSkip := {
189 skipIndicator := '0000'B
190 },
191 msgs := {
192 mm := {
193 cMServiceAccept := {
194 messageType := '100001'B,
195 nsd := ?
196 }
197 }
198 }
199}
200
201
Harald Weltecb6cc332018-01-21 13:59:08 +0100202template PDU_ML3_NW_MS tr_CM_SERV_REJ(template OCT1 rej_cause := ?) := {
203 discriminator := '0101'B,
204 tiOrSkip := {
205 skipIndicator := '0000'B
206 },
207 msgs := {
208 mm := {
209 cMServiceReject := {
210 messageType := '100010'B,
211 nsd := ?,
212 rejectCause := rej_cause,
213 t3246_Value := *
214 }
215 }
216 }
217}
218
Harald Weltec76f29f2017-11-22 12:46:46 +0100219/* Send template for PAGING RESPONSE */
220template (value) PDU_ML3_MS_NW ts_PAG_RESP(MobileIdentityLV mi_lv) := {
221 discriminator := '0000'B, /* overwritten */
222 tiOrSkip := {
223 skipIndicator := '0000'B
224 },
225 msgs := {
226 rrm := {
227 pagingResponse := {
228 messageType := '00000000'B, /* overwritten */
229 cipheringKeySequenceNumber := { '000'B, '0'B },
230 spare1_4 := '0000'B,
231 mobileStationClassmark := ts_CM2,
232 mobileIdentity := mi_lv,
233 additionalUpdateParameters := omit
234 }
235 }
236 }
237}
238
Harald Welte15166142017-12-16 23:02:08 +0100239template (value) PDU_ML3_MS_NW ts_RRM_ModeModifyAck(ChannelDescription2_V desc, ChannelMode_V mode) := {
240 discriminator := '0000'B, /* overwritten */
241 tiOrSkip := {
242 skipIndicator := '0000'B
243 },
244 msgs := {
245 rrm := {
246 channelModeModifyAck := {
247 messageType := '00010111'B,
248 channelDescription := desc,
249 channelMode := mode,
250 extendedTSCSet := omit
251 }
252 }
253 }
254}
255
Harald Welte73cd2712017-12-17 00:44:52 +0100256template (value) PDU_ML3_MS_NW ts_RRM_CiphModeCompl := {
257 discriminator := '0000'B, /* overwritten */
258 tiOrSkip := {
259 skipIndicator := '0000'B
260 },
261 msgs := {
262 rrm := {
263 cipheringModeComplete := {
264 messageType := '00110010'B,
265 mobileEquipmentIdentity := omit
266 }
267 }
268 }
269}
270
Harald Welteecb254b2018-01-29 22:01:54 +0100271template (value) PDU_ML3_MS_NW ts_RRM_AssignmentComplete(OCT1 cause) := {
272 discriminator := '0000'B, /* overwritten */
273 tiOrSkip := {
274 skipIndicator := '0000'B
275 },
276 msgs := {
277 rrm := {
278 assignmentComplete := {
279 messageType := '00101001'B,
280 rR_Cause := {
281 valuePart := cause
282 }
283 }
284 }
285 }
286}
Harald Welte15166142017-12-16 23:02:08 +0100287
Harald Welte898113b2018-01-31 18:32:21 +0100288template (value) PDU_ML3_MS_NW ts_RRM_AssignmentFailure(OCT1 cause) := {
289 discriminator := '0000'B, /* overwritten */
290 tiOrSkip := {
291 skipIndicator := '0000'B
292 },
293 msgs := {
294 rrm := {
295 assignmentFailure := {
296 messageType := '00101111'B,
297 rR_Cause := {
298 valuePart := cause
299 }
300 }
301 }
302 }
303}
304
Harald Weltefbf9b5e2018-01-31 20:41:23 +0100305template (value) PDU_ML3_MS_NW ts_RRM_HandoverFailure(OCT1 cause) := {
306 discriminator := '0000'B, /* overwritten */
307 tiOrSkip := {
308 skipIndicator := '0000'B
309 },
310 msgs := {
311 rrm := {
312 handoverFailure := {
313 messageType := '00101000'B,
314 rRCause := {
315 valuePart := cause
316 },
317 pSCause := omit
318 }
319 }
320 }
321}
Harald Welte898113b2018-01-31 18:32:21 +0100322
323function ts_CM3_TLV(template (omit) OCTN cm3) return template MobileStationClassmark3_TLV {
324 if (not isvalue(cm3)) {
325 return omit;
326 }
327 var template MobileStationClassmark3_TLV ret := {
328 elementIdentifier := '20'O,
329 lengthIndicator := 0, /* overwritten */
330 valuePart := cm3
331 }
332 return ret;
333}
334
335template (value) PDU_ML3_MS_NW ts_RRM_CM_CHG(MobileStationClassmark2_LV cm2,
336 template (omit) MobileStationClassmark3_TLV cm3 := omit) := {
337 discriminator := '0110'B,
338 tiOrSkip := {
339 skipIndicator := '0000'B
340 },
341 msgs := {
342 rrm := {
343 classmarkChange := {
344 messageType := '00010110'B,
345 mobileStationClassmark2 := cm2,
346 mobileStationClassmark3 := cm3
347 }
348 }
349 }
350}
351
Harald Weltee3bd6582018-01-31 22:51:25 +0100352template (value) PDU_ML3_MS_NW ts_RRM_UL_REL(OCT1 cause) := {
353 discriminator := '0110'B,
354 tiOrSkip := {
355 skipIndicator := '0000'B
356 },
357 msgs := {
358 rrm := {
359 uplinkRelease := {
360 messageType := '00001110'B,
361 rR_Cause := {
362 valuePart := cause
363 }
364 }
365 }
366 }
367}
368
369template PDU_ML3_MS_NW tr_RRM_RR_STATUS(template OCT1 cause := ?) := {
370 discriminator := '0110'B,
371 tiOrSkip := {
372 skipIndicator := '0000'B
373 },
374 msgs := {
375 rrm := {
376 rR_Status := {
377 messageType := '00010010'B,
378 rR_Cause := {
379 valuePart := cause
380 }
381 }
382 }
383 }
384}
385
386
387
Harald Weltecb6cc332018-01-21 13:59:08 +0100388template PDU_ML3_MS_NW ts_ML3_MO := {
389 discriminator := '0000'B,
390 tiOrSkip := {
391 skipIndicator := '0000'B
392 },
393 msgs := ?
394}
395
396template LocationUpdatingType ts_ML3_IE_LuType := {
397 lut := ?,
398 spare1_1 := '0'B,
399 fop := '0'B
400}
401
402template LocationUpdatingType ts_ML3_IE_LuType_Normal modifies ts_ML3_IE_LuType := {
403 lut := '00'B
404}
405
406template LocationUpdatingType ts_ML3_IE_LuType_Periodic modifies ts_ML3_IE_LuType := {
407 lut := '01'B
408}
409
410template LocationUpdatingType ts_ML3_IE_LuType_Attach modifies ts_ML3_IE_LuType := {
411 lut := '10'B
412}
413
414template CipheringKeySequenceNumberV ts_ML3_IE_CKSN(integer cksn) := {
415 keySequence := int2bit(cksn, 3),
416 spare := '0'B
417}
418
419template PDU_ML3_MS_NW ts_ML3_MO_LU_Req(LocationUpdatingType lu_type, LocationAreaIdentification_V lai,
420 MobileIdentityLV mi, MobileStationClassmark1_V cm1)
421modifies ts_ML3_MO := {
422 msgs := {
423 mm := {
424 locationUpdateRequest := {
425 messageType := '001000'B,
426 nsd := '00'B, /* ? */
427 locationUpdatingType := lu_type,
428 cipheringKeySequenceNumber := ts_ML3_IE_CKSN(0),
429 locationAreaIdentification := lai,
430 mobileStationClassmark1 := cm1,
431 mobileIdentityLV := mi,
432 classmarkInformationType2_forUMTS := omit,
433 additionalUpdateParameterTV := omit,
434 deviceProperties := omit,
435 mS_NetworkFeatureSupport := omit
436 }
437 }
438 }
439}
440
Harald Welte6ff81902018-01-21 19:09:08 +0100441template PDU_ML3_MS_NW ts_ML3_MO_TmsiRealloc_Cmpl modifies ts_ML3_MO := {
442 msgs := {
443 mm := {
444 tmsiReallocComplete := {
445 messageType := '011011'B,
446 nsd := '00'B
447 }
448 }
449 }
450}
451
452template PDU_ML3_NW_MS tr_ML3_MT_LU_Acc := {
453 discriminator := '0101'B,
454 tiOrSkip := {
455 skipIndicator := '0000'B
456 },
457 msgs := {
458 mm := {
459 locationUpdateAccept := {
460 messageType := '000010'B,
461 nsd := '00'B,
462 locationAreaIdentification := ?,
463 mobileIdentityTLV := *,
464 followOnProceed := *,
465 cTS_Permission := *,
466 equivalentPLMNs := *,
467 emergencyNumberList := *,
468 perMS_T3212 := *
469 }
470 }
471 }
472}
473
474template PDU_ML3_NW_MS tr_ML3_MT_LU_Rej(template OCT1 cause := ?) := {
475 discriminator := '0101'B,
476 tiOrSkip := {
477 skipIndicator := '0000'B
478 },
479 msgs := {
480 mm := {
481 locationUpdateReject := {
482 messageType := '000100'B,
483 nsd := '00'B,
484 rejectCause := cause,
485 t3246_Value := *
486 }
487 }
488 }
489}
490
Harald Welteba7b6d92018-01-23 21:32:34 +0100491template PDU_ML3_NW_MS tr_ML3_MT_MM_ID_Req(template BIT3 id_type := ?) := {
492 discriminator := '0101'B,
493 tiOrSkip := {
494 skipIndicator := '0000'B
495 },
496 msgs := {
497 mm := {
498 identityRequest := {
499 messageType := '011000'B,
500 nsd := '00'B,
501 identityType := id_type,
502 spare1_5 := ?
503 }
504 }
505 }
506}
507
508template PDU_ML3_MS_NW ts_ML3_MO_MM_ID_Rsp(MobileIdentityLV mi) modifies ts_ML3_MO := {
509 msgs := {
510 mm := {
511 identityResponse := {
512 messageType := '011001'B,
513 nsd := '00'B,
514 mobileIdentityLV := mi,
515 p_TMSI_TypeTV := omit,
516 routingAreaIdentification2TLV := omit,
517 p_TMSISignature2TLV := omit
518 }
519 }
520 }
521}
522template PDU_ML3_MS_NW ts_ML3_MO_MM_ID_Rsp_IMSI(hexstring imsi) :=
523 ts_ML3_MO_MM_ID_Rsp(valueof(ts_MI_IMSI_LV(imsi)));
524template PDU_ML3_MS_NW ts_ML3_MO_MM_ID_Rsp_IMEI(hexstring imei) :=
525 ts_ML3_MO_MM_ID_Rsp(valueof(ts_MI_IMEI_LV(imei)));
526
527
Harald Welte45164da2018-01-24 12:51:27 +0100528template (value) MobileStationClassmark1_V ts_CM1(BIT1 a5_1_unavail := '0'B, BIT2 rev := '10'B) := {
529 rf_PowerCapability := '010'B,
530 a5_1 := a5_1_unavail,
531 esind := '1'B,
532 revisionLevel := rev,
533 spare1_1 := '0'B
534}
535
536template PDU_ML3_MS_NW ts_ML3_MO_MM_IMSI_DET_Ind(MobileIdentityLV mi,
537 template MobileStationClassmark1_V cm1 := ts_CM1)
538modifies ts_ML3_MO := {
539 msgs := {
540 mm := {
541 imsiDetachIndication := {
542 messageType := '000001'B,
543 nsd := '00'B,
544 mobileStationClassmark1 := cm1,
545 mobileIdentityLV := mi
546 }
547 }
548 }
549}
550
Harald Welted748a052018-01-22 02:59:24 +0100551template PDU_ML3_MS_NW ts_ML3_MO_CC(integer tid) := {
552 discriminator := '0011'B,
553 tiOrSkip := {
554 transactionId := {
555 tio := '000'B,
556 tiFlag := '0'B,
557 tIExtension := omit
558 }
559 }
560}
561
562template (value) CalledPartyBCD_Number ts_Called(hexstring digits) := {
563 elementIdentifier := '5E'O,
564 lengthIndicator := 0, /* overwritten */
565 numberingPlanIdentification := '0000'B,
566 typeOfNumber := '000'B, /* unknown */
567 ext1 := '0'B,
568 digits := digits
569}
570
Harald Welte812f7a42018-01-27 00:49:18 +0100571template CalledPartyBCD_Number tr_Called(template hexstring digits) := {
572 elementIdentifier := '5E'O,
573 lengthIndicator := ?,
574 numberingPlanIdentification := ?,
575 typeOfNumber := ?,
576 ext1 := ?,
577 digits := digits
578}
579
580template CallingPartyBCD_Number tr_Calling(template hexstring digits) := {
581 elementIdentifier := '5C'O,
582 lengthIndicator := ?,
583 oct3 := ?,
584 digits := digits
585}
586
Harald Welte4b2b3a62018-01-26 10:32:39 +0100587type integer SpeechVer;
588
589template (value) Speech_AuxiliarySpeech ts_SpeechAux(SpeechVer ver, BIT1 suffix) := {
590 speechVersionIndication := int2bit(ver-1,3) & suffix,
591 spare1_1 := '0'B,
592 cTM_or_Spare := '0'B,
593 coding := '0'B,
594 extension_octet_3a_3b := '0'B
595}
596
597template (value) Speech_AuxiliarySpeech ts_SpeechAuxFR(SpeechVer ver) := ts_SpeechAux(ver, '0'B);
598template (value) Speech_AuxiliarySpeech ts_SpeechAuxHR(SpeechVer ver) := ts_SpeechAux(ver, '1'B);
599
Harald Welted748a052018-01-22 02:59:24 +0100600template (value) BearerCapability_TLV ts_Bcap_voice := {
601 elementIdentifier := '04'O,
602 lengthIndicator := 0, /* overwritten */
603 octet3 := {
604 informationTransferCapability := '000'B,
605 transferMode := '0'B,
606 codingStandard := '0'B,
607 radioChannelRequirement := '11'B, /* FR preferred */
608 extension_octet_3 := '0'B, /* overwritten */
Harald Welte4b2b3a62018-01-26 10:32:39 +0100609 speech_aux_3a_3b := {
610 valueof(ts_SpeechAuxHR(3)),
611 valueof(ts_SpeechAuxFR(3)),
612 valueof(ts_SpeechAuxFR(2)),
613 valueof(ts_SpeechAuxFR(1)),
614 valueof(ts_SpeechAuxHR(1))
615 }
Harald Welted748a052018-01-22 02:59:24 +0100616 },
617 octet4 := omit,
618 octet5 := omit,
619 octet6 := omit,
620 octet7 := omit
621}
622
623template PDU_ML3_MS_NW ts_ML3_MO_CC_SETUP(integer tid, hexstring called, template BearerCapability_TLV bcap := ts_Bcap_voice) := {
624 discriminator := '0011'B,
625 tiOrSkip := {
626 transactionId := {
627 tio := int2bit(tid, 3),
628 tiFlag := '0'B,
629 tIExtension := omit
630 }
631 },
632 msgs := {
633 cc := {
634 setup_MS_NW := {
635 messageType := '000101'B,
636 nsd := '00'B,
637 bcRepeatIndicator := omit,
638 bearerCapability1 := bcap,
639 bearerCapability2 := omit,
640 facility := omit,
641 callingPartySubAddress := omit,
642 calledPartyBCD_Number := ts_Called(called),
643 calledPartySubAddress := omit,
644 llc_RepeatIndicator := omit,
645 lowLayerCompatibility1 := omit,
646 lowLayerCompatibility2 := omit,
647 hlc_RepeatIndicator := omit,
648 highLayerCompatibility1 := omit,
649 highLayerCompatibility2 := omit,
650 user_user := omit,
651 ss_VersionIndicator := omit,
652 clir_Suppression := omit,
653 clir_Invocation := omit,
654 cC_Capabilities := omit,
655 facility_ccbs1 := omit,
656 facility_ccbs2 := omit,
657 streamIdentifier := omit,
658 supportedCodecs := omit,
659 redial := omit
660 }
661 }
662 }
663}
664
Harald Welte45164da2018-01-24 12:51:27 +0100665template PDU_ML3_MS_NW ts_ML3_MO_CC_EMERG_SETUP(integer tid, template BearerCapability_TLV bcap := ts_Bcap_voice) := {
666 discriminator := '0011'B,
667 tiOrSkip := {
668 transactionId := {
669 tio := int2bit(tid, 3),
670 tiFlag := '0'B,
671 tIExtension := omit
672 }
673 },
674 msgs := {
675 cc := {
676 emergencySetup := {
677 messageType := '001110'B,
678 nsd := '00'B,
679 bearerCapability := bcap,
680 streamIdentifier := omit,
681 supportedCodecs := omit,
682 emergencyCategory := omit
683 }
684 }
685 }
686}
687
688
Harald Welted748a052018-01-22 02:59:24 +0100689template PDU_ML3_NW_MS tr_ML3_MT_CC_CALL_PROC(integer tid) := {
690 discriminator := '0011'B,
691 tiOrSkip := {
692 transactionId := {
693 tio := int2bit(tid, 3),
694 tiFlag := ?,
695 tIExtension := omit
696 }
697 },
698 msgs := {
699 cc := {
700 callProceeding := {
701 messageType := '000010'B,
702 nsd := '00'B,
703 repeatIndicator := *,
704 bearerCapability1 := *,
705 bearerCapability2 := *,
706 facility := *,
707 progressIndicator := *,
708 priorityGranted := *,
709 networkCCCapabilities := *
710 }
711 }
712 }
713}
714
715template PDU_ML3_NW_MS tr_ML3_MT_CC_ALERTING(integer tid) := {
716 discriminator := '0011'B,
717 tiOrSkip := {
718 transactionId := {
719 tio := int2bit(tid, 3),
720 tiFlag := ?,
721 tIExtension := omit
722 }
723 },
724 msgs := {
725 cc := {
726 alerting_NW_MS := {
727 messageType := '000001'B,
728 nsd := '00'B,
729 facility := *,
730 progressIndicator := *,
731 user_user := *
732 }
733 }
734 }
735}
736
Harald Welte4017d552018-01-26 21:40:05 +0100737template PDU_ML3_NW_MS tr_ML3_MT_CC_CONNECT(integer tid) := {
738 discriminator := '0011'B,
739 tiOrSkip := {
740 transactionId := {
741 tio := int2bit(tid, 3),
742 tiFlag := '1'B,
743 tIExtension := omit
744 }
745 },
746 msgs := {
747 cc := {
748 connect_NW_MS := {
749 messageType := '000111'B,
750 nsd := '00'B,
751 facility := *,
752 progressIndicator := *,
753 connectedNumber := *,
754 connectedSubAddress := *,
755 user_user := *
756 }
757 }
758 }
759}
760
761template (value) PDU_ML3_MS_NW ts_ML3_MO_CC_CONNECT_ACK(integer tid) := {
762 discriminator := '0011'B,
763 tiOrSkip := {
764 transactionId := {
765 tio := int2bit(tid, 3),
766 tiFlag := '0'B,
767 tIExtension := omit
768 }
769 },
770 msgs := {
771 cc := {
772 connectAck := {
773 messageType := '001111'B,
774 nsd := '00'B
775 }
776 }
777 }
778}
779
Harald Welte2bb825f2018-01-22 11:31:18 +0100780template PDU_ML3_NW_MS tr_ML3_MT_CC_DISC(integer tid) := {
781 discriminator := '0011'B,
782 tiOrSkip := {
783 transactionId := {
784 tio := int2bit(tid, 3),
785 tiFlag := ?,
786 tIExtension := omit
787 }
788 },
789 msgs := {
790 cc := {
791 disconnect_NW_MS := {
792 messageType := '100101'B,
793 nsd := '00'B,
794 cause := ?,
795 facility := *,
796 progressIndicator := *,
797 user_user := *,
798 allowedActions := *
799 }
800 }
801 }
802}
803
804template PDU_ML3_NW_MS tr_ML3_MT_CC_RELEASE(integer tid) := {
805 discriminator := '0011'B,
806 tiOrSkip := {
807 transactionId := {
808 tio := int2bit(tid, 3),
809 tiFlag := ?,
810 tIExtension := omit
811 }
812 },
813 msgs := {
814 cc := {
815 release_NW_MS := {
816 messageType := '101101'B,
817 nsd := '00'B,
818 cause := ?,
819 secondCause := *,
820 facility := *,
821 user_user := *
822 }
823 }
824 }
825}
Harald Welted748a052018-01-22 02:59:24 +0100826
Harald Welteb71901a2018-01-26 19:16:05 +0100827template (value) PDU_ML3_MS_NW ts_ML3_MO_CC_REL_COMPL(integer tid) := {
828 discriminator := '0011'B,
829 tiOrSkip := {
830 transactionId := {
831 tio := int2bit(tid, 3),
832 tiFlag := '0'B,
833 tIExtension := omit
834 }
835 },
836 msgs := {
837 cc := {
838 releaseComplete_MS_NW := {
839 messageType := '101010'B,
840 nsd := '00'B,
841 cause := omit,
842 facility := omit,
843 user_user := omit,
844 ss_VersionIndicator := omit
845 }
846 }
847 }
848}
849
850
Harald Welte77a8eba2018-01-22 21:22:32 +0100851template PDU_ML3_NW_MS tr_ML3_MT_MM_AUTH_REQ(template OCT16 rand := ?) := {
852 discriminator := '0101'B,
853 tiOrSkip := {
854 skipIndicator := '0000'B
855 },
856 msgs := {
857 mm := {
858 authenticationRequest := {
859 messageType := '010010'B,
860 nsd := '00'B,
861 cipheringKeySequenceNumber := ?,
862 spare2_4 := ?,
863 authenticationParRAND := rand,
864 authenticationParAUTN := *
865 }
866 }
867 }
868}
869
870template (value) PDU_ML3_MS_NW ts_ML3_MT_MM_AUTH_RESP_2G(OCT4 sres) := {
871 discriminator := '0101'B,
872 tiOrSkip := {
873 skipIndicator := '0000'B
874 },
875 msgs := {
876 mm := {
877 authenticationResponse := {
878 messageType := '010100'B,
879 nsd := '00'B,
880 authenticationParSRES := sres,
881 authenticationParSRESext := omit
882 }
883 }
884 }
885}
886
887template (value) PDU_ML3_MS_NW ts_ML3_MT_MM_AUTH_RESP_3G(OCT4 sres, octetstring res) := {
888 discriminator := '0101'B,
889 tiOrSkip := {
890 skipIndicator := '0000'B
891 },
892 msgs := {
893 mm := {
894 authenticationResponse := {
895 messageType := '010100'B,
896 nsd := '00'B,
897 authenticationParSRES := sres,
898 authenticationParSRESext := {
899 elementIdentifier := '21'O,
900 lengthIndicator := 0, /* overwritten */
901 valueField := res
902 }
903 }
904 }
905 }
906}
Harald Weltecb6cc332018-01-21 13:59:08 +0100907
Harald Welte812f7a42018-01-27 00:49:18 +0100908template PDU_ML3_MS_NW ts_ML3_MO_CC_CALL_CONF(integer tid,
909 template BearerCapability_TLV bcap := omit) := {
910 discriminator := '0011'B,
911 tiOrSkip := {
912 transactionId := {
913 tio := int2bit(tid, 3),
914 tiFlag := '1'B, /* response from destination */
915 tIExtension := omit
916 }
917 },
918 msgs := {
919 cc := {
920 callConfirmed := {
921 messageType := '001000'B,
922 nsd := '00'B,
923 repeatIndicator := omit,
924 bearerCapability1 := bcap,
925 bearerCapability2 := omit,
926 cause := omit,
927 cC_Capabilities := omit,
928 streamIdentifier := omit,
929 supportedCodecs := omit
930 }
931 }
932 }
933}
934
935
936template PDU_ML3_NW_MS tr_ML3_MT_CC_SETUP(integer tid, template hexstring called := *,
937 template hexstring calling := *,
938 template BearerCapability_TLV bcap := *) := {
939 discriminator := '0011'B,
940 tiOrSkip := {
941 transactionId := {
942 tio := int2bit(tid, 3),
943 tiFlag := '0'B, /* from originator */
944 tIExtension := omit
945 }
946 },
947 msgs := {
948 cc := {
949 setup_NW_MS := {
950 messageType := '000101'B,
951 nsd := '00'B,
952 bcRepeatIndicator := *,
953 bearerCapability1 := bcap,
954 bearerCapability2 := *,
955 facility := *,
956 progressIndicator := *,
957 signal := *,
958 callingPartyBCD_Number := tr_Calling(calling) ifpresent,
959 callingPartySubAddress := *,
960 calledPartyBCD_Number := tr_Called(called) ifpresent,
961 calledPartySubAddress := *,
962 redirectingPartyBCDNumber := *,
963 redirectingPartySubaddress := *,
964 llc_RepeatIndicator := *,
965 lowLayerCompatibility1 := *,
966 lowLayerCompatibility2 := *,
967 hlc_RepeatIndicator := *,
968 highLayerCompatibility1 := *,
969 highLayerCompatibility2 := *,
970 user_user := *,
971 priority := *,
972 alert := *,
973 networkCCCapabilities := *,
974 causeofNoCli := *,
975 backupBearerCapacity := *
976 }
977 }
978 }
979}
980
981
Harald Weltecb6cc332018-01-21 13:59:08 +0100982
Harald Weltec76f29f2017-11-22 12:46:46 +0100983}