Philippine Numbering/Dialing Plan

After messing about at length trying to find an authoritive source for this information and finding that nothing seemed to exist... Here's what information I have... let me know if you are aware of any issues.

Overview

The country code for the Philippines is 63.
The international trunk access code is 00.
The national/long distance trunk access code is 0.
Subscriber numbers within an area code are typically 7 digits long, while area codes can vary in length from 1 digit to 3 digits, as such, phone numbers are not of a fixed length.
Within an area code the 7 digit subscriber number can be dialled without the area code or national/long distance trunk access code.

Numbers should be written in one of the following formats
For landline access within a single area code only:
<subscriber number> e.g. 1234567 or 123 4567
For access from any phone in the country:
<national/long distance trunk access code><areacode> <subscriber number> e.g. 02 1234567 or 02 123 3456
For access from anywhere in the world:
+<country code> <area code> <subscriber number> e.g. +63 2 1234567 or +63 2 123 4567
A less correct form of the above that could be used to make it easier for people to see where the national/long distance trunk access code should be placed:
+<country code> (<national/long distance trunk access code>)<area code> <subscriber number> e.g. +63 (0)2 1234567 or +63 (0)2 123 4567

Numbers SHOULD NOT be written in the following screwed up format which only seems to exist to make Metro Manila numbers look like US numbers...
(<country code><area code>) <subscriber number> e.g. (632) 123 4567 - that's just wrong...

Area Codes

Summary

1 - Unassigned/Reserved
2, 3X, 4X, 5X, 6X, 7X, 8X - Landlines
9XX - Mobile phones

Details

2 XXX XXXX - Metro Manila / NCR, Rizal & Obando (Bulacan)
32 XXX XXXX - Cebu
33 XXX XXXX - Guimaras & Iloilo
34 XXX XXXX - Negros Occidental
35 XXX XXXX - Negros Oriental & Siquijor
36 XXX XXXX - Aklan, Antique & Capiz
38 XXX XXXX - Bohol

42 XXX XXXX - Aurora, Marinduque, Quezon & Romblon
43 XXX XXXX - Batangas, Occidental Mindoro, Oriental Mindoro
44 XXX XXXX - Bulacan (except Obando) & Neuva Ecija
45 XXX XXXX - Pampanga & Tarlac
46 XXX XXXX - Cavite
47 XXX XXXX - Bataan & Zambales
48 XXX XXXX - Palawan
49 XXX XXXX - Laguna

52 XXX XXXX - Albay & Catanduanes
53 XXX XXXX - Biliran, Leyte & Southern Leyte
54 XXX XXXX - Camarines Norte & Camarines Sur
55 XXX XXXX - Eastern Samar, Northern Samar, Western Samar
56 XXX XXXX - Masbate & Sorsogon

62 XXX XXXX - Basilan, Zamboanga del Sur & Zamboanga Sibugay
63 XXX XXXX - Lanao del Norte, Lanao del Sur
64 XXX XXXX - Cotabato, Maguindanao & Sultan Kudarat
65 XXX XXXX - Zamboanga del Norte
68 XXX XXXX - Sulu & Tawi-Tawi

72 XXX XXXX - La Union
74 XXX XXXX - Cordillera Administrative Region (Abra, Apayao, Benguet, Ifugao, Kalinga, Mountain Province)
75 XXX XXXX - Pangasinan
77 XXX XXXX - Ilocos Norte & Ilocos Sud
78 XXX XXXX - Cagayan Valley

817 XXX XXXX - Globe Telecom (International Virtual Numbers - DUO PLUS) - To confirm length
82 XXX XXXX - Davao del Sur
83 XXX XXXX - Sarangani & South Cotabato
84 XXX XXXX - Davao del Norte
85 XXX XXXX - Agusan del Norte & Agusan del Sur
86 XXX XXXX - Surigao del Norte & Surigao del Sur
87 XXX XXXX - Compostela Valley & Davao Central
88 XXX XXXX - Bukidnon, Camiguin, Misamis Occidental & Misamis Oriental

