Proposed automated edit of phone numbers in Austria

This follows on from Telefonnummern-Report für Österreich

Motivation

Phone numbers keep being added to OSM which are not in the agreed format, which includes a country code and excludes most punctuation. This makes it difficult to find actual issues with phone numbers, such as where a number has been transcribed incorrectly in a way that makes it invalid.

I have created the Phone Report website which suggests fixes to phone numbers and identifies invalid phone numbers. This has been in use over recent months to fix many phone numbers. Some of those changes are very simple and similar to each other and could be made automatically.

Making automatic changes in simple cases saves mappers’ time and allows them to spend time on identifying and fixing actually invalid phone numbers.

Proposal

I propose to run an ongoing automated edit on objects with phone, contactːphone, mobile, contactːmobile, phoneːmobile, fax , contactːfax or contactːwhatsapp in Austria to reformat phone numbers which have extra punctuation or are missing the country code to international phone format, including the country code and with spaces in the number.

This automated edit has already been discussed and accepted in the US, UK, Canada and Switzerland and is running there.

Edits

Edits will only be made if all of the following applyː

  • The value in the phone tag consists of only digits, spaces, parentheses, forward slashes, periods or invisible formatting marks such as non-breaking spaces and zero-width spaces

  • The value can be parsed using libphonenumber-js assuming an Austrian country code

  • The new number is a valid phone number

  • The new number is an Austrian number with +43 country code

  • The new number is different by more than just the addition or removal of spaces, for example a country code was added or punctuation was removed.

  • The OSM element does not contain any duplicate phone numbers

  • The new phone number is not classified as a non-mobile phone number in a mobile tag.

  • And only if all of the above applies to every phone tag on the object

This is a subset of the suggested fixes on Phone Report, in particular it excludes any tag with multiple numbers, the duplicate and non-mobile number checks, any numbers with extensions, any with dashes/hyphens or any with letters.

Number of Objects Affected

Today there is only 1 element with a fixable number, as all other simple cases have been fixed in the past month. There seem to be typically 2 or 3 new invalid numbers per day.

Grouping of Edits

Edits would be grouped by region, with up to one changeset per region per day.

Examples of edits that would and would not be made

Edits that would be made automatically by the bot

n2353487015 phone=018157967 to phone=+43 1 8157967

Edits that are suggested by the website but not made automatically

I don’t have any specific examples right now, as all of the simple cases have been cleaned up. But the main one would be anything with hyphens as these can be used to denote extensions, and whilst these have special handling (see the other thread), there could still be errors in the suggested fixes there.

Objects not detected as issues

w131247479: phone=+431740200

This is not in the target format, but is still valid.

Timescale

I will wait at least 10 days, until 2026-02-19, for any comments before commencing this edit.

Wiki Page

2 Likes

I agree :+1:t3:

Sounds like a decent improvement. I agree.

I agree! :+1:

I used the website to fix and validate a lot of numbers, and the edit rules are sufficiently strict to guarantee no damage to the database! @confusedbuffalo also has been very responsive to our improvement suggestions and requests and the whole process has been a pleasure! :star_struck:

3 Likes

Sounds good for me too.

Can you estimate how many numbers that will change?
I’m sure it will improve data quality.

Tatsächlich nur wenige pro Tag. Und pro Bundesland separat. Du kannst den aktuell Stand hier (jeden morgen neu) anschauen: OSM Telefonnummern-Validierung Bericht - Austria

Es wären lediglich die Nummern, die unter "XX möglicherweise behebbar) stehen. Da kommen aktuell wirklich nur “Live-Edits” dazu. Also wenn heute eine “fehlerhafte” Telefonnummer in Österreich in OSM ergänzt wird, wird sie morgen früh (nach dem nächtlichen Ausführen) im Tool angezeigt, bzw. dann vom Bot behoben. Wenn natürlich an einem Tag 5000 Telefonnummern falsch eingetragen werden, dann macht der Bot auch 5000 Änderungen.

Genauso steht es auch oben im Text:

1 Like

Werden jene Mapper, die eine fehlerhafte Nummer eintragen, über die Korrektur informiert? ZB per Changeset-Kommentar.

Das wäre gut, weil sie sonst gar nicht mitbekämen, dass sie was falsch gemacht haben und dann keine Chance hätten, es in Zukunft besser zu machen.

Ich glaube nicht das der Bot sowas macht.

IMHO auch nicht nötig. Der Bot macht nur triviale Formatierungsanpassungen.

Echte Fehler müssen sowieso händisch repariert werden.

3 Likes

I am treating this proposal as approved and therefore plan to enable the bot from tomorrow’s run, having left this open for discussion for 10 days as initially stated.

4 Likes

The first edits have been made by the bot, and everything you now see on the website are numbers that cannot be automatically fixed.

2 Likes

Thanks a lot @confusedbuffalo!

I just fixed the last five invalid numbers, so hopefully tomorrow, everything will show up clean :)

1 Like

I don’t quite think removing the contact: prefix counts as fixing the phone numbers, but let’s see how many are still invalid tomorrow.

If you look closely, you will see all number have changed (not only the prefix), e.g. 0644 → 0664 ;)

1 Like


and we are done :)

4 Likes