The gateway said ERR: 114, Cannot route message
Quinti - April 12, 2009 - 23:01
| Project: | SMS Framework |
| Version: | 6.x-1.0 |
| Component: | Clickatell |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
| Issue tags: | clickatell, error, error 114, gateway, international, sms |
Jump to:
Description
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

#1
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
#2
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=xxxxx&to=xxxxxxxxx&text=Meet+me+outside" 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.
#3
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"
#4
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.
#5
#6
Ah, fair point. Anyway, it looks like Will is working on an international number validation module that will solve all our problems :-)
#7
Any progress on this issue?
#8
Marked #514696: Clickatel number confirmation problems duplicate. I'm not sure about #421694: Clickatell areacode bug.