905 XXX XXXX - Globe Telecom (Mobile)
906 XXX XXXX - Globe Telecom (Mobile)
907 XXX XXXX - Smart Communications (Mobile)
908 XXX XXXX - Smart Communications (Mobile)
909 XXX XXXX - Smart Communications (Mobile)
910 XXX XXXX - Smart Communications (Mobile)
912 XXX XXXX - Smart Communications (Mobile)
915 XXX XXXX - Globe Telecom (Mobile)
916 XXX XXXX - Globe Telecom (Mobile)
917 XXX XXXX - Globe Telecom (Mobile)
918 XXX XXXX - Smart Communications (Mobile)
919 XXX XXXX - Smart Communications (Mobile)
920 XXX XXXX - Smart Communications (Mobile)
921 XXX XXXX - Smart Communications (Mobile)
922 XXX XXXX - Sun Cellular (Mobile)
923 XXX XXXX - Sun Cellular (Mobile)
925 XXX XXXX - Sun Cellular (Mobile)
926 XXX XXXX - Globe Telecom (Mobile)
927 XXX XXXX - Globe Telecom (Mobile)
928 XXX XXXX - Smart Communications (Mobile)
929 XXX XXXX - Smart Communications (Mobile)
930 XXX XXXX - Smart Communications (Mobile)
932 XXX XXXX - Sun Cellular (Mobile)
933 XXX XXXX - Sun Cellular (Mobile)
934 XXX XXXX - Sun Cellular (Mobile)
935 XXX XXXX - Globe Telecom (Mobile)
936 XXX XXXX - Globe Telecom (Mobile)
937 XXX XXXX - Globe Telecom/ABS-CBN (Mobile)
938 XXX XXXX - Smart Communications (Mobile)
939 XXX XXXX - Smart Communications (Mobile)
942 XXX XXXX - Sun Cellular (Mobile)
943 XXX XXXX - Sun Cellular (Mobile)
946 XXX XXXX - Smart Communications (Mobile)
947 XXX XXXX - Smart Communications (Mobile)
948 XXX XXXX - Smart Communications (Mobile)
949 XXX XXXX - Smart Communications (Mobile)
950 XXX XXXX - Smart Communications (Mobile)
975 XXX XXXX - Globe Telecom (Mobile)
977 XXX XXXX - Globe Telecom (Mobile)
989 XXX XXXX - Smart Communications (Mobile)
994 XXX XXXX - Globe Telecom (Mobile)
995 XXX XXXX - Globe Telecom (Mobile)
996 XXX XXXX - Globe Telecom (Mobile)
997 XXX XXXX - Globe Telecom (Mobile)
998 XXX XXXX - Smart Communications (Mobile)
999 XXX XXXX - Smart Communications (Mobile)

Special Numbers

Emergency numbers

The national standard emergency number is 117. This can also be texted from mobile phones.
From mobile phones at least 112 and 911 can also used.
In addition there are a large number of individual hotline numbers used for various emergency services, 3 and 5 digit numbers exist.
e.g.
116 - Tourist police ??
166 - Old national emergency number ??
757 - Fire and Police ??
16-211 - Meralco hotline for emergencies and customer service
16-911 - Lifeline Rescue emergency ambulance service within Metro Manila only

Freephone/Tollfree numbers

Free to call/Toll free numbers are few and far between in the Philippines... a major reason would likely be that calls are typically free within an area code, so if you are in Metro Manila you can call everyone else in Metro Manila with a landline for free... Another reason has to be the obviously screwed up ways they've been implemented...
Format a)
1800 <8 digit number> e.g. 1800 1234 5678
Format b)
1027 1800 <7 digit number> e.g. 1027 1800 123 4567
Both formats make very little sense...

Hotlines

There are a number of additional hotlines in addition to the emergency numbers above, some are free, others aren't... Some of those are...

