Closed (duplicate)
Project:
SMS Framework
Version:
5.x-1.x-dev
Component:
Core Framework
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Dec 2007 at 10:08 UTC
Updated:
6 May 2009 at 09:49 UTC
European cell phone numbers often exceed the ten digits limit.
Additionaly it would be nice to allow + for internationalized notation in the form of +00 000 0000000.
Comments
Comment #1
Will White commentedCurrently we use a dropdown country selector to capture the country code and then ask for the remaining ten digits. This is how it has been done on Clickatel's website: http://www.clickatell.com/products/test_gateway.php
A better explanation about this is needed in the UI, but does this functionality work?
Comment #2
Will White commentedMoving up to higher priority. I think the problem here is lack of knowledge and research. International numbering systems are not well documented at all. I think the current validation logic is just too constrictive. It's going to have to be less picky in order to support the immense variety in international numbering schemes.
Another issue is that the format that the site needs to use to send message depends not only on the locale of the recipient, but also on that of the site's SMS gateway. For example, say I have US mobile number. A site based in UK will need to capture my number in a different format than a site based in the US.
What solutions to these problems are already in use by other SMS enabled sites?
A temporary solution would be to increase the limit in the sms_formatter() function to from 10 to 16 or so.
Comment #3
Will White commentedComment #4
sanduhrsI found some documentation on Wikipedia [1].
It seems they defined a maximum of 15 digits and an additional + for international telephone numbers.
As the validation most probably is gateway specific, from my point of view it should be left to the gateway.module to validate the numbers.
[1] http://en.wikipedia.org/wiki/E.164
Comment #5
mdowsett commentedsubscribing
Comment #6
asak commentedsubscribing
Comment #7
malaussene commentedHola,
I worked on a similar issue a few years ago with multiple SMS gateway.
Depending on the gateway that we were using, the phone number had to be formatted in mostly in international or national.
The only reliable way we found was to store the phone number in its international format and then overwrite it in the gateway specific code.
The main problem was to try to validate/format the phone number
I noted that the module at http://drupal.org/project/phone has some validation and format function that might be extended into a general phone API.
I would definitely be interested in implementing such an API.
any thoughts ?
Comment #8
seutje commentedgee, if I knew this thing wasn't meant to work outside US, I would of never bothered to look into it
Comment #9
Will White commentedDoes the increased limit to 16 digits in HEAD help? Validation isn't as tight but I was aiming for it to at least work.
Keep in mind that you must add countries to the Clickatel module or new carriers to the email_gateway module in order to use this.
Can anyone report having successfully used the framework outside of the US & Canada? If so please share how you did it and we will work to make it easier.
Comment #10
patrickharris commentedTo get it working for New Zealand, I had to change the
< 10on line 318 of sms.module to< 9.Comment #11
asak commentedpatrickharris: Did you use the HEAD version, with the change mentioned by diggersf in comment #9 ?
I'm gonna give this a try...
Comment #12
asak commentedOk so i've tested the HEAD version for 5.x but still not good.
I had to apply the patch from here to get the errors gone, and add my country manually to the list.
Then i tried sending in various formats, none gave me any error and all passed validation, but none provided a solution since no msg has been sent and there is nothing in the clickatell log. sometimes after submission of /user/me/mobile i get a 'page not found' which is very strange.
I tried 00972541234567 , 972541234567 , 541234567 , +972541234567 - none work.
Ideas...?
Comment #13
Will White commentedThis patch has been applied. Please see if it addresses your issue. If not, please open a new issue. Thanks!
Comment #14
jcmarco commentedThere is still a problem with the international number length validation.
As patrickharris says at #10 in New Zealand is <9, as in Spain. At most European countries the mobile phone numbers have this format: xxx-xx-xx-xx, a total of 9 numbers.
But for every country this length will be different. So we could add a new field together the country code and country name, saying this length or it will be hard to code.
Other nice feature would be to have an option to have a default country and not show the country selection if this default country is set.
Comment #15
Will White commentedWill be fixed with #331629: Develop module that handles international number validation.
Comment #16
victorsvenson commentedI use an SMS gateway software, namely Ozeki: http://www.ozekisms.com
It allowes international phone number formats, short codes, long codes, I can send SMS anywhere. This is a standalone SMS gateway that can be installed into a PC and it simplifies most of the tasks.