Friday, April 24, 2009

Mobile Operators/Carriers list from Wikipedia as SQL inserts

Update: You might want to consider a checking this newer post about mobile operators/carriers.

This passed year showed a big change in the mobile world. The cell phone is no longer only a way of communication. It is a fully portable operating system used also as digital camera, camcorder, GPS, radio, mail , music player, video player, television, gaming machine and much more. It took the cell phone producing companies quite some time to catch up with the iPhone, but they finally did it. New Smart phones are emerging all the time, and the time is not far that we will all be using them.
The growth of smart phones market will make a great donation to the mobile advertising world. More and more advertising money will start moving to this direction as usage increases. The great enhancement of the browsing experience on smart phones makes it a great place for advertising. The growing use of rich mobile applications like YouTube and Facebook is also a great potential for advertising. Long existing mobile features that never really took off like mobile television is also starting to become more realistic with the passed few years network speed upgrades and the growing size of the mobile displays. This is another medium that can be exploited for dynamic targeted advertising.
Well, this long opening was really just a preparation for actually a short blog (I do have to write something… ;-). This whole promising future of the mobile world on the next few years (this is only my assumption don’t take my word for it…) will bring many companies to the game. All these companies in some way or another will need to deal with advertising content on mobile operator/carrier level. I spent quite some time on compiling a complete worldwide SQL insert list of mobile operators. This list may come in handy to some of you. The list is constructed from the following columns:
  • country_code: Country code in ISO 3116-1 alpha-2 (2 letter) standard.
  • operator: Mobile operator/carrier name.
  • brand: Mobile operator brand.