1342 - LTFRB 24/7 hotline
136 - MMDA hotline
143 - Red Cross hotline
161 - Marikina Station Tactical Operations Center (STOC) hotline
1627 - Manila Water hotline
165-02 - Department of Public Works and Highways (DPWH) hotline
171 - PLDT customer service hotline (tollfree - 8-7 mon-fri, 8-5 sat/sun)
172 - PLDT DSL helpdesk (tollfree - 24hrs)
173 - PLDT repair service hotline (tollfree - 8-7 mon-fri, 8-5 sat/sun)
187 - PLDT directory assistance (3 pesos per transaction - 8-5 7days/week)
7890 - DOTC Public Assistance Center hotline

PLDT #MyNumber

PLDT in early 2016 introduced a strange new national hotline service called #MyNumber. It's strange due to the fact that numbers start with '#' followed by 4-8 digits.

e.g.
#87000 - Jollibee

Asterisk style dialplan


;
; Sample dialplan below based on dialing 9 for an outside line intending to catch most options for calls in the Philippines
; You'd need to include these in whatever contexts you inject calls from phones/users/lines into
;

;
; Emergency hotline numbers that you probably want to be callable from all devices
;
[trunkemergency]
exten => 9112,1,Gosub(trunkdial,s,1(${GLOBAL(TRUNK)},${EXTEN:${GLOBAL(TRUNKMSD)}}))
exten => 9116,1,Gosub(trunkdial,s,1(${GLOBAL(TRUNK)},${EXTEN:${GLOBAL(TRUNKMSD)}}))
exten => 9117,1,Gosub(trunkdial,s,1(${GLOBAL(TRUNK)},${EXTEN:${GLOBAL(TRUNKMSD)}}))
exten => 9166,1,Gosub(trunkdial,s,1(${GLOBAL(TRUNK)},${EXTEN:${GLOBAL(TRUNKMSD)}}))
exten => 9177,1,Gosub(trunkdial,s,1(${GLOBAL(TRUNK)},${EXTEN:${GLOBAL(TRUNKMSD)}}))
exten => 9757,1,Gosub(trunkdial,s,1(${GLOBAL(TRUNK)},${EXTEN:${GLOBAL(TRUNKMSD)}}))
exten => 9911,1,Gosub(trunkdial,s,1(${GLOBAL(TRUNK)},${EXTEN:${GLOBAL(TRUNKMSD)}}))
exten => _916XXX,1,Gosub(trunkdial,s,1(${GLOBAL(TRUNK)},${EXTEN:${GLOBAL(TRUNKMSD)}}))

;
; To external international numbers prefixed by 9 and 00 international access code, 9 and + or just +
;
[trunkint]
exten => _900.,1,Verbose(2, International call to ${EXTEN:${GLOBAL(TRUNKMSD)}})
exten => _900.,n,Gosub(trunkdial,s,1(${GLOBAL(TRUNK)},${EXTEN:${GLOBAL(TRUNKMSD)}}))
exten => _9+.,1,Verbose(2, International call to ${EXTEN:${GLOBAL(TRUNKMSD)}})
exten => _9+.,n,Gosub(trunkdial,s,1(${GLOBAL(TRUNK)},${EXTEN:${GLOBAL(TRUNKMSD)}}))
exten => _+.,1,Verbose(2, International call to ${EXTEN})
exten => _+.,n,Gosub(trunkdial,s,1(${GLOBAL(TRUNK)},${EXTEN}))

;
; To external national numbers
;
[trunknational]
exten => _90063[1345678].,1,Goto(90${EXTEN:5},1)
exten => _9+63[1345678].,1,Goto(90${EXTEN:4},1)
exten => _+63[1345678].,1,Goto(90${EXTEN:3},1)
exten => _90[1345678].,1,Verbose(2, National call to ${EXTEN:${GLOBAL(TRUNKMSD)}})
exten => _90[1345678].,n,Gosub(trunkdial,s,1(${GLOBAL(TRUNK)},${EXTEN:${GLOBAL(TRUNKMSD)}}))

