Expanding the module to utilize international numbers

public
darren.ferguson - Thu, 2008-08-28 02:07

In our use of the smsfranalmework we are requiring the use of numbers outwith the US in order to send messages too. The clickatell api does support the sending of messages but the module itself is only currently utilizing the US numbers. I noticed the sms_formatter function is now checking up to 16 is that to support the international numbers???

We are currently running a hacked version of the 5.x development hence we are going to upgrade to the D6 nightly build. If something is required for this module or if you have a road map, let us know if we can assist since we are definitely interesting in seeing this module mature.
The sms receive / actions is also of interest to us

Looking at the clickatell

darren.ferguson - Thu, 2008-08-28 17:50

Looking at the clickatell interface it looks like the http interface api supports the ability to send international messages.

Looking that the clickatell module it has the sms_clickatell_country_codes function. Would it be okay to add to this function so we can support all of the country codes in the world? I believe for clickatell that is all we would be required to do for it to work.

Please advise if this is something that is going to be looked at, i do not mind submitting the patch for this but just wondered if it was okay to do.

Darren Ferguson

Hi Darren, Definitely. That

diggersf@drupal.org's picture
diggersf@drupal.org - Thu, 2008-08-28 20:59

Hi Darren,
Definitely. That was the original idea for that function. It would be great if you submitted a patch to get that working. Do you have the ability to test? Thanks for your help!

--
Will White


Will, Yep have the ability

darren.ferguson - Thu, 2008-08-28 21:33

Will,

Yep have the ability to test this so will try doing what Boris suggests and provide patches to the issues queue for this.

Thanks for the reply.

Darren Ferguson

Please use the issue queue

Boris Mann's picture
Boris Mann - Thu, 2008-08-28 21:02

Go for it Darren. The code is the roadmap -- longer term coordination can be done here, but the way to be most effective is to post patches in the issue queue.

Testing seems to be an issue since Clickatell is expensive: http://drupal.org/node/280048

The specific international numbers issues is here -- http://drupal.org/node/197343 -- go ahead and provide an alternate patch.


Testing - with Zong?

smokinggoat's picture
smokinggoat - Fri, 2008-08-29 19:23

I may be completely misunderstanding what kinds of services are needed for testing - but would Zong work? They are a well respected service in Europe, and have coverage in the US. They can provide a shared short code, and it looks fairly inexpensive to use. Plus, they have a good and open API. Would require some work on the module to work with Zong, but it may be worth it.... I'll point one of the Zong/Echovox guys here.

The Smoking Goat aka Greg Beuthin
http://www.parisoma.com
http://consultinggoat.wordpress.com


Greg Will check the Zong

darren.ferguson - Fri, 2008-08-29 19:34

Greg

Will check the Zong interface and determine how easy it will be to implement a drupal module out of it. If it ihas a nice XMLRPC, HTTP or the like API then it should not be an issue.

Darren Ferguson

Right now, the Clickatell

diggersf@drupal.org's picture
diggersf@drupal.org - Thu, 2008-08-28 23:51

Right now, the Clickatell module allows the user to specify a country using a drop down. This interface is based on Clickatell's test tool:
http://www.clickatell.com/products/test_gateway.php

We should evaluate this UI. Is this the best way to handle this or can we rely on users to enter the country code manually? If so, we can do away with this extra field and avoid having to set up each country at all.

International support seems to be an issue on the gateway level. Each gateway needs to add support for international numbers individually. What is support like for email gateways outside of the US? Does it make sense to add support for user defined email gateways as well?

--
Will White


Will I would be concerned

darren.ferguson - Fri, 2008-08-29 00:38

Will
I would be concerned with the user entering the country code since i know that for example in the US people from europe like my wife are always trying 011 then 49 or 44 and i know that it definitely confuses and you could end up with 011, 001 or 0044 instead of the country codes. Thinking downloading the country code prefixes and then have the select box. With the numbers big concern is that people will sometimes put the leading 0 or not and depending on the country they might support the leading 0 like the U.K. but with countries like Kuwait, Iraq etc the are just country code then number i.e. 965 923 8657 is a fully qualified Kuwait cell phone number, if in kuwait you would dial 923 8657 hence when checking the number we need to have some way of determining whether there would be a leading 0 or not.

We definitely have a lot to think about in this but with regard to the actual country codes the select box is probably the way to go so at least no one will actually enter the incorrect country code for the API, at least clickatells.

Darren Ferguson

I am using several SMS

tcibah - Mon, 2008-09-01 07:07

I am using several SMS online services & they all ak users to enter "international number format", examples from

http://www.csoft.co.uk/phone_numbers/index.htm:

The recipient is in | Their country code | Their local number | Their International Format number
U S A | 1 | (954) 555-1234 | 19545551234
China | 86 | (10) 69445464 | 861069445464

For testing purposes, I have a Clickatell sub account with credits that can be used. Also we have three mobile phones out of USA that you can used as destination for the test. Let me know if that will be of help in the project's testing.

Further, quoting Clickatell site (http://www.clickatell.com/downloads/smpp/Clickatell_SMPP.pdf):

"In order to reduce testing costs, Clickatell offers a test number range. Messages sent to any number on this prefix will only be charged 1/3 of a credit. Use the number 279991xxxxx where “xxxxx” represents
any numeric string. Message statuses will be returned."

Changing country codes functionality

darren.ferguson - Mon, 2008-09-01 01:46

Found a website that has all of the pertinent international numbers and also the national prefix for those countries i.e. USA +1 and the national prefix is 1. U.K +44 national prefix 0. With this information i think we can have the check function determine the number accuracy based off the international dialing code and the national prefix.

Would you think that altering the country codes function i.e. in clickatell so that it will return the following type of array. I would suggest index key as the country code.

array('1' => array('name' => 'USA', 'prefix' => 1), '44' => array('name' => 'U.K.', 'prefix' => 0));

With this information we can then try and verify the numbers being entered and also if the first prefix is entered we can make sure we remove it from the number when we are sending to the sms gateway provider.

Thoughts???

Darren Ferguson

Tested European Numbers

darren.ferguson - Mon, 2008-09-29 17:12

have tested european numbers with the clickatell interface and they work fine.

http://drupal.org/node/314914 is the code revision for this, i also made changes to the messaging_sms module http://drupal.org/node/314896 to support the new interface for the smsframework since it was not passing the parameters correctly.

This should now work for clickatell for any international number. I did not do the prefix portion yet, but still plan on looking into it when time permits.

Darren Ferguson