You would probably want to add to this list your own columns containing some extra information as well as a decent primary key.
This list is a based on the Wikipedia page: Mobile Network Code. It is simply a processed and refined version with country code values added. This list is a good start, but will probably be to maintained and updated from time to time.
CREATE TABLE `mobile_operator` (
`country_code` char(2) NOT NULL,
`operator` varchar(100) NOT NULL,
`brand` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `mobile_operator` (`country_code`, `operator`, `brand`) VALUES
('AF', 'Afghan Wireless Communication Company', 'AWCC'),
('AF', 'Telecom Development Company Afghanistan Ltd.', 'Roshan'),
('AF', 'MTN Afghanistan', 'Areeba'),
('AF', 'Etisalat Afghanistan', 'Etisalat'),
('AL', 'Albanian Mobile Communications', 'AMC'),
('AL', 'Vodafone Albania', 'Vodafone'),
('AL', 'Eagle Mobile', 'Eagle Mobile'),
('DZ', 'ATM Mobilis', 'Mobilis'),
('DZ', 'Orascom Telecom Algerie Spa', 'Djezzy'),
('DZ', 'Wataniya Telecom Algerie', 'Nedjma'),
('AD', 'Servei De Tele. DAndorra', 'Mobiland'),
('AO', 'UNITEL S.a.r.l.', 'UNITEL'),
('AI', 'Weblinks Limited', ''),
('AG', 'Antigua Public Utilities Authority', 'APUA'),
('AG', 'Cable & Wireless Caribbean Cellular (Antigua) Limited', 'bmobile'),
('AG', 'Antigua Wireless Ventures Limited', 'Digicel'),
('AR', 'Telefonica Móviles Argentina SA', 'Movistar'),
('AR', 'NII Holdings', 'Nextel'),
('AR', 'AMX Argentina S.A', 'Claro'),
('AR', 'Telecom Personal SA', 'Personal'),
('AR', 'Hutchinson (PORT HABLE)', ''),
('AM', 'ArmenTel', 'Beeline'),
('AM', 'K Telecom CJSC', 'VivaCell-MTS'),
('AW', 'SETAR (Servicio di Telecomunicacion di Aruba)', 'SETAR'),
('AW', 'Digicell', 'Digicell'),
('AU', 'Telstra Corp. Ltd.', 'Telstra'),
('AU', 'Singtel Optus Ltd', 'YES OPTUS'),
('AU', 'Vodafone Australia', 'Vodafone'),
('AU', 'Department of Defence', ''),
('AU', 'Ozitel', 'Ozitel'),
('AU', 'Hutchison 3G', '3'),
('AU', 'One. Tel', 'One. Tel'),
('AU', 'Airnet', 'Airnet'),
('AU', 'AAPT', 'AAPT'),
('AU', '3GIS', '3GIS'),
('AU', 'Advanced Communications Technologies', ''),
('AU', 'Crazy John''s', 'Crazy John''s'),
('AU', 'Localstar', 'Localstar'),
('AT', 'Mobilkom Austria', 'A1'),
('AT', 'T-Mobile Austria', 'T-Mobile'),
('AT', 'Orange Austria', 'Orange'),
('AT', 'Hutchison 3G', '3'),
('AZ', 'Azercell', 'Azercell'),
('AZ', 'Bakcell', 'Bakcell'),
('AZ', 'CATEL LLC', 'FONEX'),
('AZ', 'Azerfon', 'Nar Mobile'),
('BS', 'The Bahamas Telecommunications Company Ltd', 'BaTelCo'),
('BH', 'Batelco', 'Batelco'),
('BH', 'MTC-VFBH', 'MTC-VFBH'),
('BD', 'GrameenPhone Ltd', 'Grameenphone'),
('BD', 'Aktel', 'Aktel'),
('BD', 'Orascom Telecom Bangladesh Limited', 'Banglalink'),
('BD', 'TeleTalk', 'TeleTalk'),
('BD', 'Citycell', 'Citycell'),
('BD', 'Warid Telecom', 'Warid'),
('BB', 'Cable & Wireless Barbados Ltd.', 'bmobile'),
('BB', 'Digicel (Jamaica) Limited', 'Digicel'),
('BB', 'Sunbeach Communications', ''),
('BY', 'Velcom', 'Velcom'),
('BY', 'JLLC Mobile TeleSystems', 'MTS'),
('BY', 'Belarussian Telecommunications Network', 'life:)'),
('BY', 'BelCel', ''),
('BE', 'Belgacom Mobile', 'Proximus'),
('BE', 'France Telecom', 'Mobistar'),
('BE', 'KPN', 'BASE'),
('BZ', 'Belize Telemedia', ''),
('BZ', 'International Telecommunications Ltd.', ''),
('BZ', 'Smart', 'Smart'),
('BM', 'Telecommunications (Bermuda & West Indies) Ltd', 'Digicel Bermuda'),
('BM', 'M3 Wireless', 'Mobility'),
('BM', 'Digicel', 'Digicel'),
('BM', 'Cellular One', 'Cellular One'),
('BJ', 'Bell Benin Communications', 'BBCOM'),
('BJ', 'Libercom', 'Libercom'),
('BJ', 'Telecel Benin Ltd', 'Telecel'),
('BJ', 'Spacetel Benin', 'Areeba'),
('BT', 'B-Mobile', 'B-Mobile'),
('BT', 'Tashi InfoComm Limited', 'TashiCell'),
('BO', 'Nuevatel PCS De Bolivia SA', 'Nuevatel'),
('BO', 'Entel SA', 'Entel'),
('BO', 'Telefonica Celular De Bolivia S.A', 'Tigo'),
('BA', 'Public Enterprise Croatian Telecom Ltd.', 'ERONET'),
('BA', 'RS Telecommunications JSC Banja Luka', 'm:tel'),
('BA', 'BH Telecom', 'BH Mobile'),
('BW', 'Mascom Wireless (Pty) Limited', 'Mascom'),
('BW', 'Orange (Botswana) Pty Limited', 'Orange'),
('BW', 'Botswana Telecommunications Corporation', 'BTC Mobile'),
('BR', 'Telecom Italia Mobile', 'TIM'),
('BR', 'Claro (América Móvil)', 'Claro'),
('BR', 'Vivo S.A.', 'Vivo'),
('BR', 'CTBC Telecom', 'CTBC Celular'),
('BR', 'Sercomtel Celular', 'Sercomtel'),
('BR', 'Brasil Telecom Celular SA', 'Oi / Brasil Telecom'),
('BR', 'Amazônia Celular S.A.', 'Oi / Amazonia Celular'),
('BR', 'TNL PCS', 'Oi'),
('BR', 'CTBC Celular S.A.', 'CTBC Celular'),
('BR', 'Unicel do Brasil', 'aeiou'),
('VG', 'Cable & Wireless (West Indies)', 'Cable & Wireless'),
('VG', 'Caribbean Cellular Telephone', ''),
('BN', 'Jabatan Telekom', ''),
('BN', 'B-Mobile Communications Sdn Bhd', 'B-Mobile'),
('BN', 'DataStream Technology', 'DTSCom'),
('BG', 'Mobiltel', 'M-Tel'),
('BG', 'BTC', 'Vivatel'),
('BG', 'Cosmo Bulgaria Mobile', 'GLOBUL'),
('BF', 'Onatel', 'Onatel'),
('BF', 'Celtel Burkina Faso', 'Zain'),
('BF', 'Telecel Faso SA', 'Telecel Faso'),
('BI', 'Econet Wireless Burundi PLC', 'Spacetel'),
('BI', 'Africell PLC', 'Africell'),
('BI', 'Telecel Burundi Company', 'Telecel'),
('BI', 'Onatel', 'Onatel'),
('BI', 'LACELL SU', 'LACELL SU'),
('KH', 'CamGSM', 'Mobitel'),
('KH', 'Telekom Malaysia International (Cambodia) Co. Ltd', 'hello'),
('KH', 'S Telecom', ''),
('KH', 'Cambodia Advance Communications Co. Ltd', 'qb'),
('KH', 'APPLIFONE CO. LTD.', 'Star-Cell'),
('KH', 'Camshin / Shinawatra', ''),
('KH', 'Excell', 'Excell'),
('KH', 'Latelz Co., Ltd', ''),
('KH', 'Sotelco Ltd. (Beeline-KH)', 'Beeline'),
('CM', 'Mobile Telephone Network Cameroon Ltd', 'MTN Cameroon'),
('CM', 'Orange Cameroun S.A.', 'Orange'),
('CA', 'Telus', ''),
('CA', 'Telus Mobility Temporary', ''),
('CA', 'Airtel Wireless', ''),
('CA', 'FIRST Networks Operations Inc', 'FIRST'),
('CA', 'Telus Mobility', 'MiKe'),
('CA', 'Microcell Telecommunications Inc (Fido)', 'Fido'),
('CA', 'Dryden Mobility', 'DMTS'),
('CA', 'Globalive Wireless', ''),
('CA', 'ICE Wireless', ''),
('CA', 'Bell Mobility', ''),
('CA', 'BC Tel Mobility', ''),
('CA', 'Sask Tel Mobility', ''),
('CA', 'MTS Mobility', ''),
('CA', 'Tbay Mobility', ''),
('CA', 'Telus (Quebec) Mobility', ''),
('CA', 'MB Tel Mobility', ''),
('CA', 'MT&T Mobility', ''),
('CA', 'New Tel Mobility', ''),
('CA', 'Globalstar', 'Globalstar'),
('CA', 'Rogers Wireless', ''),
('CV', 'CVMovel, S.A.', 'CVMOVEL'),
('KY', 'Cable & Wireless (Cayman Islands) Limited', 'Cable & Wireless'),
('KY', 'Digicel Cayman Ltd.', 'Digicel'),
('CF', 'Centrafrique Telecom Plus', 'CTP'),
('CF', 'Telecel Centrafrique', 'TC'),
('CF', 'Orange RCA', 'Orange'),
('CF', 'Nationlink Telecom RCA', 'Nationlink'),
('TD', 'CelTel Tchad SA', 'Zain'),
('TD', 'Tchad Mobile', ''),
('TD', 'TIGO - Millicom', ''),
('TD', 'TAWALI', 'TAWALI'),
('CL', 'Entel Pcs', 'Entel'),
('CL', 'Movistar Chile', 'movistar'),
('CL', 'Claro Chile', 'Claro'),
('CL', 'Entel Telefonica Movil', 'Entel'),
('CN', 'China Mobile', ''),
('CN', 'China Unicom', ''),
('CN', 'China Telecom', ''),
('CO', 'Colombia Telecomunicaciones S.A. - Telecom', ''),
('CO', 'Edatel S.A.', 'Edatel'),
('CO', 'Comcel Colombia', 'Comcel'),
('CO', 'Bellsouth Colombia', 'movistar'),
('CO', 'Colombia Móvil', 'Tigo'),
('CO', 'Telefónica Móviles Colombia', 'movistar'),
('KM', 'HURI - SNPT', ''),
('CG', 'Celtel Congo', 'Zain'),
('CG', 'MTN CONGO S.A', 'Libertis Telecom'),
('CG', 'African Telecoms', ''),
('CG', 'Congolaise Wireless', ''),
('CK', 'Telecom Cook', ''),
('CR', 'Instituto Costarricense de Electricidad', 'ICE'),
('CR', 'Grupo ICE', 'ICE'),
('HR', 'T-Mobile Croatia', 'T-Mobile'),
('HR', 'Tele2', 'Tele2'),
('HR', 'VIPnet', 'VIPnet'),
('CU', 'Empresa de Telecomunicaciones de Cuba, SA', 'ETECSA'),
('CY', 'Cyprus Telecommunications Auth', 'Cytamobile-Vodafone'),
('CY', 'Areeba Ltd', 'MTN'),
('CZ', 'T-Mobile Czech Republic', 'T-Mobile'),
('CZ', 'Telefónica O2 Czech Republic', 'EUROTEL PRAHA'),
('CZ', 'Vodafone Czech Republic', 'OSKAR'),
('CZ', 'MobilKom, a. s.', 'U:fon'),
('CZ', 'SŽDC s.o.', ''),
('CZ', 'Vodafone Czech Republic a.s., R&D Centre at FEE, CTU', 'Vodafone'),
('CG', 'Vodacom Congo RDC sprl', 'Vodacom'),
('CG', 'Cellco', ''),
('CG', 'Supercell SPRL', 'Supercell'),
('CG', 'Congo-Chine Telecom s.a.r.l.', 'CCT'),
('CG', 'OASIS SPRL', 'SAIT Telecom'),
('CG', 'Africell RDC sprl', 'Africell'),
('DK', 'TDC A/S', 'TDC'),
('DK', 'Telenor', 'Sonofon'),
('DK', 'MIGway A/S', ''),
('DK', 'Hi3G Denmark ApS', '3'),
('DK', 'Barablu Mobile Ltd.', ''),
('DK', 'Telia', 'Telia'),
('DK', 'Telia Nãttjänster Norden AB', 'Telia'),
('DJ', 'Djibouti Telecom SA', 'Evatis'),
('DM', 'Digicel', 'Digicel'),
('DM', 'Cable & Wireless', ''),
('DO', 'Orange Dominicana', 'Orange'),
('DO', 'Compañía Dominicana de Teléfonos, C por', 'Claro'),
('DO', 'Tricom S.A.', 'Tricom'),
('DO', 'Trilogy Dominicana, S.A.', 'Viva'),
('TL', 'Timor Telecom', ''),
('EC', 'Otecel S.A.', 'Movistar'),
('EC', 'América Móvil', 'Porta'),
('EC', 'Telecsa S.A.', 'Alegro'),
('EG', 'ECMS-Mobinil', 'Mobinil'),
('EG', 'Vodafone Egypt', 'Vodafone'),
('EG', 'Etisalat Egypt', 'Etisalat'),
('SV', 'CTE Telecom Personal SA de CV', 'CTE Telecom Personal'),
('SV', 'Digicel Group', 'digicel'),
('SV', 'Telemovil EL Salvador S.A', 'Telemovil EL Salvador'),
('SV', 'Telefónica Móviles El Salvador', 'movistar'),
('SV', 'América Móvil', 'Claro'),
('GQ', 'GETESA', 'Orange GQ'),
('ER', 'Eritrea Telecommunications Services Corporation', 'Eritel'),
('EE', 'Estonian Mobile Telecom', 'EMT'),
('EE', 'Elisa Eesti', 'Elisa'),
('EE', 'Tele 2 Eesti', 'Tele 2'),
('EE', 'OY Top Connect', ''),
('EE', 'AS Bravocom Mobiil', ''),
('EE', 'OY ViaTel', ''),
('ET', 'Ethiopian Telecommunications Corporation', 'ETMTN'),
('FO', 'Faroese Telecom', 'Faroese Telecom'),
('FO', 'Vodafone Faroe Islands', 'Vodafone'),
('FJ', 'Vodafone Fiji', 'Vodafone'),
('FJ', 'Digicel Fiji', 'Digicel'),
('FI', 'DNA Oy', 'DNA'),
('FI', 'Elisa Oyj', 'Elisa'),
('FI', 'TDC Oy', ''),
('FI', 'Ålands Mobiltelefon', 'AMT'),
('FI', 'Scnl Truphone', ''),
('FI', 'TeliaSonera Finland Oyj', 'Sonera'),
('FR', 'Orange', 'Orange'),
('FR', 'France Orange', 'France Telecom Mobile'),
('FR', 'Globalstar Europe', ''),
('FR', 'SFR', 'SFR'),
('FR', 'Bouygues Telecom', 'Bouygues'),
('PF', 'Tikiphone SA', 'VINI'),
('GA', 'Libertis S.A.', 'Libertis'),
('GA', 'Moov (Telecel) Gabon S.A.', ''),
('GA', 'Celtel Gabon S.A.', 'Zain'),
('GM', 'Gamcel', 'Gamcel'),
('GM', 'Africel', 'Africel'),
('GE', 'Geocell Limited', 'Geocell'),
('GE', 'Magticom GSM', 'Magti'),
('GE', 'Iberiatel Ltd.', 'Iberiatel'),
('GE', 'Mobitel LLC', 'Beeline'),
('GE', 'Aquafon', 'Aquafon'),
('GE', 'A-Mobile', 'A-Mobile'),
('DE', 'T-Mobile Deutschland GmbH', 'T-Mobile'),
('DE', 'Vodafone D2 GmbH', 'Vodafone'),
('DE', 'E-Plus Mobilfunk', 'E-Plus'),
('DE', 'Vodafone', 'Vodafone'),
('DE', 'T-Mobile', 'T-Mobile'),
('DE', 'O2 (Germany) GmbH & Co. OHG', 'O2'),
('DE', 'O2', 'O2'),
('DE', 'Arcor AG & Co', ''),
('DE', 'Dolphin Telecom', ''),
('DE', 'Mobilcom Multimedia', ''),
('DE', 'Group 3G UMTS', ''),
('DE', 'Airdata', 'Airdata'),
('DE', 'vistream', 'vistream'),
('DE', 'DB Telematik', ''),
('DE', 'Siemens AG', ''),
('DE', 'E-Plus', 'E-Plus'),
('DE', 'Debitel', 'Debitel'),
('GH', 'ScanCom Ltd', 'MTN'),
('GH', 'Ghana Telecommunications Company Ltd', 'Ghana Telecom Mobile'),
('GH', 'Millicom Ghana Limited', 'tiGO'),
('GH', 'Kasapa / Hutchison Telecom', ''),
('GI', 'Gibraltar Telecoms', 'GibTel'),
('GR', 'COSMOTE - Mobile Telecommunications S.A.', 'Cosmote'),
('GR', 'Vodafone Greece', 'Vodafone'),
('GR', 'Wind Hellas Telecommunications S.A.', 'Wind'),
('GL', 'TELE Greenland A/S', ''),
('GD', 'Digicel Grenada Ltd.', 'Digicel'),
('GD', 'Cable & Wireless Grenada Ltd.', 'Cable & Wireless'),
('GP', 'Orange Caraïbe Mobiles', 'Orange'),
('GP', 'Outremer Telecom', 'Outremer'),
('GP', 'Saint Martin et Saint Barthelemy Telcell Sarl', 'Telcell'),
('GP', 'Dauphin Telecom', 'MIO GSM'),
('GP', 'DIGICEL Antilles Française Guyane', 'Digicel'),
('GU', 'IT&E Overseas, Inc', 'IT&E Wireless'),
('GU', 'Guam Telephone Authority', ''),
('GU', 'GTA Wireless', 'mPulse'),
('GU', 'Guam Cellular & Paging Inc', 'Guamcell'),
('GU', 'Wave Runner LLC', 'i CAN_GSM'),
('GT', 'Servicios de Comunicaciones Personales Inalambricas (SERCOM)', 'Claro'),
('GT', 'Millicom / Local partners', 'Comcel / Tigo'),
('GT', 'Telefonica Móviles Guatemala (Telefónica)', 'movistar'),
('GT', 'Digicel Group', 'digicel'),
('GN', 'Spacetel', 'Spacetel'),
('GN', 'Sotelgui Lagui', 'Lagui'),
('GN', 'INTERCEL Guinée', 'Telecel Guinee'),
('GN', 'Areeba Guinea', 'MTN'),
('GW', 'Spacetel Guiné-Bissau S.A.', 'Areeba'),
('GY', 'U-Mobile (Cellular) Inc.', 'Digicel'),
('HT', 'Comcel / Voila', ''),
('HT', 'Digicel', 'Digicel'),
('HN', 'Servicios de Comunicaciones de Honduras S.A. de C.V.', 'Claro'),
('HN', 'Celtel / Tigo', ''),
('HN', 'Empresa Hondureña de Telecomunicaciones', 'Hondutel'),
('HN', 'Digicel de Honduras', 'DIGICEL'),
('HK', 'Hong Kong CSL Limited', 'CSL'),
('HK', 'CITIC Telecom 1616', ''),
('HK', 'Hutchison Telecom', '3 (3G)'),
('HK', 'SmarTone Mobile Comms', 'Smartone-Vodafone'),
('HK', 'China Unicom', ''),
('HK', 'Trident', ''),
('HK', 'China Motion Telecom', ''),
('HK', 'China-Hongkong Telecom', ''),
('HK', 'China Mobile Hong Kong Company Limited', 'CMCC Peoples'),
('HK', 'PCCW Mobile (PCCW Ltd)', 'PCCW'),
('HU', 'Pannon GSM Távközlési Zrt.', 'Pannon'),
('HU', 'Magyar Telekom Plc', 'T-Mobile'),
('HU', 'Vodafone Magyarország Zrt.', 'Vodafone'),
('IS', 'Iceland Telecom', 'Siminn'),
('IS', 'Og fjarskipti hf', 'Vodafone'),
('IS', 'Vodafone Iceland', 'Vodafone'),
('IS', 'IMC Island ehf', 'Viking'),
('IS', 'Núll níu ehf', ''),
('IS', 'IceCell ehf', 'IceCell'),
('IS', 'Nova ehf', 'Nova'),
('IN', 'Vodafone Essar', 'Vodafone - Haryana'),
('IN', 'Bharti Airtel', 'Airtel - Punjab'),
('IN', 'Idea cellular', 'Idea - Delhi'),
('IN', 'Vodafone Essar Gujarat Limited', 'Vodafone - Gujarat'),
('IN', 'Reliance GSM', ''),
('IN', 'IDEA Cellular Limited', 'Idea Haryana'),
('IN', 'Vodafone Essar South', 'Vodafone'),
('IN', 'Spice Communications', 'Spice Telecom - Punjab'),
('IN', 'Aircell Digilink Essar Cellph.', ''),
('IN', 'Vodafone Mumbai', 'Vodafone'),
('IN', 'BPL Mobile Mumbai', ''),
('IN', 'Dishnet Wireless/Aircel', 'Aircel - Orissa'),
('IN', 'Vodafone Essar East Limited', 'Vodafone - Kolkata'),
('IN', 'Bharat Sanchar Nigam Limited', 'BSNL'),
('IN', 'Reliance GSM - Bihar & Jharkhand', 'Reliance'),
('IN', 'Aircel', 'Aircel - Chennai Metro'),
('IN', 'Spice Communications Limited', 'Spice Telecom - Karnataka'),
('IN', 'Vodafone', 'Vodafone'),
('IN', 'Reliance Telecom Private', 'Reliance - Orissa'),
('IN', 'Aircell Digilink', '----'),
('IN', 'BSNL Maharashtra & Goa', 'BSNL - Maharashtra'),
('IN', 'Vodafone Essar East', 'Vodafone - West Bengal'),
('IN', 'Mahanagar Telephone Nigam Ltd', 'MTNL - Delhi'),
('IN', 'Bharat Sanchar Nigam Limited / CellOne', 'BSNL'),
('IN', 'BTA Cellcom', ''),
('IN', 'Idea', 'Idea'),
('IN', 'Reliance GSM - Kolkata', 'Reliance'),
('IN', 'Reliance GSM - West Bengal', 'Reliance'),
('IN', 'Escorts Telecom', ''),
('IN', 'Airtel Maharashtra & Goa', 'Airtel - Maharashtra'),
('IN', 'Airtel Mumbai', ''),
('IN', 'Airtel Gujrat', ''),
('ID', 'PT Pasifik Satelit Nusantara (ACeS)', 'PSN'),
('ID', 'PT Indonesian Satellite Corporation Tbk (INDOSAT)', 'INDOSAT'),
('ID', 'PT Indosat', 'StarOne'),
('ID', 'PT Telkom', 'TelkomFlexi'),
('ID', 'PT Natrindo Telepon Seluler', 'AXIS'),
('ID', 'PT Smart Telecom', 'SMART'),
('ID', 'PT Telekomunikasi Selular', 'Telkomsel'),
('ID', 'PT Excelcomindo Pratama', 'XL'),
('ID', 'PT Sampoerna Telekomunikasi Indonesia', 'Ceria'),
('ID', 'PT Mobile-8 Telecom', 'Fren/Hepi'),
('ID', 'PT Hutchison CP Telecommunications', '3'),
('ID', 'PT Bakrie Telecom', 'Esia'),
('IR', 'Mobile Communications Company of Iran', 'MCI'),
('IR', 'KFZO', 'TKC'),
('IR', 'Mobile Telecommunications Company of Esfahan', 'MTCE'),
('IR', 'Taliya', 'Taliya'),
('IR', 'Irancell Telecommunications Services Company', 'Irancell'),
('IQ', 'Zain Iraq', 'Zain IQ'),
('IQ', 'Asia Cell Telecommunications Company', 'Asia Cell'),
('IQ', 'Korek Telecom Ltd', 'Korek'),
('IQ', 'SanaTel', 'SanaTel'),
('IQ', 'Orascom Telecom Iraq Corporation', 'IRAQNA'),
('IE', 'Vodafone Ireland', 'Vodafone'),
('IE', 'O2 Ireland', 'O2'),
('IE', 'Meteor', 'Meteor'),
('IE', 'Access Telecom', ''),
('IE', 'Hutchison 3G Ireland limited', '3'),
('IE', 'Eircom', ''),
('IE', 'Clever Communications', ''),
('IL', 'Partner Communications Company Ltd', 'Orange'),
('IL', 'Cellcom', 'Cellcom'),
('IL', 'Pelephone', 'Pelephone'),
('IL', 'Mirs', 'Mirs'),
('IT', 'Telecom Italia SpA', 'TIM'),
('IT', 'Elsacom', 'Elsacom'),
('IT', 'Vodafone Omnitel N.V.', 'Vodafone'),
('IT', 'Rete Ferroviaria Italiana', 'RFI'),
('IT', 'IPSE 2000', 'IPSE 2000'),
('IT', 'Wind Telecomunicazioni SpA', 'Wind'),
('IT', 'Blu', 'Blu'),
('IT', 'Hutchison 3G', '3 Italia'),
('JM', 'Cable & Wireless', 'Cable & Wireless'),
('JM', 'Digicel (Jamaica) Limited', 'Digicel'),
('JM', 'Oceanic Digital Jamaica Limited', 'Claro'),
('JP', 'eMobile, Ltd.', 'eMobile'),
('JP', 'NTT DoCoMo', 'DoCoMo'),
('JP', 'NTT DoCoMo Kansai', 'DoCoMo'),
('JP', 'NTT DoCoMo Hokuriku', 'DoCoMo'),
('JP', 'SoftBank Mobile Corp', 'SoftBank'),
('JP', 'KDDI Corporation', 'KDDI'),
('JP', 'NTT DoCoMo Tokai', 'DoCoMo'),
('JP', 'NTT DoCoMo Tohoku', 'DoCoMo'),
('JP', 'NTT DoCoMo Hokkaido', 'DoCoMo'),
('JP', 'NTT DoCoMo Chugoku', 'DoCoMo'),
('JP', 'NTT DoCoMo Kyushu', 'DoCoMo'),
('JP', 'NTT DoCoMoTohoku', 'DoCoMo'),
('JP', 'NTT DoCoMo Shikoku', 'DoCoMo'),
('JP', 'Okinawa Cellular Telephone', ''),
('JP', 'TU-KA Cellular Tokyo', 'TU-KA'),
('JP', 'TU-KA Phone Kansai', 'TU-KA'),
('JP', 'TU-KA Cellular Tokai', 'TU-KA'),
('JO', 'Jordan Mobile Telephone Services', 'Zain'),
('JO', 'XPress Telecom', 'XPress Telecom'),
('JO', 'Umniah', 'Umniah'),
('JO', 'Petra Jordanian Mobile Telecommunications Company (MobileCom)', 'Orange'),
('KZ', 'KaR-Tel LLP', 'Beeline'),
('KZ', 'GSM Kazakhstan Ltd', 'Kcell'),
('KZ', 'Dalacom', 'Dalacom'),
('KZ', 'Mobile Telecom Service LLP', 'Mobile Telecom Service'),
('KE', 'Safaricom Limited', 'Safaricom'),
('KE', 'Celtel Kenya Limited', 'Zain'),
('KE', 'Telkom Kenya', 'Orange Kenya'),
('KE', 'Econet Wireless Kenya', 'yu'),
('KI', 'Telecom Services Kiribati Ltd', 'Kiribati Frigate'),
('KP', 'Korea Posts and Telecommunications Corporation', 'SUN NET'),
('KR', 'KTF', 'KTF'),
('KR', 'Shinsegi Telecom, Inc.', 'Digital 017'),
('KR', 'SK Telecom', 'SKT'),
('KR', 'LG Telecom', 'LGT'),
('KW', 'Mobile Telecommunications Co.', 'Zain'),
('KW', 'National Mobile Telecommunications', 'Wataniya'),
('KW', 'Kuwait Telecommunication Company', 'Viva'),
('KG', 'Sky Mobile LLC', 'Bitel'),
('KG', 'BiMoCom Ltd', 'MegaCom'),
('KG', 'NurTelecom LLC', 'O!'),
('LA', 'Lao Shinawatra Telecom', 'LaoTel'),
('LA', 'Enterprise of Telecommunications Lao', 'ETL'),
('LA', 'Lao Asia Telecommunication State Enterprise (LAT)', 'LAT'),
('LA', 'Millicom Lao Co Ltd', 'Tigo'),
('LV', 'Latvian Mobile Telephone', 'LMT'),
('LV', 'Tele2', 'Tele2'),
('LV', 'Telekom Baltija', 'TRIATEL'),
('LV', 'Bite Latvija', 'Bite'),
('LV', 'Rigatta', ''),
('LV', 'Master Telecom', 'MTS'),
('LV', 'IZZI', 'IZZI'),
('LB', 'Alfa', 'Alfa'),
('LB', 'MIC 2', 'MTC-Touch'),
('LS', 'Vodacom Lesotho (Pty) Ltd', 'Vodacom'),
('LS', 'Econet Ezin-cel', ''),
('LR', 'Lonestar Communications Corporation', 'Lonestar Cell'),
('LR', 'Comium Liberi', ''),
('LR', 'Liberia Telecommunications Corporation', 'LIBTELCO'),
('LY', 'Libyana', 'Libyana'),
('LY', 'Al Madar', 'Madar'),
('LI', 'Swisscom Schweiz AG', 'Swisscom'),
('LI', 'Orange Liechtenstein AG', 'Orange'),
('LI', 'Mobilkom Liechtenstein AG', 'FL1'),
('LI', 'Belgacom', 'Tele 2'),
('LT', 'Omnitel', 'Omnitel'),
('LT', 'UAB Bité Lietuva', 'BITE'),
('LT', 'Tele 2', 'Tele 2'),
('LU', 'P&T Luxembourg', 'LuxGSM'),
('LU', 'Tango SA', 'Tango'),
('LU', 'VOXmobile S.A.', 'Voxmobile'),
('MO', 'SmarTone Macao', 'SmarTone'),
('MO', 'C.T.M. Telemovel+', 'CTM'),
('MO', 'China Telecom', 'China Telecom'),
('MO', 'Hutchison Telecom', '3'),
('MK', 'T-Mobile Makedonija', 'T-Mobile'),
('MK', 'Cosmofon', 'Cosmofon'),
('MK', 'VIP Operator', 'Vip'),
('MG', 'Celtel', 'Zain'),
('MG', 'Orange Madagascar S.A.', 'Orange'),
('MG', 'Telma Mobile S.A.', 'Telma'),
('MW', 'Telecom Network Malawi', 'TNM'),
('MW', 'Celtel Limited', 'Zain'),
('MY', 'Maxis Communications Berhad', 'Maxis'),
('MY', 'Celcom Malaysia Sdn Bhd', 'Celcom'),
('MY', 'DiGi Telecommunications', 'DiGi'),
('MY', 'U Mobile Sdn Bhd', 'U Mobile'),
('MV', 'Dhivehi Raajjeyge Gulhun', 'Dhiraagu'),
('MV', 'Wataniya Telecom Maldives', 'Wataniya'),
('ML', 'Malitel SA', 'Malitel'),
('ML', 'Orange Mali SA', 'Orange'),
('MT', 'Vodafone Malta', 'Vodafone'),
('MT', 'Mobisle Communications Limited', 'GO'),
('MT', 'Melita Mobile Ltd. (3G Telecommunications Limited)', 'Melita'),
('MR', 'Mattel', 'Mattel'),
('MR', 'Mauritel Mobiles', 'Mauritel'),
('MU', 'Cellplus Mobile Communications Ltd.', 'Orange'),
('MU', 'Mahanagar Telephone (Mauritius) Ltd.', 'MTNL'),
('MU', 'Emtel Ltd', 'Emtel'),
('MX', 'Nextel México', 'Nextel'),
('MX', 'América Móvil', 'Telcel'),
('MX', 'Pegaso Comunicaciones y Sistemas', 'movistar'),
('FM', 'FSM Telecom', ''),
('MD', 'Orange Moldova', 'Orange'),
('MD', 'Moldcell', 'Moldcell'),
('MD', 'Moldtelecom', 'Unité'),
('MD', 'Interdnestrcom', 'IDC'),
('MD', 'Eventis Telecom', 'Eventis'),
('MC', 'Monaco Telecom', 'Office des Telephones'),
('MN', 'Mobicom Corporation', 'MobiCom'),
('MN', 'Unitel LLC', 'Unitel'),
('ME', 'ProMonte GSM', 'ProMonte'),
('ME', 'T-Mobile Montenegro LLC', 'T-Mobile'),
('ME', 'MTEL CG', 'm:tel CG'),
('MA', 'Medi Telecom', 'Méditel'),
('MA', 'Ittissalat Al Maghrib (Maroc Telecom)', 'IAM'),
('MA', 'WANA - Groupe ONA', 'WANA'),
('MZ', 'Mocambique Celular S.A.R.L', 'mCel'),
('MZ', 'Vodacom Mozambique, S.A.R.L.', 'Vodacom'),
('MM', 'Myanmar Post and Telecommunication', 'MPT'),
('NA', 'MTC Namibia', 'MTC'),
('NA', 'Telecom Namibia', 'switch'),
('NA', 'Telecel Globe (Orascom)', 'Cell One'),
('NP', 'Nepal Telecom', ''),
('NP', 'Spice Nepal Private Ltd', 'Mero Mobile'),
('NP', 'United Telecom Limited', ''),
('NL', 'Tele2 Netherlands', ''),
('NL', 'NS Railinfrabeheer B.V.', ''),
('NL', 'Vodafone Netherlands', 'Vodafone'),
('NL', 'KPN', 'KPN'),
('NL', 'T-Mobile Netherlands B.V', 'T-Mobile / Ben'),
('AN', 'Telcell N.V.', 'Telcell'),
('AN', 'Curaçao Telecom N.V.', 'Digicel'),
('AN', 'Setel N.V.', 'UTS'),
('AN', 'East Caribbean Cellular', ''),
('AN', 'Antiliano Por N.V.', ''),
('AN', 'E.O.C.G. Wireless', 'MIO'),
('AN', 'Bòbò Frus N.V.', 'Bayòs'),
('NC', 'OPT New Caledonia', 'Mobilis'),
('NZ', 'Telecom New Zealand', 'Telecom'),
('NZ', 'Vodafone New Zealand', 'Vodafone'),
('NZ', 'Woosh Wireless New Zealand', 'Woosh'),
('NZ', 'TelstraClear New Zealand', 'TelstraClear'),
('NZ', 'NZ Communications New Zealand', 'NZ Comms'),
('NI', 'Empresa Nicaragüense de Telecomunicaciones, S.A.', 'Claro'),
('NI', 'Telefónica Móviles de Nicaragua S.A.', 'movistar'),
('NI', 'Servicios de Comunicaciones S.A.', 'SERCOM'),
('NE', 'SahelCom', 'SahelCom'),
('NE', 'Celtel Niger', 'Zain'),
('NE', 'Telecel Niger SA', 'Telecel'),
('NE', 'Orange Niger', 'Orange'),
('NG', 'Celtel Nigeria Ltd Ltd.', 'Zain'),
('NG', 'MTN Nigeria Communications Limited', 'MTN'),
('NG', 'Nigerian Mobile Telecommunications Limited', 'M-Tel'),
('NG', 'Globacom Ltd', 'Glo'),
('NO', 'Telenor', 'Telenor'),
('NO', 'NetCom GSM', 'NetCom'),
('NO', 'MTU', 'MTU'),
('NO', 'Tele2', 'Tele2'),
('NO', 'Network Norway', 'Network Norway'),
('NO', 'Nordisk Mobiltelefon', 'Ice'),
('NO', 'Ventelo', 'Ventelo'),
('NO', 'TDC Mobil AS', ''),
('NO', 'Barablu Mobile Norway Ltd', ''),
('NO', 'Jernbaneverket AS', ''),
('OM', 'Oman Telecommunications Company', 'Oman Mobile'),
('OM', 'Omani Qatari Telecommunications Company SAOC', 'Nawras'),
('PK', 'Mobilink-PMCL', 'Mobilink'),
('PK', 'Pakistan Telecommunciation Mobile Ltd', 'Ufone'),
('PK', 'China Mobile', 'Zong'),
('PK', 'Telenor Pakistan', 'Telenor'),
('PK', 'WaridTel', 'Warid'),
('PK', 'Instaphone', 'Instaphone'),
('PW', 'Palau National Communications Corp.', 'PNCC'),
('PW', 'Palau Mobile Corporation', 'Palau Mobile'),
('PS', 'Palestine Cellular Communications, Ltd.', 'JAWWAL'),
('PS', 'Wataniya Palestine Mobile Telecommunications Company', 'Wataniya'),
('PA', 'Cable & Wireless Panama S.A.', 'Cable & Wireless'),
('PA', 'Telefonica Moviles Panama S.A', 'movistar'),
('PA', 'Digicel (Panama) S.A.', 'Digicel'),
('PG', 'Pacific Mobile Communications', 'B-Mobile'),
('PG', 'Digicel PNG', 'Digicel'),
('PY', 'Hola Paraguay S.A', 'VOX'),
('PY', 'AMX Paraguay S.A.', 'Claro'),
('PY', 'Telefonica Celular Del Paraguay S.A. (Telecel)', 'Tigo'),
('PY', 'Núcleo S.A', 'Personal'),
('PE', 'Telefónica Móviles Perú', 'movistar'),
('PE', 'América Móvil Perú', 'Claro'),
('PE', 'NII Holdings', 'NEXTEL'),
('PH', 'Innove Communications Inc', 'Islacom'),
('PH', 'Globe Telecom', 'Globe'),
('PH', 'Smart Communications Inc', 'Smart Gold'),
('PH', 'Digital Telecommunications Philippines', 'Digitel'),
('PH', 'ACeS Philippines', ''),
('PH', 'Connectivity Unlimited Resource Enterprise', 'Red Mobile'),
('PH', 'Nextel', ''),
('PL', 'Polkomtel', 'Plus'),
('PL', 'Polska Telefonia Cyfrowa (PTC)', 'Era'),
('PL', 'PTK Centertel', 'Orange'),
('PL', 'Tele2 Polska', 'Tele2'),
('PL', 'P4 Sp. z o.o', 'Play'),
('PL', 'Premium Internet', ''),
('PL', 'E-Telko', ''),
('PL', 'Telekomunikacja Kolejowa', ''),
('PL', 'Telefony Opalenickie', ''),
('PL', 'Nordisk Polska', ''),
('PL', 'Cyfrowy Polsat', 'Cyfrowy Polsat'),
('PL', 'Sferia S.A.', 'Sferia'),
('PL', 'CenterNet S.A.', 'CenterNet'),
('PT', 'Vodafone Portugal', 'Vodafone'),
('PT', 'Sonaecom – Serviços de Comunicações, S.A.', 'Optimus'),
('PT', 'Telecomunicações Móveis Nacionais', 'TMN'),
('PT', 'Zapp Portugal', 'Zapp'),
('PR', 'Puerto Rico Telephone Company', 'Claro'),
('QA', 'Q-Tel', 'Qatarnet'),
('RE', 'Orange La Réunion', 'Orange'),
('RE', 'Outremer Telecom', 'Outremer'),
('RE', 'Societe Reunionnaise de Radiotelephone', 'SFR Reunion'),
('RO', 'Vodafone România', 'Vodafone'),
('RO', 'Cosmote România', 'Cosmote'),
('RO', 'Telemobil', 'Zapp'),
('RO', 'RCS&RDS', 'DIGI.mobil'),
('RO', 'Orange România', 'Orange'),
('RU', 'Mobile TeleSystems', 'MTS'),
('RU', 'MegaFon OJSC', 'MegaFon'),
('RU', 'Nizhegorodskaya Cellular Communications', 'NCC'),
('RU', 'Sibchallenge', 'Sibchallenge'),
('RU', 'Yeniseytelecom', 'ETK'),
('RU', 'Zao SMARTS', 'SMARTS'),
('RU', 'Khabarovsky Cellular Phone', 'Skylink'),
('RU', 'Dontelekom', 'DTC'),
('RU', 'Orensot', ''),
('RU', 'Baykal Westcom / New Telephone Company / Far Eastern Cellular', 'Baykalwestcom'),
('RU', 'Kuban GSM', 'KUGSM'),
('RU', 'SMARTS Ufa', 'SMARTS'),
('RU', 'New Telephone Company', 'NTC'),
('RU', 'JSC Uralsvyazinform', 'Utel'),
('RU', 'INDIGO', 'INDIGO'),
('RU', 'Tele2', 'Tele2'),
('RU', 'Mobicom - Novosibirsk', 'Mobicom - Novosibirsk'),
('RU', 'Beeline', 'Beeline'),
('RU', 'MOTIV', 'MOTIV'),
('RU', 'Uralsvyazinform', 'Utel'),
('RU', 'Stavtelesot / North Caucasian GSM', ''),
('RU', 'Primtelefon', ''),
('RU', 'Telecom XXI', ''),
('RU', 'OJSC VimpelCom', 'Beeline'),
('RU', 'SkyLink/MTS/the Moscow Cellular communication', ''),
('RU', 'Akos', 'Akos'),
('RW', 'MTN Rwandacell SARL', 'MTN'),
('KN', 'Digicel', 'Digicel'),
('KN', 'Cable & Wireless', ''),
('LC', 'Digicel', 'Digicel'),
('LC', 'Cable & Wireless', ''),
('PM', 'St. Pierre-et-Miquelon Télécom', 'Ameris'),
('VC', 'Digicel', 'Digicel'),
('VC', 'Cingular Wireless', 'Cingular Wireless'),
('VC', 'Cable & Wireless', 'Cable & Wireless'),
('WS', 'Digicel Pacific Ltd.', 'Digicel'),
('WS', 'SamoaTel Ltd', 'SamoaTel'),
('SM', 'San Marino Telecom', 'PRIMA'),
('ST', 'Companhia Santomese de Telecomunicaçôe', 'CSTmovel'),
('SA', 'Saudi Telecom Company', 'STC'),
('SA', 'Etihad Etisalat Company', 'Mobily'),
('SA', 'Electronics App'' Est.', 'EAE'),
('SA', 'MTC Saudi Arabia', 'Zain SA'),
('SN', 'Sonatel ALIZE', ''),
('SN', 'Sentel GSM', ''),
('RS', 'Telenor Serbia', 'Telenor'),
('RS', 'Telekom Srbija', 'Telekom Srbija'),
('RS', 'VIP Mobile', 'VIP Mobile'),
('SC', 'Cable & Wireless (Seychelles) Ltd.', 'Cable & Wireless'),
('SC', 'Mediatech International Ltd.', 'Mediatech International'),
('SC', 'Telecom Airtel', ''),
('SL', 'Zain', 'Zain'),
('SL', 'Millicom', 'Millicom'),
('SL', 'Datatel', 'Datatel'),
('SL', 'Comium Sierra leone INC', 'Comium'),
('SL', 'Africell', 'Africell'),
('SL', 'Mobitel', 'Mobitel'),
('SL', 'Sierratel', 'LeoneCel'),
('SG', 'Singapore Telecom', 'SingTel'),
('SG', 'MobileOne Asia', 'M1'),
('SG', 'StarHub Mobile', 'StarHub'),
('SG', 'Digital Trunked Radio Network', ''),
('SK', 'Orange Slovensko', 'Orange'),
('SK', 'T-Mobile Slovensko', 'T-Mobile'),
('SK', 'Unient Communications', ''),
('SK', 'Mobile Entertainment Company', ''),
('SK', 'Telefónica O2 Slovakia', 'O2'),
('SK', 'ŽSR', 'ŽSR'),
('SI', 'SI.MOBIL d.d.', 'Si.mobil'),
('SI', 'Mobitel D.D.', 'Mobitel'),
('SI', 'T-2 d.o.o.', 'T-2'),
('SI', 'Tušmobil d.o.o.', 'Tušmobil'),
('SB', 'Solomon Telekom Co Ltd', 'BREEZE'),
('SO', 'Somafone FZLLC', 'Somafone'),
('SO', 'Nationlink', 'Nationlink'),
('SO', 'Hormuud Telecom Somalia Inc', 'Hormuud'),
('SO', 'Golis Telecommunications Company', 'Golis'),
('SO', 'Telecom Mobile', 'Telcom Mobile'),
('SO', 'Telcom Somalia', 'Telcom Somalia'),
('ZA', 'Vodacom', 'Vodacom'),
('ZA', 'Sentech', 'Sentech'),
('ZA', 'Cell C', 'Cell C'),
('ZA', 'MTN Group', 'MTN'),
('ZA', 'SAPS Gauteng', ''),
('ZA', 'Neotel', 'Neotel'),
('ZA', 'Cape Town Metropolitan Council', ''),
('ZA', 'Bokamoso Consortium', ''),
('ZA', 'Karabo Telecoms (Pty) Ltd.', ''),
('ZA', 'Ilizwi Telecommunications', ''),
('ZA', 'Thinta Thinta Telecommunications', ''),
('ZA', 'Telkom', ''),
('ES', 'Vodafone Spain', 'Vodafone'),
('ES', 'France Telecom España SA', 'Orange'),
('ES', 'Xfera Moviles SA', 'Yoigo'),
('ES', 'Telefónica Móviles España', 'TME'),
('ES', 'Euskaltel', 'Euskaltel'),
('ES', 'BT Group', 'BT'),
('ES', 'TeleCable', 'TeleCable'),
('ES', 'ONO', 'ONO'),
('ES', 'Simyo', 'Simyo'),
('ES', 'Best Spain Telecom', 'DigiMobil'),
('ES', 'BARABLU MÓVIL ESPAÑA', 'Barablu'),
('LK', 'Mobitel Lanka Ltd.', 'Mobitel'),
('LK', 'Dialog Telekom PLC.', 'Dialog'),
('LK', 'Celtel Lanka Ltd', 'Tigo'),
('LK', 'Hutch Sri Lanka', ''),
('LK', 'Bharathi AirTel', 'AirTel Sri Lanka'),
('LK', 'Relaince India(Ambhani Group)', 'RTEC Mobile'),
('SD', 'Mobitel / Mobile Telephone Company', ''),
('SD', 'MTN Sudan', 'MTN'),
('SD', 'Wawat Securities', 'Vivacell'),
('SR', 'Telesur', 'Telesur'),
('SZ', 'Swazi MTN', ''),
('SE', 'TeliaSonera Mobile Networks', 'Telia'),
('SE', '3', '3'),
('SE', 'Nordisk Mobiltelefon', 'Ice.net'),
('SE', '3G Infrastructure Services', ''),
('SE', 'Sweden 3G', ''),
('SE', 'Telenor', 'Telenor'),
('SE', 'Tele2 AB', 'Tele2'),
('SE', 'Telenor Mobile Sverige', ''),
('SE', 'SpringMobil', 'SpringMobil'),
('SE', 'Lindholmen Science Park', ''),
('SE', 'Barablu Mobile Scandinavia', ''),
('SE', 'Ventelo Sverige', ''),
('SE', 'TDC Mobil', ''),
('SE', 'Wireless Maingate Nordic', ''),
('SE', '42IT', ''),
('SE', 'Wireless Maingate Message Services', ''),
('SE', 'Banverket', ''),
('CH', 'Swisscom Ltd', 'Swisscom'),
('CH', 'Sunrise Communications AG', 'Sunrise'),
('CH', 'Orange Communications SA', 'Orange'),
('CH', 'Togewanet AG (Comfone)', ''),
('CH', 'SBB AG', ''),
('CH', 'IN&Phone SA', 'IN&Phone'),
('CH', 'Tele2 Telecommunications AG', 'Tele2'),
('CH', '3G Mobile AG', ''),
('CH', 'BebbiCell AG', ''),
('SY', 'SyriaTel', 'SyriaTel'),
('SY', 'MTN Syria (JSC)', 'MTN Syria'),
('TW', 'Far EasTone Telecommunications Co Ltd', 'FarEasTone'),
('TW', 'Asia Pacific Telecom', 'APTG'),
('TW', 'Tuntex Telecom', 'Tuntex'),
('TW', 'LDTA/Chungwa Telecom', 'Chunghwa LDM'),
('TW', 'KG Telecom', 'KG Telecom'),
('TW', 'VIBO Telecom', 'VIBO'),
('TW', 'Chunghwa', 'Chungwa'),
('TW', 'Mobitai Communications', 'MobiTai'),
('TW', 'Taiwan Mobile Co. Ltd', 'Taiwan Mobile'),
('TW', 'TransAsia Telecoms', 'TransAsia'),
('TJ', 'JV Somoncom', 'Somoncom'),
('TJ', 'Indigo Tajikistan', 'Indigo'),
('TJ', 'TT Mobile, Closed joint-stock company', 'MLT'),
('TJ', 'CJSC Babilon-Mobile', 'Babilon-M'),
('TJ', 'Co Ltd. Tacom', 'Beeline TJ'),
('TZ', 'Tritel', ''),
('TZ', 'MIC Tanzania Limited', 'Mobitel'),
('TZ', 'Zanzibar Telecom Ltd', 'Zantel'),
('TZ', 'Vodacom Tanzania Limited', 'Vodacom'),
('TZ', 'Celtel Tanzania Limited', 'Zain'),
('TH', 'CAT CDMA', ''),
('TH', 'Advanced Info Service', '')

Sunday, April 19, 2009

Inputting only numbers using Java Script and HTML

The basic input text field of HTML is very limited when it comes numeric data. There are times in which a better user experience is needed.
In order to generate a better user experience, 2 main features can be easily added to the input text field by using JavaScript:
  • Allow user to input only numeric data. That means that any character other than numbers dots or commas is not allowed. This feature prevents from the user to entering undesired data to the field.
  • Show data in a formatted manner when field is not edited. That means that when field lost focus, its contents are shown with commas or dots. That makes the numeric data on the text field to be more readable.
Note, that we also would like the text to be formatted according to a specific Locale. That means that we want to use decimal separator and grouping separator to be according to our demands. There are countries and cultures in which the decimal separator is comma and some other countries in which decimal separator is dot. The same applies to grouping separator.
In order to achieve our 2 goals we will build 3 java script functions. Each function will be assigned to a specific JavaScript event.
  • onkeypress: This event is activated whenever a key is being pressed when the cursor is in the text field. A function that returns "false" on this event cancels the event and thus prevent from the pressed character to be updated on the text field. We will assign to this even a function named: numbersOnly. This function receives 4 parameters:
    • field: The text field that called the function.
    • e: The onkeypress event.
    • isDec: Indicate that we would like the input to be decimal and not only integer.
    • decimalSeperator: The character used as a decimal separator (probably “.” or “,”).
    In return this function will return true whenever the pressed character is allowed to be inputted by the user or false if character is not allowed to be inputted.
  • onfocus: This event is activated when the text field receives focus. That means, when we are entering to the text field. This event will be assigned with a function named: plainNumber. This function takes the numeric data in the text field and converts it to a plain number, meaning, any numeric formatted data containing dots or command will be converted to a plain number ready to be edited. This function has 2 parameters:
    • field: The text field field that called the function.
    • decimalSeperator: The character used as a decimal separator (probably “.” or “,”).
  • onblur: This event is activated when the field loses focus. That means when we are entering the field by moving to another element on the page. This event will be assinged with a function named: formattedNumber. This function converts the plain numeric data on the text field to a formatted data containing grouping separators. This function has 3 parameters:
    • field: The text field field that called the function.
    • decimalSeperator: The character used as a decimal separator (probably “.” or “,”).
    • groupingSeperator: The character used as a grouping separator (probably “.” or “,”).

I made an example showing a text field utilizing the 3 events to create the described behavior. The example contains a simple HTML page containing the JavaScript methods and a simple text field. The JavaScript code used in this example is not state of the art, but working fine on both FireFox and Explorer. This code can be further refined by encapsulating all the behavior to a single static JavaScript class.

Here is the example code showing input numbers only of an Integer number:

<html>
 <head>
  <title> JavaScript Input Example </title>
 </head>
 <body>
<script>
function numbersOnly(field, e, isDec, decimalSeperator)
{
  var key;
  var keychar;
if (window.event)
   key = window.event.keyCode;
else if (e)
   key = e.which;
else
   return true;
  keychar = String.fromCharCode(key);
// control keys
  if ((key == null) || (key == 0) || (key == 8) ||
      (key == 9) || (key == 13) || (key == 27) || (key == 39) /*|| (key == 37)*/)
  {
    return true;
  }
  else if ((("0123456789").indexOf(keychar) > -1) ||
    (isDec && (keychar == decimalSeperator) && (field.value.indexOf(decimalSeperator) < 0)))
  {
    return true;
  }
 return false;
}
function formattedNumber(field, decimalSeperator, groupingSeperator)
{
    field.value = addGroupingSeperator(field.value, decimalSeperator, groupingSeperator);
}
function plainNumber(field, decimalSeperator)
{
    field.value = field.value.replace(
        new RegExp("[^0123456789" + decimalSeperator + "" + "]", 'g'), "");
}
function addGroupingSeperator(nStr, decimalSeperator, groupingSeperator)
{
    nStr += '';    
    x = nStr.split(decimalSeperator);
    x1 = x[0];
    x2 = x.length > 1 ? decimalSeperator + x[1] : '';
    var rgx = /(\d+)(\d{3})/;
    while (rgx.test(x1)) {
        x1 = x1.replace(rgx, '$1' + groupingSeperator + '$2');
    }
    return x1 + x2;
}
</script>
    <input id="inputInteger" name="inputInteger" maxLength="7"
       onfocus="plainNumber(this, '.');"
       onblur="formattedNumber(this, '.', ',')"
       onkeypress="return numbersOnly(this, event, false, '.')">
 </body>
</html>
Note that the data of the decimal and grouping separator can be taken from your programming language and assigned dynamically according to the specific user Locale information.

Tuesday, April 14, 2009

Hibernate Bi-Directional One to One mapping using Annotations

It took me more than few minutes to find how to do one to one mapping using Hibernate Annotations, so I though I will share it.

I think Hibernate Annotations is best explained by example. Actually, I am not sure I have ever read anything about Hibernate Annotation mappings beside looking at examples…

This example is built from 2 classes: Person and PersonDetails, corresponding to 2 database tables: person and person_details. The 2 classes will demonstrate the usage of one to one mapping from both directions.

I am not sure this example is so close to the real world, but I believe it is enough to get the idea.

The person table contains the following columns:

  • person_id – used as primary key with auto increment
  • first_name
  • last_name
  • birth_date

The person_details table contains the following columns:

  • person_id – used as primary key and foreign key to person table (person_id column)
  • weight
  • height
  • hair_color
  • eyes_color

Note that there may be persons with no person details. That means that having a row in person table, but no row in person_details table is a trivial case. Of course that there may be at the most one person details row for each person.

This is how the Person class looks like using Hibernate Annotations:

package com.bashan.hibernate;
import org.hibernate.validator.Length;
import org.hibernate.validator.NotNull;
import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
@Entity
@Table(name="person")
public class Person implements Serializable {
  @Id
  @GeneratedValue(strategy= GenerationType.AUTO)
  @Column(name="person_id")
  private Integer personId;
  @Column(name="first_name")
  @NotNull
  @Length(max = 50)
  private String firstName;
  @Column(name="last_name")
  @NotNull
  @Length(max = 50)
  private String lastName;
  @Column(name="birth_date")
  private Date birthDate;
  @OneToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "person")
  @JoinColumn(name="person_id")
  private PersonDetails personDetails;
  public Integer getPersonId() {
    return personId;
  }
  public void setPersonId(Integer personId) {
    this.personId = personId;
  }
  public String getFirstName() {
    return firstName;
  }
  public void setFirstName(String firstName) {
    this.firstName = firstName;
  }
  public String getLastName() {
    return lastName;
  }
  public void setLastName(String lastName) {
    this.lastName = lastName;
  }
  public Date getBirthDate() {
    return birthDate;
  }
  public void setBirthDate(Date birthDate) {
    this.birthDate = birthDate;
  }
  public PersonDetails getPersonDetails() {
    return personDetails;
  }
  public void setPersonDetails(PersonDetails personDetails) {
    this.personDetails = personDetails;
  }
}

