Re: Working SMS gateway using Clickatell http API?

Alvin <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel,gmane.comp.mobile.kannel.user
Message-ID <[email protected]>
On 9/19/2011 1:37 AM, Willy Mularto wrote:
> Kannel does have direct clickatell API on it's source code. But I'm not whether it uses the latest API from clickatell or not. You probably need to check it yourself.
>
>
>
> On Sep 19, 2011, at 1:28 PM, Mpeirwe Benjamin wrote:
>
>> Hi Alvin,
>>
>> How about you try PlaySMS? it has a direct clickatell Connection
>> interface that I guess will save you alot of headache!
>>
>> On 9/19/11, Alvin<[email protected]>  wrote:
>>> Hi, this is Alvin again and you may remember the last message I sent
>>> asking about how to set up the SMS gateway to work with Clickatell's
>>> http API?  As I am new to Kannel, I managed to get to the point where
>>> Kannel would accept the http web-browser command to send a SMS, and I
>>> can see it working through the smsbox log to the bearerbox log only to
>>> stop at the smsc log, where I cannot make  a connection with
>>> Clickatell's http-api url.   The smsc settings are below, and the most
>>> recent smsc activity in the log file has been attached.  Can anyone
>>> please point out what I am doing wrong and/or provide me a sample
>>> /"conf/" file that works with Clickatell?  Thanks!
>>>
>>> group = smsc
>>> smsc = http
>>> smsc-id = clickatell
>>> system-id = xxxx #api_id
>>> system-type = clickatell
>>> smsc-username = xxxx #clickatell username
>>> smsc-password = xxxx #clickatel pass
>>> send-url = "http://api.clickatell.com/http/sendmsg"
>>> log-file = "C:/users/Alvin/Downloads/gateway-1.4.3/logs/smsc_http.log"
>>> log-level = 0
>>> port = 12010
>>> allowed-smsc-id = clickatell
>>> connect-allow-ip = "196.30.96.134";"67.184.17.35";"127.0.0.1"
>>>
>>> Alvin
>>>
>>
>> -- 
>> "The Scientist explores what is,
>> the Engineer creates what has never been."
>> Theodore von Karman
>>
> Willy Mularto
> F300HD+MR18DE (NLC1725)
>
>
>
>
>
>
>
>
>
Thank you for the reply; I have worked around with the files and now I 
can establish a connection to Clickatell, but I keep getting an 
"Insufficient arguments, rejected" error whenever I use the browser 
command to send SMSs.  The newly revised smsc group is below, as well as 
the most recent debug files for bearerbox and smsc attached to this 
email.  I'm not sure why I got this error, as the code I saw for the 
smsc_http part in Kannel seems to spit out the "insufficient arguments" 
with missing from, to, or text fields.

