Newer
Older
garciay
committed
/******************************************************************************/
// $Date: 2009-11-25 18:40:50 +0100 (Mi, 25 Nov 2009) $
// $Author: STF160 $
// $Rev: 2184 $
/******************************************************************************/
/*
* This module contains the type definitions for SMS messages as specified in
* 3GPP 24.011 and 3GPP 23.040 Rel 8 and 9.
* SMS over IMS is specified in 3GPP 24.341.
* This module is part of LibSipV2.
garciay
committed
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
*/
module LibSip_SMSTypesAndValues {
import from LibCommon_DataStrings all;
group SMS_Declarations {
const RP_MessageTypeIndicator_Type tsc_MT_RP_DATA_ul := '000'B; /* RP_DATA_ul */
const RP_MessageTypeIndicator_Type tsc_MT_RP_DATA_dl := '001'B; /* RP_DATA_dl */
const RP_MessageTypeIndicator_Type tsc_MT_RP_ACK_ul := '010'B; /* RP_ACK_ul */
const RP_MessageTypeIndicator_Type tsc_MT_RP_ACK_dl := '011'B; /* RP_ACK_dl */
const RP_MessageTypeIndicator_Type tsc_MT_RP_ERROR_ul := '100'B; /* RP_ERROR_ul */
const RP_MessageTypeIndicator_Type tsc_MT_RP_ERROR_dl := '101'B; /* RP_ERROR_dl */
const RP_MessageTypeIndicator_Type tsc_MT_RP_SMMA := '110'B; /* RP_SMMA */
const TP_MessageTypeIndicator_Type tsc_MT_SMS_DELIVER := '00'B; /* SMS DELIVER */
const TP_MessageTypeIndicator_Type tsc_MT_SMS_DELIVER_REPORT := '00'B; /* SMS DELIVER REPORT */
const TP_MessageTypeIndicator_Type tsc_MT_SMS_STATUS_REPORT := '10'B; /* SMS STATUS REPORT */
const TP_MessageTypeIndicator_Type tsc_MT_SMS_COMMAND := '10'B; /* SMS COMMAND */
const TP_MessageTypeIndicator_Type tsc_MT_SMS_SUBMIT := '01'B; /* SMS SUBMIT, SMS SUBMIT REPORT */
const TP_MessageTypeIndicator_Type tsc_MT_SMS_SUBMIT_REPORT := '01'B; /* SMS SUBMIT, SMS SUBMIT REPORT */
const Bit7 tsc_IEI_RP_UserData := '1000001'B; /* 24.011 cl. 8.2.5.3 */
const charstring tsc_Fox := "The quick brown fox jumps over the lazy dog's back. Kaufen Sie Ihrer Frau vier bequeme Pelze. - 0123456789 - THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG'S BACK.";
type record TypeOfNumberingPlan { /* 24.008 cl. 10.5.4.7, 10.5.4.9, 10.5.4.13 */
Bit1 extBit, /* Extension Bit */
Bit3 typeOfNumber, /* Type Of Number */
Bit4 numberingPlanId /* Numbering Plan Identification */
};
/* SM-RP Type Declarations */
type Bit3 RP_MessageTypeIndicator_Type; /* 24.011 cl. 8.2.2 */
type Oct1 RP_MessageReference_Type; /* 24.011 cl. 8.2.3 */
type record RP_OriginatorAddress_dl { /* 24.011 cl. 8.2.5.1 */
Bit1 spare optional, /* 0 */
Bit7 iei optional, /* 0101 1110 */
Oct1 iel, /* min value 2 and max value is 11 */
TypeOfNumberingPlan typeOfNumberingPlan, /* */
octetstring digits length(1..10)
};
type record RP_OriginatorAddress_ul { /* 24.011 cl. 8.2.5.1 */
Bit1 spare optional, /* 0 */
Bit7 iei optional, /* 0101 1110 */
Oct1 iel /* 0 */
};
type record RP_DestinationAddress_ul { /* 24.011 cl. 8.2.5.2 */
Bit1 spare optional, /* 0 */
Bit7 iei optional, /* 0101 1110 */
Oct1 iel, /* min value 2 and max value is 11 */
TypeOfNumberingPlan typeOfNumberingPlan, /* */
octetstring digits length(1..10)
};
type record RP_DestinationAddress_dl { /* 24.011 cl. 8.2.5.2 */
Bit1 spare optional, /* 0 */
Bit7 iei optional, /* 0101 1110 */
Oct1 iel /* 0 */
};
type record RP_UserData { /* 24.011 cl. 8.2.5.3 */
Bit1 spare optional, /* 0, present in case of TLV; omit in case of LV */
Bit7 iei optional, /* 1000001, present in case of TLV; omit in case of LV */
Oct1 iel, /* */
TP_PDU_Type tP_PDU /* <= 232 octets */
};
type record RP_Cause { /* 24.011 cl. 8.2.5.4 */
Bit1 spare optional, /* present in case of TLV; omit in case of LV */
Bit7 iei optional, /* present in case of TLV; omit in case of LV */
Oct1 iel, /* 2 or 3 */
Bit1 extBit1, /* 0 */
Bit7 causeValue1, /* Table 8.4/3GPP TS 24.011 */
Bit1 extBit2, /* 0 */
Bit7 causeValue2, /* Table 8.4/3GPP TS 24.011 */
Oct1 diagnostic optional /* Parameters included in the return error from MAP */
};
/* End SM-RP Type Declarations */
/* SM-RP PDU Declarations */
type record RP_DATA_dl_Type { /* 24.011 cl. 7.3.1.1
Direction: n -> ue */
Bit5 spare5, /* cl. 8.2.2 M V 5 bits */
RP_MessageTypeIndicator_Type rP_MessageTypeIndicator, /* cl. 8.2.2 M V 3 bits */
RP_MessageReference_Type rP_MessageReference, /* cl. 8.2.3 M LV 1 */
RP_OriginatorAddress_dl rP_OriginatorAddress, /* cl. 8.2.5.1 M LV 1-12 octets */
RP_DestinationAddress_dl rP_DestinationAddress, /* cl. 8.2.5.2 M LV 1 */
RP_UserData rP_UserData /* cl. 8.2.5.3 M LV <= 233 octets */
};
type record RP_DATA_ul_Type { /* 24.011 cl. 7.3.1.2
Direction: ue -> n */
Bit5 spare5, /* cl. 8.2.2 M V 5 bits */
RP_MessageTypeIndicator_Type rP_MessageTypeIndicator, /* cl. 8.2.2 M V 3 bits */
RP_MessageReference_Type rP_MessageReference, /* cl. 8.2.3 M LV 1 */
RP_OriginatorAddress_ul rP_OriginatorAddress, /* cl. 8.2.5.1 M LV 1 */
RP_DestinationAddress_ul rP_DestinationAddress, /* cl. 8.2.5.2 M LV 1 */
RP_UserData rP_UserData /* cl. 8.2.5.3 M LV <= 233 octets */
};
type record RP_SMMA_Type { /* 24.011 cl. 7.3.2
Direction: ue -> n */
Bit5 spare5, /* cl. 8.2.2 M V 5 bits */
RP_MessageTypeIndicator_Type rP_MessageTypeIndicator, /* cl. 8.2.2 M V 3 bits */
RP_MessageReference_Type rP_MessageReference /* cl. 8.2.3 M LV 1 */
};
type record RP_ACK_Type { /* 24.011 cl. 7.3.3
Direction: ue <-> n */
Bit5 spare5, /* cl. 8.2.2 M V 5 bits */
RP_MessageTypeIndicator_Type rP_MessageTypeIndicator, /* cl. 8.2.2 M V 3 bits */
RP_MessageReference_Type rP_MessageReference, /* cl. 8.2.3 M LV 1 */
RP_UserData rP_UserData optional /* cl. 8.2.5.3 O TLV <= 234 octets */
};
type record RP_ERROR_Type { /* 24.011 cl. 7.3.4
Direction: ue <-> n */
Bit5 spare5, /* cl. 8.2.2 M V 5 bits */
RP_MessageTypeIndicator_Type rP_MessageTypeIndicator, /* cl. 8.2.2 M V 3 bits */
RP_MessageReference_Type rP_MessageReference, /* cl. 8.2.3 M LV 1 */
RP_Cause rP_Cause, /* cl. 8.2.5.4 M LV 2-3 */
RP_UserData rP_UserData optional /* cl. 8.2.5.3 O TLV <= 234 octets */
};
type union RP_PDU_Type {
RP_DATA_dl_Type RP_DATA_dl,
RP_DATA_ul_Type RP_DATA_ul,
RP_SMMA_Type RP_SMMA,
RP_ACK_Type RP_ACK,
RP_ERROR_Type RP_ERROR
};
/* End SM-RP PDU Declarations */
/* SM-TP Type Declarations */
type record TP_Address_Type { /* 23.040 cl. 9.1.2.5 */
Oct1 iel, /* min value 2 and max value is 11 */
TypeOfNumberingPlan typeOfNumberingPlan,
octetstring digits length(0..10) optional
};
type Bit2 TP_MessageTypeIndicator_Type; /* 23.040 cl. 9.2.3.1 */
type Oct1 TP_MessageReference_Type; /* 23.040 cl. 9.2.3.6 */
type Oct1 TP_UserDataLength_Type; /* 23.040 cl. 9.2.3.16 */
type record TP_ProtocolIdentifier_Type { /* 23.040 cl. 9.2.3.9 */
Bit2 pidType, /* */
Bit1 interworking, /* */
Bit5 pidValue /* */
};
type record TP_DataCodingScheme_Type { /* 23.040 cl. 9.2.3.10 + 23.040 cl. 4 */
Bit4 codingGroup, /* */
Bit4 codeValue /* */
};
type hexstring TP_ServiceCentreTimeStamp_Type length (14); /* 23.040 cl. 9.2.3.11 */
type Oct1 TP_ValidityPeriodRelative_Type; /* 23.040 cl. 9.2.3.12.1 */
type hexstring TP_ValidityPeriodAbsolute_Type length (14); /* 23.040 cl. 9.2.3.12.2 */
type record TP_ValidityPeriodEnhanced_Type { /* 23.040 cl. 9.2.3.12.3 */
Bit1 extBit, /* */
Bit1 singleShot, /* */
Bit3 spare3, /* */
Bit3 validityPeriodFormat, /* */
Oct6 validityPeriod /* */
};
type union TP_ValidityPeriod_Type { /* 23.040 cl. 9.2.3.3 */
TP_ValidityPeriodRelative_Type TP_ValidityPeriodRelative, /* Relative format */
TP_ValidityPeriodAbsolute_Type TP_ValidityPeriodAbsolute, /* Absolute format */
TP_ValidityPeriodEnhanced_Type TP_ValidityPeriodEnhanced /* Enhanced format */
};
type record TP_Status_Type { /* 23.040 cl. 9.2.3.15 */
Bit1 reserved, /* */
Bit7 status /* */
};
type Bit8 TP_Command_Type; /* 23.040 cl. 9.2.3.19 */
type record TP_ParameterIndicator_Type { /* 23.040 cl. 9.2.3.27 */
Bit1 extBit1, /* */
Bit4 spare4, /* */
Bit1 tP_UDL, /* */
Bit1 tP_DCS, /* */
Bit1 tP_PID /* */
};
/* End SM-TP Type Declarations */
/* SM-TP PDU Declarations */
type record SMS_DELIVER_Type { /* 23.040 cl. 9.2.2.1
Direction: n -> ue */
Bit1 tP_ReplyPath, /* 23.040 cl. 9.2.3.17 */
Bit1 tP_UserDataHeaderIndicator, /* 23.040 cl. 9.2.3.23 */
Bit1 tP_StatusReportIndication, /* 23.040 cl. 9.2.3.4 */
Bit2 spare2, /* */
Bit1 tP_MoreMessagesToSend, /* 23.040 cl. 9.2.3.2 */
TP_MessageTypeIndicator_Type tP_MessageTypeIndicator, /* 23.040 cl. 9.2.3.1 */
TP_Address_Type tP_OriginatingAddress, /* 23.040 cl. 9.1.2.5 */
TP_ProtocolIdentifier_Type tP_ProtocolIdentifier, /* 23.040 cl. 9.2.3.9 */
TP_DataCodingScheme_Type tP_DataCodingScheme_Type, /* 23.040 cl. 9.2.3.10 */
TP_ServiceCentreTimeStamp_Type tP_ServiceCentreTimeStamp, /* 23.040 cl. 9.2.3.11 */
TP_UserDataLength_Type tP_UserDataLength, /* 23.040 cl. 9.2.3.16, derived from SUBMIT */
octetstring tP_UserData length (0..140) optional /* 23.040 cl. 9.2.3.24, derived from SUBMIT */
};
type record SMS_DELIVER_REPORT_Type { /* 23.040 cl. 9.2.2.1a
Direction: ue -> n */
Bit1 spare1, /* */
Bit1 tP_UserDataHeaderIndicator, /* 23.040 cl. 9.2.3.23 */
Bit4 spare4, /* */
TP_MessageTypeIndicator_Type tP_MessageTypeIndicator, /* 23.040 cl. 9.2.3.1 */
Oct1 tP_FailureCause optional, /* 23.040 cl. 9.2.3.22, provided if RP_ERROR, not if RP_ACK */
TP_ParameterIndicator_Type tP_ParameterIndicator, /* 23.040 cl. 9.2.3.27 */
TP_ProtocolIdentifier_Type tP_ProtocolIdentifier optional, /* 23.040 cl. 9.2.3.9 */
TP_DataCodingScheme_Type tP_DataCodingScheme_Type optional, /* 23.040 cl. 9.2.3.10 */
TP_UserDataLength_Type tP_UserDataLength optional, /* 23.040 cl. 9.2.3.16 */
octetstring tP_UserData length (0..159) optional /* 23.040 cl. 9.2.3.24 */
};
type record SMS_SUBMIT_Type { /* 23.040 cl. 9.2.2.2
Direction: ue -> n */
Bit1 tP_ReplyPath, /* 23.040 cl. 9.2.3.17 */
Bit1 tP_UserDataHeaderIndicator, /* 23.040 cl. 9.2.3.23 */
Bit1 tP_StatusReportRequest, /* 23.040 cl. 9.2.3.5 */
Bit2 tP_ValidityPeriodFormat, /* 23.040 cl. 9.2.3.3 */
Bit1 tP_RejectDuplicates, /* 23.040 cl. 9.2.3.25 */
TP_MessageTypeIndicator_Type tP_MessageTypeIndicator, /* 23.040 cl. 9.2.3.1 */
TP_MessageReference_Type tP_MessageReference, /* 23.040 cl. 9.2.3.6 */
TP_Address_Type tP_DestinationAddress, /* 23.040 cl. 9.1.2.5 */
TP_ProtocolIdentifier_Type tP_ProtocolIdentifier, /* 23.040 cl. 9.2.3.9 */
TP_DataCodingScheme_Type tP_DataCodingScheme_Type, /* 23.040 cl. 9.2.3.10 */
// one of the subsequent ValidityPeriod solutions has be removed
TP_ValidityPeriod_Type tP_ValidityPeriod optional, /* 23.040 cl. 9.2.3.12 */
// TP_ValidityPeriodRelative_Type tP_ValidityPeriodRelative optional, /* 23.040 cl. 9.2.3.12.1 */
// TP_ValidityPeriodAbsolute_Type tP_ValidityPeriodAbsolute optional, /* 23.040 cl. 9.2.3.12.2 */
// TP_ValidityPeriodEnhanced_Type tP_ValidityPeriodEnhanced optional, /* 23.040 cl. 9.2.3.12.3 */
TP_UserDataLength_Type tP_UserDataLength, /* 23.040 cl. 9.2.3.16 */
octetstring tP_UserData length (0..140) optional /* 23.040 cl. 9.2.3.24 */
};
type record SMS_SUBMIT_REPORT_Type { /* 23.040 cl. 9.2.2.2a
Direction: n -> ue */
Bit1 spare1, /* */
Bit1 tP_UserDataHeaderIndicator, /* 23.040 cl. 9.2.3.23 */
Bit4 spare4, /* */
TP_MessageTypeIndicator_Type tP_MessageTypeIndicator, /* 23.040 cl. 9.2.3.1 */
Oct1 tP_FailureCause optional, /* 23.040 cl. 9.2.3.22, provided if RP_ERROR, not if RP_ACK */
TP_ParameterIndicator_Type tP_ParameterIndicator, /* 23.040 cl. 9.2.3.27 */
TP_ServiceCentreTimeStamp_Type tP_ServiceCentreTimeStamp, /* 23.040 cl. 9.2.3.11 */
TP_ProtocolIdentifier_Type tP_ProtocolIdentifier optional, /* 23.040 cl. 9.2.3.9 */
TP_DataCodingScheme_Type tP_DataCodingScheme_Type optional, /* 23.040 cl. 9.2.3.10 */
TP_UserDataLength_Type tP_UserDataLength optional, /* 23.040 cl. 9.2.3.16 */
octetstring tP_UserData length (0..152) optional /* 23.040 cl. 9.2.3.24 */
};
type record SMS_STATUS_REPORT_Type { /* 23.040 cl. 9.2.2.3
Direction: n -> ue */
Bit1 spare1, /* */
Bit1 tP_UserDataHeaderIndicator, /* 23.040 cl. 9.2.3.23 */
Bit1 tP_StatusReportQualifier, /* 23.040 cl. 9.2.3.26 */
Bit2 spare2, /* */
Bit1 tP_MoreMessagesToSend, /* 23.040 cl. 9.2.3.2 */
TP_MessageTypeIndicator_Type tP_MessageTypeIndicator, /* 23.040 cl. 9.2.3.1 */
TP_MessageReference_Type tP_MessageReference, /* 23.040 cl. 9.2.3.6 */
TP_Address_Type tP_RecipientAddress, /* 23.040 cl. 9.1.2.5 */
TP_ServiceCentreTimeStamp_Type tP_ServiceCentreTimeStamp, /* 23.040 cl. 9.2.3.11 */
TP_ServiceCentreTimeStamp_Type tP_DischargeTime, /* 23.040 cl. 9.2.3.12 */
TP_Status_Type tP_Status, /* 23.040 cl. 9.2.3.15 */
TP_ParameterIndicator_Type tP_ParameterIndicator optional, /* 23.040 cl. 9.2.3.27 */
TP_ProtocolIdentifier_Type tP_ProtocolIdentifier optional, /* 23.040 cl. 9.2.3.9 */
TP_DataCodingScheme_Type tP_DataCodingScheme_Type optional, /* 23.040 cl. 9.2.3.10 */
TP_UserDataLength_Type tP_UserDataLength optional, /* 23.040 cl. 9.2.3.16 */
octetstring tP_UserData length (0..143) optional /* 23.040 cl. 9.2.3.24 */
};
type record SMS_COMMAND_Type { /* 23.040 cl. 9.2.2.4
Direction: ue -> n */
Bit1 spare1, /* */
Bit1 tP_UserDataHeaderIndicator, /* 23.040 cl. 9.2.3.23 */
Bit1 tP_StatRptReq, /* Table 8.4/3GPP TS 24.011 */
Bit3 spare3, /* */
TP_MessageTypeIndicator_Type tP_MessageTypeIndicator, /* 23.040 cl. 9.2.3.1 */
TP_MessageReference_Type tP_MessageReference, /* 23.040 cl. 9.2.3.6 */
TP_ProtocolIdentifier_Type tP_ProtocolIdentifier, /* 23.040 cl. 9.2.3.9 */
TP_Command_Type tP_CommandType, /* 23.040 cl. 9.2.3.19 */
TP_MessageReference_Type tP_MessageNumber, /* 23.040 cl. 9.2.3.18 */
TP_Address_Type tP_DestinationAddress, /* 23.040 cl. 9.1.2.5 */
TP_UserDataLength_Type tP_CommandDataLength, /* 23.040 cl. 9.2.3.20 (number of octets) */
octetstring tP_CommandData length (0..156) optional /* 23.040 cl. 9.2.3.21 */
};
type union TP_PDU_Type {
SMS_DELIVER_Type SMS_DELIVER,
SMS_DELIVER_REPORT_Type SMS_DELIVER_REPORT,
SMS_SUBMIT_Type SMS_SUBMIT,
SMS_SUBMIT_REPORT_Type SMS_SUBMIT_REPORT,
SMS_STATUS_REPORT_Type SMS_STATUS_REPORT,
SMS_COMMAND_Type SMS_COMMAND
};
/* End SM-TP PDU Declarations */
} with { encode "SMS Types"} // group SMS_Declarations
} // End of module LibSip_SMSTypesAndValues