And the PersonDetails class:
package com.bashan.hibernate;
import org.hibernate.annotations.Cascade;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;
import javax.persistence.*;
@Entity
@Table(name="person_details")
public class PersonDetails {
  @Id
  @GeneratedValue(generator="foreign")
    @GenericGenerator(name="foreign", strategy = "foreign", parameters={
      @Parameter(name="property", value="person")
    })
  @Column(name="person_id")
  private Integer personId;
  @OneToOne(fetch = FetchType.LAZY, optional=true)
  @Cascade({org.hibernate.annotations.CascadeType.SAVE_UPDATE})
  @PrimaryKeyJoinColumn
  private Person person;
  @Column(name="weight")
  private Integer weight;
  @Column(name="height")
  private Integer height;
  @Column(name="hair_color")
  private Integer hardColor;
  @Column(name="eyes_color")
  private Integer eyesColor;
  public Integer getPersonId() {
    return personId;
  }
  public void setPersonId(Integer personId) {
    this.personId = personId;
  }
  public Person getPerson() {
    return person;
  }
  public void setPerson(Person person) {
    this.person = person;
  }
  public Integer getWeight() {
    return weight;
  }
  public void setWeight(Integer weight) {
    this.weight = weight;
  }
  public Integer getHeight() {
    return height;
  }
  public void setHeight(Integer height) {
    this.height = height;
  }
  public Integer getHardColor() {
    return hardColor;
  }
  public void setHardColor(Integer hardColor) {
    this.hardColor = hardColor;
  }
  public Integer getEyesColor() {
    return eyesColor;
  }
  public void setEyesColor(Integer eyesColor) {
    this.eyesColor = eyesColor;
  }
}

