Processing of Phone Numbers
Thredd processes telephone numbers in the API as follows:
- Deletes all special characters, including spaces, left and right parenthesis (i.e. brackets), and hyphens “-“.
- Deletes all leading non-numeric characters except “+”. Non-leading non-numeric characters (e.g. “-“) are not removed.
- Depending on the country, the national (domestic/inter-regional within a country) dialling prefix (e.g. single zero for many countries such as the UK, France, Spain, Australia) is dropped and "+" and the IDD (International Direct Dialing) number is prefixed. For example:
- London, UK: 020 7292 2400 is changed to +442072922400
- Lyon, France: 04 72 12 34 56 78 is changed to +3347212345678
- Kuala Lumpur, Malaysia: 03 2123 4567 is changed to +60321234567
- Mobile number, Spain: 0612 345 678 is changed to +34612345678
- Sydney, Australia: 02 7010 1111 is changed to +61270101111
- If there is a "+" prefix, Thredd checks if the digits which follow match the IDD number of the specified country. If they don't match, nothing is done. If they do match, Thredd checks if the digits which follow match the national dialling prefix (e.g. single zero for many countries such as UK, France, Spain, Australia). If they do match, the national dialling prefix is dropped. For example:
- London, UK: +44 020 7292 2400 is changed to +442072922400
- Lyon, France: +33 04 72 12 34 56 78 is changed to +3347212345678
- Kuala Lumpur, Malaysia: +60 03 2123 4567 is changed to +60321234567
- Mobile number, Spain: +34 0612 345 678 is changed to +34612345678
- Sydney, Australia: +61 02 7010 1111 is changed to +61270101111
- If there is no leading "+" or national dialling prefix, the phone number is stored as it is.
Updated 16 days ago