;
; To mobile phones
;
[trunkmobile]
exten => _900639XXXXXXXXX,1,Goto(90${EXTEN:5},1)
exten => _9+639XXXXXXXXX,1,Goto(90${EXTEN:4},1)
exten => _+639XXXXXXXXX,1,Goto(90${EXTEN:3},1)

; Globe
exten => _9090[56]XXXXXXX,1,Verbose(2, Mobile call to Globe phone ${EXTEN:1})
exten => _9090[56]XXXXXXX,n,Gosub(trunkdial,s,1(${GLOBAL(TRUNK)},${EXTEN:${GLOBAL(TRUNKMSD)}}))
exten => _9091[567]XXXXXXX,1,Verbose(2, Mobile call to Globe phone ${EXTEN:1})
exten => _9091[567]XXXXXXX,n,Gosub(trunkdial,s,1(${GLOBAL(TRUNK)},${EXTEN:${GLOBAL(TRUNKMSD)}}))
exten => _9092[67]XXXXXXX,1,Verbose(2, Mobile call to Globe phone ${EXTEN:1})
exten => _9092[67]XXXXXXX,n,Gosub(trunkdial,s,1(${GLOBAL(TRUNK)},${EXTEN:${GLOBAL(TRUNKMSD)}}))
exten => _9093[567]XXXXXXX,1,Verbose(2, Mobile call to Globe phone ${EXTEN:1})
exten => _9093[567]XXXXXXX,n,Gosub(trunkdial,s,1(${GLOBAL(TRUNK)},${EXTEN:${GLOBAL(TRUNKMSD)}}))
exten => _9097[57]XXXXXXX,1,Verbose(2, Mobile call to Globe phone ${EXTEN:1})
exten => _9097[57]XXXXXXX,n,Gosub(trunkdial,s,1(${GLOBAL(TRUNK)},${EXTEN:${GLOBAL(TRUNKMSD)}}))
exten => _9099[467]XXXXXXX,1,Verbose(2, Mobile call to Globe phone ${EXTEN:1})
exten => _9099[467]XXXXXXX,n,Gosub(trunkdial,s,1(${GLOBAL(TRUNK)},${EXTEN:${GLOBAL(TRUNKMSD)}}))

; Smart/PLDT
exten => _9090[789]XXXXXXX,1,Verbose(2, Mobile call to Smart phone ${EXTEN:1})
exten => _9090[789]XXXXXXX,n,Gosub(trunkdial,s,1(${GLOBAL(TRUNK)},${EXTEN:${GLOBAL(TRUNKMSD)}}))
exten => _9091[0289]XXXXXXX,1,Verbose(2, Mobile call to Smart phone ${EXTEN:1})
exten => _9091[0289]XXXXXXX,n,Gosub(trunkdial,s,1(${GLOBAL(TRUNK)},${EXTEN:${GLOBAL(TRUNKMSD)}}))
exten => _9092[0189]XXXXXXX,1,Verbose(2, Mobile call to Smart phone ${EXTEN:1})
exten => _9092[0189]XXXXXXX,n,Gosub(trunkdial,s,1(${GLOBAL(TRUNK)},${EXTEN:${GLOBAL(TRUNKMSD)}}))
exten => _9093[089]XXXXXXX,1,Verbose(2, Mobile call to Smart phone ${EXTEN:1})
exten => _9093[089]XXXXXXX,n,Gosub(trunkdial,s,1(${GLOBAL(TRUNK)},${EXTEN:${GLOBAL(TRUNKMSD)}}))
exten => _9094[6789]XXXXXXX,1,Verbose(2, Mobile call to Smart phone ${EXTEN:1})
exten => _9094[6789]XXXXXXX,n,Gosub(trunkdial,s,1(${GLOBAL(TRUNK)},${EXTEN:${GLOBAL(TRUNKMSD)}}))
exten => _90950XXXXXXX,1,Verbose(2, Mobile call to Smart phone ${EXTEN:1})
exten => _90950XXXXXXX,n,Gosub(trunkdial,s,1(${GLOBAL(TRUNK)},${EXTEN:${GLOBAL(TRUNKMSD)}}))
exten => _90989XXXXXXX,1,Verbose(2, Mobile call to Smart phone ${EXTEN:1})
exten => _90989XXXXXXX,n,Gosub(trunkdial,s,1(${GLOBAL(TRUNK)},${EXTEN:${GLOBAL(TRUNKMSD)}}))
exten => _9099[89]XXXXXXX,1,Verbose(2, Mobile call to Smart phone ${EXTEN:1})
exten => _9099[89]XXXXXXX,n,Gosub(trunkdial,s,1(${GLOBAL(TRUNK)},${EXTEN:${GLOBAL(TRUNKMSD)}}))