That’s pretty much it… I hope it will save you time…

Monday, April 6, 2009

Adding TLS support to Log4j SMTP Appender

SMTPAppender that comes with log4j is a pretty useful Appender, allowing easily to start getting email alerts for errors in your application. But, this class is missing one important property (well, maybe more than one...): TLS support. Most modern mail servers use TLS for sending mails. TLS (Transport Layer Security) is a secure way for transfering information between two machines. For example, if you are using Google Apps (or even if you have a regular Gmail account) and you would like to use your account (user name and password of course) to send mail using SMTPAppender you won't be able to do it. That is because, Google allows sending mails only using TLS.

In this post: "Sending Email alerts with Log4j – Controlled Alerts" I showed how log4j SMTPAppender class can be extended to allow email alerts to be more controlled. In this post: "Sending SMS alerts with Log4j using ipipi.com", I showed how log4j SMTPAppender can be extended to send SMS error messages using ipipi.com service.
Both posts use this
class: BaseFilteredSMTPAppender as a basic class for adding more neat capabilities to SMTPAppender.

I will show you how this class (BaseFilteredSMTPAppender) can be easily changed, to add the SMTPAppender TLS capabilities.
Unfortunatly, SMTPAppender class was not designed so well. It does not allow any control over the properties used for the creation of javax.mail.Session instance. In order to add TLS support to mail sending, we simply have to add to the javax.mail.Session class the following property:

props.put("mail.smtp.starttls.enable","true");
Where props is a simple Property instance containing mail properties.
And then we get the session instance, for example, by doing:
Session session = Session.getInstance(props);
But, as was said before, we have no access to the Properties instance, and therefore cannot add the TLS property.

Luckily, SMTPAppender does contain a protected method, for getting the Session instance: createSession. We can override this method and create a Session instance that contains TLS support. I copied the code of this method exactly as it was on the original SMTPAppender, and simply added the TLS property (note that TLS support is added only if user actually use the TLS property in the appender definition). This is how the class BaseFilteredSMTPAppender looks after adding the TLS support:

import org.apache.log4j.net.SMTPAppender;
import javax.mail.Authenticator;
import javax.mail.PasswordAuthentication;
import javax.mail.Session;
import java.util.*;
public abstract class BaseFilteredSMTPAppender extends SMTPAppender {
  private int timeFrame;
  private int maxEMails;
  protected long timeFrameMillis;
  protected Boolean isTLS;
  protected List<Date> exceptionDates = new ArrayList<Date>();
  public int getTimeFrame() {
    return timeFrame;
  }
  public void setTimeFrame(int timeFrame) {
    this.timeFrame = timeFrame;
  }
  public int getMaxEMails() {
    return maxEMails;
  }
  public void setMaxEMails(int maxEMails) {
    this.maxEMails = maxEMails;
  }
  public void setTLS(boolean isTLS) {
    this.isTLS = isTLS;
  }
  @Override
  public void activateOptions() {
    super.activateOptions();
    timeFrameMillis = timeFrame * 60 * 1000;
  }
  @Override
  protected Session createSession() {
    Properties props = null;
    try {
        props = new Properties (System.getProperties());
    } catch(SecurityException ex) {
        props = new Properties();
    }
    if (getSMTPHost() != null) {
      props.put("mail.smtp.host", getSMTPHost());
    }
    Authenticator auth = null;
    if(getSMTPUsername() != null && getSMTPPassword() != null) {
      props.put("mail.smtp.auth", "true");
      auth = new Authenticator() {
        protected PasswordAuthentication getPasswordAuthentication() {
          return new PasswordAuthentication(getSMTPUsername(), getSMTPPassword());
        }
      };
    }
    if (isTLS != null && isTLS)
    {
      props.put("mail.smtp.starttls.enable","true");
    }
    Session session = Session.getInstance(props, auth);
    if (getSMTPDebug()) {
        session.setDebug(getSMTPDebug());
    }
    return session;
  }
  protected void cleanTimedoutExceptions() {
    Date current = new Date();
    // Remove timedout exceptions
    Iterator<Date> itr = exceptionDates.iterator();
    while (itr.hasNext()) {
      Date exceptionDate = itr.next();
      if (current.getTime() - exceptionDate.getTime() > timeFrameMillis) {
        itr.remove();
      } else {
        break;
      }
    }
  }
  protected void addException() {
    exceptionDates.add(new Date());
  }
  protected boolean isSendMailAllowed() {
    return exceptionDates.size() < maxEMails;
  }
}

