Hi
well...,

first of all, I said my intention (sorry for my english):

I want that anonymous users can send content via SMS, as email forward...
as here, example: http://11870.com/pro/maismediacom (enviar por sms gratis)

for do that:
i'm using smsgateway with clickatell,
for use in Spain,

i'm trying send sms with "send to phone" and the error in watchdog is:
Sending SMS to 34number... failed. The gateway said ERR: 114, Cannot route message

...mmm.., am I missing something very important?
are there a mini guide explaining things about sms in Drupal?

by the way, the list of countries in "send to phone" is not sorted alphabetically.....

greettings and thanks

Comments

aspope’s picture

Hi Quinti,

This is a Clickatell error code. I suspect that the reason for this error is an incorrect phone number (MSISDN) being sent to Clickatell.

The phone number must be given in full international format, including the country code and excluding special characters like "+" or spaces. Example for UK: 447982222111 Example for Spain: 348787878787

Please let me know if you have fixed this.
~ap

tonicboy’s picture

I'm having the same issue. FYI, I sent a test message using Clickatell's test script "http://api.clickatell.com/http/sendmsg?user=xxxxx&password=xxxxx&api_id=..." and it worked fine. I suspect that it must be the phone number formatting which is the issue, but I have tried multiple ways of inputting the phone number to no avail.

By the way aspope, 6.x-1.0 has a separate dropdown for country, so you're supposed to omit that in the phone number field.

tonicboy’s picture

Category: support » bug

Ok, I've done a little more digging and this is what I have discovered. I added some watchdog commands to the Clickatell module and found what I think is a bug. Here are three log entries:

Sent command to Clickatell: http://api.clickatell.com/http/auth?api_id=****&user=****&password=****
Clickatell session ID refreshed: 82e02be80ad5d9ad788efc6ea9f3cf02
http://api.clickatell.com/http/sendmsg?session_id=82e02be80ad5d9ad788efc...

The first is the auth command, looks fine. The second is the session ID returned from the auth command - ok, cool. The third clearly shows that the "to" phone number is clearly formatted wrong. I am in Vietnam (country code 84) and as with many countries, you need to drop the leading zero for international calls/messages.

Furthermore, the number validation doesn't allow me to drop the leading zero myself, as it correctly validates the number to be a full Vietnamese phone number.

I have changed the issue category to "bug report"

tonicboy’s picture

The fix for this is pretty simple - just strip any leading zeroes in sms_clickatell_send()

if (strpos($number, "0") === 0) $number = substr($number, 1);

However, I think more research needs to be done. From what I have found it, it is pretty standard for most countries to drop the leading zero (called the trunk code) when dialing in international format. Except for a few exceptions such as the US and Canada, but they don't have leading zeroes to drop anyway. However, I'm not fully confident that this rule is 100% universal so there may be countries for which it will cause a problem to strip the trunk code.

Will White’s picture

Assigned: Quinti » Unassigned
Issue tags: +international
aspope’s picture

Ah, fair point. Anyway, it looks like Will is working on an international number validation module that will solve all our problems :-)

jlab’s picture

Any progress on this issue?

Eric_A’s picture

Dublin Drupaller’s picture

I'm having the same problem.

The gateway said ERR: 114, Cannot route message

have tried numerous methods of inputting the number, but, keep getting the same error message.

Dublin Drupaller’s picture

Priority: Normal » Critical
Dublin Drupaller’s picture

quick follow up. I think the problem is with the countries array.

I just commented out line 94 in the sms_clickatell.module

//$number = $options['country'] . $number;

and it works when you enter in the full mobile number e.g. 35386XXXXXXX.

Don't have time to dig into why the country array is causing a problem at the moment but thought I would flag it here in case it helps others.

dub

michaelfavia’s picture

If you check your clickatell gateway log on the clickatell site youll find that they are experiencing a systme wide outage. i got routing errors in te message reports and called to confirm. There might be a valid bug here as well but the two issues might be conflated at this point as i got a 114 error as well. Repeating for clarity: the clickatell gatewqay is down into or out of the united states indefinitely.

gausarts’s picture

subscribing. Thanks

frazras’s picture

http://support.clickatell.com/us_notifications.php

Seems Clickatell is downsizing the support for US. If this grave news, does it affect most Clickatell users in the states?

univate’s picture

I have been waiting a month for answers from clickatell on this. I think this highlights the need to have broader support for other gateways and not just focus on clickatell.

For the one client I have effected by this outage I have switched them to twilio.com

aspope’s picture

Sounds like bad news about Clickatell. Do you guys have suggestions for other good US gateways that we should support? @univate mentioned twilio.com - is this one that we should add? If so, can anybody send code or API docs?

Sorry I don't have much experience with SMS in the US.

univate’s picture

I have just had a client's account approved again for use with the clickatell US short code service, but at the moment clickatell have stated that they are not allowing new US accounts and even if they do open this up again it looks like you will need to go through an approval process.

I am also not based in the US either, but I have clients that want to sell services into many countries including the US, so this does effect them and I have spend quite a bit of time over the past month investigating the various options.

Services like twilio.com (another one I looked at was tropo.com) give you a long code (local) number which at least in the US appears to have a limit on the volume of messages you can send over a specific period. Meaning you need queue and space the sending of messages in your application if you have large volumes. I'm not sure the exact number, I have heard numbers of 10 - 60 messages a minute.

The way around this is to purchase your own short code, which you can also do with clickatell - although its rather expensive and takes a few weeks time to process the application.

univate’s picture

Status: Active » Fixed

Clickatell is now working again. But this issue highlights the importance of not relying on one gateway.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

s0s’s picture

did the trick for me. thx. i'm not into coding modules but will look into extending the existing sms_clicatell to support more options - originator, validity, ... . any knowledge on work that has been done sofar? callback url? two-way sms? any objections from the authors? thanks ahead! R, s0s

Lishi Rodrigo’s picture

Am at Sri Lanka and got the same error.. problem is with the number format... i omitted the zero and it worked for me...!!