exten => _90999XXXXXXX,1,Verbose(2, Mobile call to Smart (U Phone) phone ${EXTEN:1})
exten => _90999XXXXXXX,n,Gosub(trunkdial,s,1(${GLOBAL(TRUNK)},${EXTEN:${GLOBAL(TRUNKMSD)}}))

; Sun/PLDT
exten => _9092[235]XXXXXXX,1,Verbose(2, Mobile call to Sun phone ${EXTEN:1})
exten => _9092[235]XXXXXXX,n,Gosub(trunkdial,s,1(${GLOBAL(TRUNK)},${EXTEN:${GLOBAL(TRUNKMSD)}}))
exten => _9093[234]XXXXXXX,1,Verbose(2, Mobile call to Sun phone ${EXTEN:1})
exten => _9093[234]XXXXXXX,n,Gosub(trunkdial,s,1(${GLOBAL(TRUNK)},${EXTEN:${GLOBAL(TRUNKMSD)}}))
exten => _9094[23]XXXXXXX,1,Verbose(2, Mobile call to Sun phone ${EXTEN:1})
exten => _9094[23]XXXXXXX,n,Gosub(trunkdial,s,1(${GLOBAL(TRUNK)},${EXTEN:${GLOBAL(TRUNKMSD)}}))

; Unknown
exten => _909XXXXXXXXX,1,Verbose(2, Mobile call to unknown operator phone ${EXTEN:1})
exten => _909XXXXXXXXX,n,Gosub(trunkdial,s,1(${GLOBAL(TRUNK)},${EXTEN:${GLOBAL(TRUNKMSD)}}))

;
; To local numbers
;
[trunklocal]
exten => _900632XXXXXXX,1,Goto(90${EXTEN:5},1)
exten => _9+632XXXXXXX,1,Goto(90${EXTEN:4},1)
exten => _+632XXXXXXX,1,Goto(90${EXTEN:3},1)

exten => _902XXXXXXX,1,Verbose(2, Local call to ${EXTEN})
exten => _902XXXXXXX,n,Gosub(trunkdial,s,1(${GLOBAL(TRUNK)},${EXTEN:${GLOBAL(TRUNKMSD)}}))

exten => _9ZXXXXXX,1,Verbose(2, Local call to ${EXTEN})
exten => _9ZXXXXXX,n,Gosub(trunkdial,s,1(${GLOBAL(TRUNK)},${EXTEN:${GLOBAL(TRUNKMSD)}}))

exten => _9ZXXXX,1,Verbose(2, Local call to ${EXTEN})
exten => _9ZXXXX,n,Gosub(trunkdial,s,1(${GLOBAL(TRUNK)},${EXTEN:${GLOBAL(TRUNKMSD)}}))

