SIM/File System

EF.SMS

How is EF.SMS encoded?

Per ETSI TS 123 040 V18.0.0 clause 9.1.2.5 we know that the address is encoded as follows:

Bit Width Description
8
Address-Length

Encoded as the number of useful semi-octets (4 bits) within the Address-Value field.

8
Type-of-Address

Encoded as follows:

Bit Width Description
1 This must always be set to 1.
3
Type-of-number

Encoded as one of the following:

  • 0b000 Unknown
  • 0b001 International number
  • 0b010 National number
  • 0b011 Network-specific number
  • 0b100 Subscriber number
  • 0b101 Alphanumeric
  • 0b110 Abbreviated number
  • 0b111 Reserved for extension

Take a look at ETSI TS 123 040 V18.0.0 clause 9.1.2.5 for a detailed explanation of all the options.

Most commonly, this will be equal to the International number option, i.e., 0b001.

4
Numbering-plan-identification

Encoded as one of the following:

  • 0b0000 Unknown
  • 0b0001 ISDN/telephone numbering plan
  • 0b0011 Data numbering plan
  • 0b0100 Telex numbering plan
  • 0b0101 Service Centre Specific plan
  • 0b0110 Service Centre Specific plan
  • 0b1000 National numbering plan
  • 0b1001 Private numbering plan
  • 0b1010 ERMES numbering plan
  • 0b1111 Reserved for extension
  • All other values are reserved.

Take a look at ETSI TS 123 040 V18.0.0 clause 9.1.2.5 for a detailed explanation of all the options.

For SMS messages stored in EF.SMS, this will always be equal to the ISDN/telephone numbering plan option, i.e., 0b0001. This is because this numbering plan must be used for any of these entities: SC (Service Centre), MSC (Mobile-services Switching Centre), SGSN (Serving GPRS Support Node), or MS (Mobile Station). In our case, the address we are representing is for a Service Centre.

Variable
Address-Value

ITU-T E.164 (11/2010) annex B describes how to encode international numbers for ISDN, i.e., the case for EF.SMS.