A dialer code is a sequence of characters that performs a pre-defined action when entered in the phone's dialer (the keypad). The sequence consists of digits delimited and enclosed by asterisk (*) and hash (#) characters. Follow the 'info' link below for more details.
Dialer codes represent a type of MMI—Man-Machine-Interface. Unsurprisingly, they are a way for the man to interact with the machine! This is more of a historical term though. In 21-th century computing, this is more commonly referred to as the UI—User-Interface, which itself can be sub-divided into two main categories: CLI—Command-Line-Interface, and GUI—Graphical-User-Interface.
"Dialer codes" are technically defined as "MMI" codes (see ETSI standard 3GPP TS 22.030). MMI codes fall into the CLI category, with the main difference from CLI commands in that MMI codes consist of digits instead of keywords, delimited and enclosed by a given combination of asterisk (
*) and hash (
#) characters. Some of these digit and character combinations are standardized and some are not.
MMI codes can be divided into four main categories.
These are the control codes that operate on the Subscriber Identity Module. For example, the sequence
**04*1234*6789*6789# will change the PIN code from 1234 to 6789. The man (user) needs to press a dedicated key to send the code. Otherwise, no change will be made. This key is usually the dial key. This is equivalent to pressing the Enter keyboard key at a CLI to execute a command.
These are the Supplementary Service codes and they are built into every GSM/UMTS/LTE device and cannot be changed by the network operator. They are used to control, for example, call forwarding or number presentation. The sequence
*21*123456789# would instruct the phone to ask the network to forward all your incoming calls to the number 123456789. But this code is not sent directly to the network. Instead, it is parsed by the phone which then constructs an ASN.1 (Abstract Syntax Notation One) coded request to the network.
These structured requests are what's being sent to the network operator when you use the GUI of your phone to access the phone settings and make network related changes, such as call forwarding or hide your phone number. These settings are not local to the phone, even though it may appear that way to the user. But this is an abstraction. So you actually have two ways to make such changes. One is using the SS codes directly on the keypad. The second is the GUI approach.
These are "Unstructured Supplementary Service Data" codes and they operate on the network as well. But they are slightly different from SS codes. Namely in that they are "unstructured". If you enter a code that ends with a hash character and it is not recognized by the MMI parser, then the code will be sent to the network as-is. It then depends on the network if this code is supported. One of the most used cases is a code for pre-paid cards to check your balance. Many networks use something like
*#100#. But it is really the choice of the network operator which code to use as long as it is not already taken.
*21*1234# would do two completely different things: the first code would be sent as-is to the network for further processing (most likely returning an error), while the second code would be parsed by the phone and a structured request for activation of call forwarding would be sent to the network.
If your first mobile phone was a GSM phone, then you may remember that network operators in those days had long lists of both SS and USSD codes for their customers to use in order to make certain changes to their service. The world has changed since those days. A lot! But the codes live on even today, although they have been dressed up into GUI menu options and network operators are now more reluctant to publish any sort of extensive lists of available SS or USSD codes on their network. Technically, I should say USSD, not SS. Because SS codes are common and known already. It's the USSD codes that differ from one operator and country to another. But if you have read this far, you hopefully understand this distinction already.
This is the category that "dialer codes" usually refers to when phone hackers, enthusiasts, geeks, nerds and clueless journalists talk about dialer codes, and "dialer code" related exploits. As explained above, there is much more to these codes (than what hits the press).
These codes are specific to a phone manufacturer and phone model. They are built in by the manufacturer to, for example, activate service menus or reset the device. Since these codes are not being sent to the network, the user does not have to press the magic key at the end. They are executed as soon as the last digit or character has been entered, and that character is usually the hash character. The code
*#06# is mandatory for all manufacturers of GSM/UMTS/LTE phones to implement. It shows the devices IMEI (Internatiol Mobile Equipment Identifier).
Beyond that mandatory code, many manufacturers add many more additional codes that are used to invoke hardware tests, to run debug routines, to show hidden system information or enable service menus intended for use by the manufacturer's service personnel.
These "dialer codes" are sometimes referred to as "secret codes". But if you want to reveal the secret, you need to understand what to look for. There is nothing secretive about the SIM control codes or the SS codes. The USSD codes are really no state secrets either. It's just painfully inconvenient that they differ by operator and country, and that operators don't make it easy on us anymore by publishing printed lists of codes to use.