;
; Short code hotlines
;
[trunkhotlines]
exten => 9136,1,Verbose(2, Hotline call to MMDA hotline ${EXTEN})
exten => 9136,n,Gosub(trunkdial,s,1(${GLOBAL(TRUNK)},${EXTEN:${GLOBAL(TRUNKMSD)}}))
exten => 9143,1,Verbose(2, Hotline call to Red Cross hotline ${EXTEN})
exten => 9143,n,Gosub(trunkdial,s,1(${GLOBAL(TRUNK)},${EXTEN:${GLOBAL(TRUNKMSD)}}))
exten => 9161,1,Verbose(2, Hotline call to Marikina STOC hotline ${EXTEN})
exten => 9161,n,Gosub(trunkdial,s,1(${GLOBAL(TRUNK)},${EXTEN:${GLOBAL(TRUNKMSD)}}))
exten => 91627,1,Verbose(2, Hotline call to Manila Water hotline ${EXTEN})
exten => 91627,n,Gosub(trunkdial,s,1(${GLOBAL(TRUNK)},${EXTEN:${GLOBAL(TRUNKMSD)}}))
exten => 916502,1,Verbose(2, Hotline call to DPWH hotline ${EXTEN})
exten => 916502,n,Gosub(trunkdial,s,1(${GLOBAL(TRUNK)},${EXTEN:${GLOBAL(TRUNKMSD)}}))
exten => _917[1-3],1,Verbose(2, Hotline call to PLDT hotline ${EXTEN})
exten => _917[1-3],n,Gosub(trunkdial,s,1(${GLOBAL(TRUNK)},${EXTEN:${GLOBAL(TRUNKMSD)}}))
exten => 91342,1,Verbose(2, Hotline call to LTFRB hotline ${EXTEN})
exten => 91342,n,Gosub(trunkdial,s,1(${GLOBAL(TRUNK)},${EXTEN:${GLOBAL(TRUNKMSD)}}))
exten => 97890,1,Verbose(2, Hotline call to DOTC hotline ${EXTEN})
exten => 97890,n,Gosub(trunkdial,s,1(${GLOBAL(TRUNK)},${EXTEN:${GLOBAL(TRUNKMSD)}}))

; PLDT #MyNumber national hotlines, 4-8 digits after #
exten => _9#XXXX,1,Verbose(2, National #MyNumber call to ${EXTEN:${GLOBAL(TRUNKMSD)}})
exten => _9#XXXX,n,Gosub(trunkdial,s,1(${GLOBAL(TRUNK)},${EXTEN:${GLOBAL(TRUNKMSD)}}))
exten => _9#XXXXX,1,Verbose(2, National #MyNumber call to ${EXTEN:${GLOBAL(TRUNKMSD)}})
exten => _9#XXXXX,n,Gosub(trunkdial,s,1(${GLOBAL(TRUNK)},${EXTEN:${GLOBAL(TRUNKMSD)}}))
exten => _9#XXXXXX,1,Verbose(2, National #MyNumber call to ${EXTEN:${GLOBAL(TRUNKMSD)}})
exten => _9#XXXXXX,n,Gosub(trunkdial,s,1(${GLOBAL(TRUNK)},${EXTEN:${GLOBAL(TRUNKMSD)}}))
exten => _9#XXXXXXX,1,Verbose(2, National #MyNumber call to ${EXTEN:${GLOBAL(TRUNKMSD)}})
exten => _9#XXXXXXX,n,Gosub(trunkdial,s,1(${GLOBAL(TRUNK)},${EXTEN:${GLOBAL(TRUNKMSD)}}))
exten => _9#XXXXXXXX,1,Verbose(2, National #MyNumber call to ${EXTEN:${GLOBAL(TRUNKMSD)}})
exten => _9#XXXXXXXX,n,Gosub(trunkdial,s,1(${GLOBAL(TRUNK)},${EXTEN:${GLOBAL(TRUNKMSD)}}))

;
; Long distance context accessed through trunk interface
;
[trunktollfree]
exten => _91800XXXXXXXX,1,Verbose(2, Toll Free call to ${EXTEN})
exten => _91800XXXXXXXX,n,Gosub(trunkdial,s,1(${GLOBAL(TRUNK)},${EXTEN:${GLOBAL(TRUNKMSD)}}))