agileBase has had basic support for phone number recognition for some time – if you enter a phone number it will recognise the area code and tell you the town in the view tab.
Now a developer Ian Galpin @g1smd has taken an interest and contributed a number of patches to the code that greatly improve the recognition and allow auto-formatting. Full details from him are here.
Ian has previously worked on Google’s libphonenumber project which Android phones use to recognise / format phone numbers as well as other open source projects such as the Asterix telephony project.
To take advantage of this work, location information now appears as a tooltip when you hover over a phone number when editing a record.
It was an interesting programming exercise helping out with implementing this functionality, and it needed careful preparation of a number of Regular Expressions.
I based much of it on the details found in the article at:
http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_UK_Telephone_Numbers
with some simplification of several of the patterns.
Having a mainly PHP background, suddenly having to code in Java was a bit of a shock to the system! Thankfully Oliver was patient in finding and fixing the various typos and a couple of minor logic errors caused by my unfamiliarity with the correct Java code syntax.
If there are any questions, or any bugs remaining, let me know.