All cell phones have special codes associated with them. There is a phone numbers allocated to each cell phone user. In India these numbers have 9 as their first digit. Then there are other code numbers that are used to identify the phone, the phone's owner and the service provider.
SID (System Identification Code) is a unique 5-digit number that is assigned to each cell phone company by the government. When a cell phone is switched on, it listens for an SID on the control channel. The control channel is a special frequency that the phone and base station use to talk to one another. If the phone cannot find any control channels to listen to, it knows it is out of range and displays a "no service" message. When it receives the SID, the phone compares it to the SID programmed into the phone. If the SIDs match, the phone knows that the cell it is communicating with is part of its parent company.
Electronic Serial Number (ESN) is a unique 32-bit number programmed into the phone when it is manufactured