group = smsc
smsc = http
smsc-id = click
system-id = xxxx
system-type = clickatell
smsc-username = xxxx
smsc-password = xxxx
send-url = http://api.clickatell.com/http
log-file = "C:/users/Alvin/Downloads/gateway-1.4.3/logs/smsc_http.log"
log-level = 0
port = 12010
allowed-smsc-id = click
connect-allow-ip = "127.0.0.1;196.30.96.134;196.5.254.33;192.168.*.*"
kannel_error_log.txt (text/plain, 6.9 KB)
Bearerbox log: 
2011-09-21 01:40:39 [4912] [9] DEBUG: boxc_receiver: sms received
2011-09-21 01:40:39 [4912] [9] DEBUG: HTTP[click]: Sending request <http://api.clickatell.com/http/sendmsg?to=16307294384&from=18479735615&api_id=3329716&user=align2011&password=fun2shop!&cliMsgId=b529d48d4cdd4c0987e770720184c3db&text=Testing&charset=UTF-8>
2011-09-21 01:40:39 [4912] [12] DEBUG: Queue contains 0 pending requests.
2011-09-21 01:40:39 [4912] [12] DEBUG: Parsing URL `http://api.clickatell.com/http/sendmsg?to=16307294384&from=18479735615&api_id=3329716&user=align2011&password=fun2shop!&cliMsgId=b529d48d4cdd4c0987e770720184c3db&text=Testing&charset=UTF-8':
2011-09-21 01:40:39 [4912] [12] DEBUG:   Scheme: http://
2011-09-21 01:40:39 [4912] [12] DEBUG:   Host: api.clickatell.com
2011-09-21 01:40:39 [4912] [12] DEBUG:   Port: 80
2011-09-21 01:40:39 [4912] [12] DEBUG:   Username: (null)
2011-09-21 01:40:39 [4912] [12] DEBUG:   Password: (null)
2011-09-21 01:40:39 [4912] [12] DEBUG:   Path: /http/sendmsg
2011-09-21 01:40:39 [4912] [12] DEBUG:   Query: to=16307294384&from=18479735615&api_id=3329716&user=align2011&password=fun2shop!&cliMsgId=b529d48d4cdd4c0987e770720184c3db&text=Testing&charset=UTF-8
2011-09-21 01:40:39 [4912] [12] DEBUG:   Fragment: (null)
2011-09-21 01:40:39 [4912] [9] DEBUG: send_msg: sending msg to boxc: <clickatell>
2011-09-21 01:40:39 [4912] [12] DEBUG: HTTP: Opening connection to `api.clickatell.com:80' (fd=37).
2011-09-21 01:40:39 [4912] [12] DEBUG: Socket connecting
2011-09-21 01:40:40 [4912] [11] DEBUG: Get info about connecting socket
2011-09-21 01:40:40 [4912] [11] DEBUG: HTTP: Sending request:
2011-09-21 01:40:40 [4912] [11] DEBUG: Octet string at 0x1074810:
2011-09-21 01:40:40 [4912] [11] DEBUG:   len:  230
2011-09-21 01:40:40 [4912] [11] DEBUG:   size: 1024
2011-09-21 01:40:40 [4912] [11] DEBUG:   immutable: 0
2011-09-21 01:40:40 [4912] [11] DEBUG:   data: 47 45 54 20 2f 68 74 74 70 2f 73 65 6e 64 6d 73   GET /http/sendms
2011-09-21 01:40:40 [4912] [11] DEBUG:   data: 67 3f 74 6f 3d 31 36 33 30 37 32 39 34 33 38 34   g?to=16307294384
2011-09-21 01:40:40 [4912] [11] DEBUG:   data: 26 66 72 6f 6d 3d 31 38 34 37 39 37 33 35 36 31   &from=1847973561
2011-09-21 01:40:40 [4912] [11] DEBUG:   data: 35 26 61 70 69 5f 69 64 3d 33 33 32 39 37 31 36   5&api_id=3329716
2011-09-21 01:40:40 [4912] [11] DEBUG:   data: 26 75 73 65 72 3d 61 6c 69 67 6e 32 30 31 31 26   &user=align2011&
2011-09-21 01:40:40 [4912] [11] DEBUG:   data: 70 61 73 73 77 6f 72 64 3d 66 75 6e 32 73 68 6f   password=fun2sho
2011-09-21 01:40:40 [4912] [11] DEBUG:   data: 70 21 26 63 6c 69 4d 73 67 49 64 3d 62 35 32 39   p!&cliMsgId=b529
2011-09-21 01:40:40 [4912] [11] DEBUG:   data: 64 34 38 64 34 63 64 64 34 63 30 39 38 37 65 37   d48d4cdd4c0987e7
2011-09-21 01:40:40 [4912] [11] DEBUG:   data: 37 30 37 32 30 31 38 34 63 33 64 62 26 74 65 78   70720184c3db&tex
2011-09-21 01:40:40 [4912] [11] DEBUG:   data: 74 3d 54 65 73 74 69 6e 67 26 63 68 61 72 73 65   t=Testing&charse
2011-09-21 01:40:40 [4912] [11] DEBUG:   data: 74 3d 55 54 46 2d 38 20 48 54 54 50 2f 31 2e 31   t=UTF-8 HTTP/1.1
2011-09-21 01:40:40 [4912] [11] DEBUG:   data: 0d 0a 48 6f 73 74 3a 20 61 70 69 2e 63 6c 69 63   ..Host: api.clic
2011-09-21 01:40:40 [4912] [11] DEBUG:   data: 6b 61 74 65 6c 6c 2e 63 6f 6d 0d 0a 43 6f 6e 6e   katell.com..Conn
2011-09-21 01:40:40 [4912] [11] DEBUG:   data: 65 63 74 69 6f 6e 3a 20 6b 65 65 70 2d 61 6c 69   ection: keep-ali
2011-09-21 01:40:40 [4912] [11] DEBUG:   data: 76 65 0d 0a 0d 0a                                 ve....
2011-09-21 01:40:40 [4912] [11] DEBUG: Octet string dump ends.
2011-09-21 01:40:40 [4912] [11] DEBUG: HTTP: Status line: <HTTP/1.1 200 OK>
2011-09-21 01:40:40 [4912] [11] DEBUG: HTTP: Received response:
2011-09-21 01:40:40 [4912] [11] DEBUG: Octet string at 0x1071938:
2011-09-21 01:40:40 [4912] [11] DEBUG:   len:  205
2011-09-21 01:40:40 [4912] [11] DEBUG:   size: 1024
2011-09-21 01:40:40 [4912] [11] DEBUG:   immutable: 0
2011-09-21 01:40:40 [4912] [11] DEBUG:   data: 44 61 74 65 3a 20 57 65 64 2c 20 32 31 20 53 65   Date: Wed, 21 Se
2011-09-21 01:40:40 [4912] [11] DEBUG:   data: 70 20 32 30 31 31 20 30 36 3a 34 30 3a 34 35 20   p 2011 06:40:45 
2011-09-21 01:40:40 [4912] [11] DEBUG:   data: 47 4d 54 0d 0a 53 65 72 76 65 72 3a 20 41 70 61   GMT..Server: Apa
2011-09-21 01:40:40 [4912] [11] DEBUG:   data: 63 68 65 2f 32 2e 30 2e 35 32 20 28 52 65 64 20   che/2.0.52 (Red 
2011-09-21 01:40:40 [4912] [11] DEBUG:   data: 48 61 74 29 0d 0a 58 2d 50 6f 77 65 72 65 64 2d   Hat)..X-Powered-
2011-09-21 01:40:40 [4912] [11] DEBUG:   data: 42 79 3a 20 50 48 50 2f 35 2e 32 2e 36 0d 0a 43   By: PHP/5.2.6..C
2011-09-21 01:40:40 [4912] [11] DEBUG:   data: 6f 6e 6e 65 63 74 69 6f 6e 3a 20 63 6c 6f 73 65   onnection: close
2011-09-21 01:40:40 [4912] [11] DEBUG:   data: 0d 0a 54 72 61 6e 73 66 65 72 2d 45 6e 63 6f 64   ..Transfer-Encod
2011-09-21 01:40:40 [4912] [11] DEBUG:   data: 69 6e 67 3a 20 63 68 75 6e 6b 65 64 0d 0a 43 6f   ing: chunked..Co
2011-09-21 01:40:40 [4912] [11] DEBUG:   data: 6e 74 65 6e 74 2d 54 79 70 65 3a 20 74 65 78 74   ntent-Type: text
2011-09-21 01:40:40 [4912] [11] DEBUG:   data: 2f 68 74 6d 6c 0d 0a 0d 0a 49 44 3a 20 36 31 62   /html....ID: 61b
2011-09-21 01:40:40 [4912] [11] DEBUG:   data: 39 30 65 63 30 31 66 32 32 65 62 65 61 36 36 32   90ec01f22ebea662
2011-09-21 01:40:40 [4912] [11] DEBUG:   data: 63 66 38 38 65 62 64 66 32 66 66 63 66            cf88ebdf2ffcf
2011-09-21 01:40:40 [4912] [11] DEBUG: Octet string dump ends.
2011-09-21 01:40:45 [4912] [2] DEBUG: HTTP: Creating HTTPClient for `127.0.0.1'.
2011-09-21 01:40:45 [4912] [2] DEBUG: HTTP: Created HTTPClient area 0x1076b68.
2011-09-21 01:40:46 [4912] [2] DEBUG: HTTP: Creating HTTPClient for `127.0.0.1'.
2011-09-21 01:40:46 [4912] [2] DEBUG: HTTP: Created HTTPClient area 0x1071578.

