An update on this re the google libphonenumber library. https://code.google.com/p/libphonenumber/
Our web developers have now implemented this to validate the number when it is entered by the user or our customer service. Apparently it works a treat. Sure there is a call to google but I've just been told it will validate just about any rubbish keyed in and reformat to the correct (what ever that may be) format. Another trade-off is that it apparently adds about 100k to the size of the page and also increases the page load time slightly but in our view the benefits outweigh this. So it looks like we'll be using this now and just storing the validated numbers in UV. Cheers Peter Peter Cheney Universe Engineer t 07 3017 8837 | f 07 3002 8400 e peter.che...@firstmac.com.au | w www.firstmac.com.au ________________________________________ From: u2-users-boun...@listserver.u2ug.org [u2-users-boun...@listserver.u2ug.org] on behalf of Peter Cheney [peter.che...@firstmac.com.au] Sent: Thursday, 11 July 2013 9:47 AM To: U2 Users List Subject: Re: [U2] Mobile phones Hi Symeon, Interestingly we're facing a similar issue here in Oz whereby we're wanting to send certain activation codes to our overseas clients for security purposes. Currently we're doing this for our local clients and apart from the odd "modem" failure, have no issues sending to domestic mobile numbers, sending to international mobiles is proving to be a headache particularly with number validation and certainty of delivery as others have mentioned. There is the cost associated with this too. Currently I think it is $0.50 per international SMS message and given that there's no guarantee of delivery success, the likelihood of repeated failed attempts is quite real. Searching around for possible solutions we found these which may be of interest to you: Firstly a possible regex solution to validate a number and the related discussions /^(\+|\d)[0-9]{7,16}$/; Reference: http://stackoverflow.com/questions/5066329/regex-for-valid-international-mobile-phone-number And then there's this phone number validator: https://code.google.com/p/libphonenumber/ I've only started playing with the regex this week so do not have a working solution yet and haven't really looked at the libphonenumber but it may be useful as a front end validation prior to storing the number in UV. One other thing I've considered is to not implement mobile number validation at all. If the number is prefixed with a + then it would be considered an international destination. As long as the remainder of the number is all numeric I can send it to our SMS gateway and job is done. We also have an alternative procedure/screen for customer service to use to circumvent the international SMS failures and edit/enable the related functions for those clients overseas. HTH Cheers Peter Peter Cheney Universe Engineer t 07 3017 8837 | f 07 3002 8400 e peter.che...@firstmac.com.au | w www.firstmac.com.au ________________________________________ From: u2-users-boun...@listserver.u2ug.org [u2-users-boun...@listserver.u2ug.org] on behalf of Symeon Breen [syme...@gmail.com] Sent: Wednesday, 10 July 2013 9:11 PM To: u2-users@listserver.u2ug.org Subject: [U2] Mobile phones Hi I have an application that is based in the UK, one of the things it does is allow entry of a phone number, I then determine if this is a mobile (cell phone) and send a text (easy in the uk as all mobiles begin with 07) We are embarking upon our first US client (well existing uk customer with a US presence) so my question is - how with US phone numbers can I determine if it is a cell phone ? Thanks Symeon. _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ------------------------------------------------------------------------------- Note: This email (inc all attachments) is for the use of the intended recipient(s) only. Privileged or confidential information may be contained in this communication. If you have received this email in error, please notify the sender immediately and then delete all copies of this message from your computer network. If you are not the intended recipient, you must not keep, use, disclose, copy or distribute this email without the author's prior permission. If you are the intended recipient and you do not wish to receive similar electronic messages from us in future, then please respond to the sender to this effect. We have taken precautions to minimise the risk of transmitting software viruses, but advise you to carry out your own virus checks on this email and its attachments. We do not accept liability for any loss or damage caused by software viruses and do not represent that this transmission is free from viruses or other defects. Firstmac Limited (ABN 59 094 145 963) (AFSL 290600) ------------------------------------------------------------------------------- _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ------------------------------------------------------------------------------- Note: This email (inc all attachments) is for the use of the intended recipient(s) only. Privileged or confidential information may be contained in this communication. If you have received this email in error, please notify the sender immediately and then delete all copies of this message from your computer network. If you are not the intended recipient, you must not keep, use, disclose, copy or distribute this email without the author's prior permission. If you are the intended recipient and you do not wish to receive similar electronic messages from us in future, then please respond to the sender to this effect. We have taken precautions to minimise the risk of transmitting software viruses, but advise you to carry out your own virus checks on this email and its attachments. We do not accept liability for any loss or damage caused by software viruses and do not represent that this transmission is free from viruses or other defects. Firstmac Limited (ABN 59 094 145 963) (AFSL 290600) ------------------------------------------------------------------------------- _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users