In order to use the Appender, only one additional parameter has to be added to the parameters already used and shown in the previous 2 blogs dealing with log4j SMTPAppender: TLS.

In order to make things a little interesting I will show you log4j configuration example using XML file instead of properties file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">  
   <appender name="console" class="org.apache.log4j.ConsoleAppender">
      <param name="Target" value="System.out"/>
      <layout class="org.apache.log4j.PatternLayout">
         <param name="ConversionPattern" value="%d{HH:mm:ss,SSS} %-5p [%c{1}] %m%n"/>
      </layout>
   </appender>
    <appender name="email" class="com.bashan.log4j.appender.FilteredSMTPAppender">
        <param name="BufferSize" value="10"/>
        <param name="SMTPHost" value="smtp.gmail.com"/>
        <param name="SMTPUsername" value="username@gmail.com"/>
        <param name="SMTPPassword" value="password"/>
        <param name="TLS" value="true"/>
        <param name="TimeFrame" value="10"/>
        <param name="MaxEMails" value="2"/>
        <param name="From" value="username@gmail.com"/>
        <param name="To" value="anotherUsername@gmail.com"/>
        <param name="Subject" value="Server Error"/>
        <layout class="org.apache.log4j.PatternLayout">
          <param name="ConversionPattern" value="%d{HH:mm:ss,SSS} %-5p [%c{1}] %m%n"/>
        </layout>
    </appender>  
    <root>
      <priority value="warn"/>
      <appender-ref ref="console"/>
      <appender-ref ref="email"/>
   </root>
</log4j:configuration>

This file can be dropped on your root src directory and log4j will know to find and load it automatically.

Note that TLS property is not mandatory. If you don't need TLS support, you can simply not add it to the appender properties.