SMSC log: 
2011-09-21 01:40:45 [4912] [6] DEBUG: HTTP[click]: Got request `/cgi-bin/sendsms'
2011-09-21 01:40:45 [4912] [6] DEBUG: HTTP[click]: Received a request
2011-09-21 01:40:45 [4912] [6] ERROR: HTTP[click]: Insufficient args.
2011-09-21 01:40:45 [4912] [6] DEBUG: HTTP[click]: Sending reply `Insufficient arguments, rejected.'.

SMSBOX log: 
2011-09-21 01:40:31 [3376] [2] DEBUG: HTTP: Creating HTTPClient for `127.0.0.1'.
2011-09-21 01:40:31 [3376] [2] DEBUG: HTTP: Created HTTPClient area 0xd9de38.
2011-09-21 01:40:31 [3376] [3] INFO: smsbox: Got HTTP request </cgi-bin/sendsms> from <127.0.0.1>
2011-09-21 01:40:31 [3376] [3] INFO: sendsms used by <align2011>
2011-09-21 01:40:31 [3376] [3] INFO: sendsms sender:<align2011:18479735615> (127.0.0.1) to:<16307294384> msg:<Testing>
2011-09-21 01:40:31 [3376] [3] DEBUG: Stored UUID 1e404a07-4736-41fd-8525-9a72450d7fb3
2011-09-21 01:40:31 [3376] [3] DEBUG: message length 7, sending 1 messages
2011-09-21 01:40:31 [3376] [3] DEBUG: Status: 202 Answer: <Sent.>
2011-09-21 01:40:31 [3376] [3] DEBUG: Delayed reply - wait for bearerbox
2011-09-21 01:40:31 [3376] [0] DEBUG: Got ACK (0) of 1e404a07-4736-41fd-8525-9a72450d7fb3
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.