Formatting phone numbers for Australia
ایہہ 31؍December 2018ء English وچ «exiy» لیکھ چھپیا گیا سی۔I recently took to completing some of the tasks in the one of the challenges on MapRoulette named Phone or fax number is not in international format (Australia).
The purpose of this entry is to detail my findings in undertaking this challenge relating to the formatting of phone numbers in Australia for OpenStreetMap.
ITU-T E.164 phone number formatting
The formatting as defined in the wiki follows this pattern:
+<country code> <area code> <local number>
This is the ITU-T E.123 and the DIN 5008 pattern and is the assumed preferred pattern given the RFC 3966/NANP pattern is parenthesised and provided secondary on the wiki entry, in addition, the NANP pattern refers to North American use.
Country/area codes for Australia
Using information from the Australian Government website and the Wikipedia page titled Telephone numbers in Australia the following was identified as relating to the above pattern:
The country code for Australia is 61
and applies to both phone numbers and mobile numbers.
The area codes are for sets of states in Australia. These are; New South Wales and Australian Capital Territory as 02
, Victoria and Tasmania as 03
, Queensland as 07
, Western Australia, South Australia and Northern Territory as 08
and applies for phone numbers but not mobile numbers.
The area code for mobile numbers is 04
regardless of state.
The leading 0
in each area code is only retained when calling nationally, whereas when calling internationally (as is the practice for the pattern of phone numbers in OpenStreetMap) the leading 0
is left out.
Examples of Australian formatting
For phone numbers:
+61 x xxxx xxxx
For mobile phones:
+61 4xx xxx xxx