Thanks to AppleGuy Tom for providing these codes which work on most US AT&T phones and have been tested on the iPhone. Simply type these codes as if you are calling them.
*3001#12345#* -Displays the Field Test Mode, network, cell, GPRS, call, and version information.
This picture shows the information from one of my cell towers. The Rx Level is showing the signal strength from that particular cell. Note that in Field Test Mode the signal meter in the top left corner changes from a 5 bar readout to a number. This is more accurate and can help when placing your antenna for a signal booster, for example.
*#06# -Displays the 15 digit IMEI (International Mobile Equipment Identity) in the middle of the screen. (This number is also printed on the back of the iPhone.)
This number is worth writing down. Your carrier can deactivate the phone with this number so that it will not work if ever lost or stolen, even when using another SIM card.
*#21# Displays ‘forwarding’ state (enabled or disabled) voice call, data, fax, SMS, sync data, Async data, packet access, and pad access forwarding for outgoing calls.
*#30# -Displays ‘Caller ID’ (enabled or disabled).
*#33# -Displays ‘barring’ state (enabled or disabled) voice call, data, fax, SMS, sync data, Async data, packet access, and pad access forwarding for outgoing calls.
*#43# -Displays ‘call waiting’ state (enabled or disabled) voice call, data, fax, SMS, sync data, Async data, packet access, and pad access forwarding for outgoing calls.
*#61# -Displays ‘call forwarding to voicemail’ state (enabled or disabled) [and number forwarded to] of voice call, data, fax, SMS, sync data, Async data, packet access, and pad access forwarding for outgoing calls.
To change the number of seconds before the call forwards to voicemail, retrieve your eleven digit number from *#61# then carefully type *61*numberRetrieved*11*30# -those last two digits are the seconds to ring (Default is 20; Max = 30)
*#62# -Displays ‘call forwarding when unreachable’ state (enabled or disabled) [and number forwarded to] of voice call, data, fax, SMS, sync data, Async data, packet access, and pad access forwarding for outgoing calls.
*#67# -Displays ‘call forwarding when busy’ state (enabled or disabled) [and number forwarded to] of voice call, data, fax, SMS, sync data, Async data, packet access, and pad access forwarding for outgoing calls.
*225# -Requests an SMS message displaying the current monthly balance. (if applicable)
*646# -Requests an SMS message displaying the remaining monthly minutes. (if applicable)
*777# -Requests an SMS message displaying the pre-paid account balance. (if applicable)
Some other AT&T codes currently do NOT work on the iPhone: *#4720# (voice quality reduction codec -to save battery) and *3370# (better voice quality codec)