thumb|150px|USSD on a [[Sony Ericsson mobile phone (2005)]]

Unstructured Supplementary Service Data (USSD), sometimes referred to as "quick codes" or "feature codes", is a communications protocol used by GSM cellular telephones to communicate with the mobile network operator's computers. USSD can be used for WAP browsing, prepaid callback service, mobile-money services, location-based content services, menu-based information services, and as part of configuring the phone on the network. The service does not require a messaging app, and does not incur charges.

USSD messages are up to 182 alphanumeric characters long. Unlike short message service (SMS) messages, USSD messages create a real-time connection during a USSD session. The connection remains open, allowing a two-way exchange of a sequence of data. This makes USSD faster than services that use SMS. Between 2012 and 2018, the Wikipedia Zero project provided access to Wikipedia articles via USSD.

USSD is sometimes used in conjunction with SMS. The user sends a request to the network via USSD, and the network replies with an acknowledgement of receipt:

:"Thank you, your message is being processed. A message will be sent to your phone."

Subsequently, one or more mobile terminated SMS messages communicate the status and/or results of the initial request. In such cases, SMS is used to "push" a reply or updates to the handset when the network is ready to send them. In contrast, USSD is used for command-and-control only.

Technical details

Most GSM phones have USSD capability. USSD is generally associated with real-time or instant messaging services. An SMSC is not present in the processing path, so that the store-and-forward capability supported by other short-message protocols such as SMS is not available.

USSD Phase 1, as specified in GSM 02.90, only supports mobile-initiated ("pull") operations. In the core network, the message is delivered over MAP, USSD Phase 2, as specified in GSM 03.90. After entering a USSD code on a GSM handset, the reply from the GSM operator is displayed within a few seconds.

While GSM is being phased out in the 2020s with 2G and 3G, a solution is available for supporting USSD services directly from the LTE/5G/IMS network, providing a similar user experience as in GSM.

Format

A USSD message typically starts with an asterisk symbol (*) or a hash symbol (#) and is terminated with a hash symbol (#). A typical message comprises digits for commands or data; groups of digits may be separated by additional asterisks.

BS is the type of bearer service, some valid values are:

  • 11 for voice
  • 13 for fax
  • 16 for SMS (only valid for barring)
  • 25 for data
  • <leave blank> for all.

T is number of seconds for the No Reply Condition Timer, default is 20 seconds if not specified.

{| Class = "wikitable sortable"

|+ GSM USSD codes and their functions with various network operators

! Code !! Function !! Note !! Switch on !! Switch off !! Display status

|-

| 002

| all diversions

| unconditional, busy, unreachable, does not answer

| * * 002 * number * BS * T #

| # # 002 * * BS #

| * # 002 * * BS #

|-

| 004

| all conditional redirections

| busy, unreachable, does not answer

| * * 004 * number * BS * T #

| # # 004 * * BS #

| * # 004 * * BS #

|-

| 03

| Change Network password

| password is network dependent, default on some networks is 0000. See call barring functions *33

| colspan = "3"| * * 03 * 330 * old password * new password * new password #

|-

| 04

| Change PIN

|

| colspan = "3"| * * 04 * old PIN * new PIN * new PIN #

|-

| 042

| Change PIN2

| Only with Phase 2 SIM

| colspan = "3"| * * 042 * old PIN2 * new PIN2 * new PIN2 #

|-

| 05

| Change PIN by PUK

|

| colspan="3"| * * 05 * PUK * new PIN * new PIN #

|-

| 052

| Change PIN2 via PUK

| Only with Phase 2 SIM

| colspan = "3"| * * 052 * PUK * new PIN2 * new PIN2 #

|-

| 06

| read device number (IMEI)

|

| colspan = "3"| * # 06 #

|-

| 21

| unconditional divert

| all incoming calls will be diverted

| * * 21 * number * BS #

| # # 21 * * BS #

| * # 21 * * BS #

|-

| 30

| get the caller's number displayed (CLIP)

| as a callee get the CLIP displayed

| * 30 #

| # 30 #

| * # 30 #

|-

| 31

| suppressing the transmission of caller's phone number (CLIR)

| for all subsequent calls

| # 31 #

| * 31 #

| * # 31 #

|-

| 31

| temporary change of the transmission of CLIR

| valid just for the next call; no final #

| # 31 # number

| * 31 # number

|

|-

| 330

| total incoming and outgoing service barring

| password is network dependent, default on some networks is 0000

| * 330 * password * BS #

| # 330 * password * BS #

| * # 330 * * BS #

|-

| 33

| outgoing call barring

| password is network dependent, default on some networks is 0000

| * 33 * password * BS #

| # 33 * password * BS #

| * # 33 * * BS #

|-

| 331

| outgoing international call barring

| password is network dependent, default on some networks is 0000

| * 331 * password * BS #

| # 331 * password * BS #

| * # 331 * * BS #

|-

| 332

| outgoing international call barring, excluding to home

| password is network dependent, default on some networks is 0000

| * 332 * password * BS #

| # 332 * password * BS #

| * # 332 * * BS #

|-

| 333

| total outgoing service barring

| password is network dependent, default on some networks is 0000

| * 333 * password * BS #

| # 333 * password * BS #

| * # 333 * * BS #

|-

| 35

| incoming call barring

| password is network dependent, default on some networks is 0000. Incompatible with call diversion

| * 35 * password * BS #

| # 35 * password * BS #

| * # 35 * * BS #

|-

| 351

| incoming call barring, when international roaming

| password is network dependent, default on some networks is 0000

| * 351 * password * BS #

| # 351 * password * BS #

| * # 351 * * BS #

|-

| 353

| total incoming service barring

| password is network dependent, default on some networks is 0000

| * 353 * password * BS #

| # 353 * password * BS #

| * # 353 * * BS #

|-

| 37

| Call back on busy (CCBS)

| valid on some mobile networks only

| * 37 #

| # 37 #

| * # 37 #

|-

| 43

| incoming call notification when busy

| aka call waiting

| * 43 * BS #

| # 43 * BS #

| * # 43 * * BS #

|-

| 61

| call divert when not answered

|

| * * 61 * number * BS * T #

| # # 61 * * BS #

| * # 61 * * BS #

|-

| 62

| call divert when off or not reachable

|

| * * 62 * number * BS #

| # # 62 * * BS #

| * # 62 * * BS #

|-

| 67

| call divert when busy or pressing reject

|

| * * 67 * number * BS #

| # # 67 * * BS #

| * # 67 * * BS #

|-

! Code !! Function !! Note !! Switch on !! Switch off !! Display status

|}

See also

  • USSD Gateway
  • Ultra Mobile Broadband
  • Supplementary service codes
  • SIM Application Toolkit

References

  • GSM 04.90 (ETSI EN 300 957, V7.0.1) Specification (USSD) Stage 3 – 3GPP
  • 3GPP TS 22.030
  • What’s the difference between USSD, MMI and SS codes?
  • Android USSD codes list (MMI code list)