Heya,
I am trying to set up a Kannel gateway for a project for university. I have
installed the gateway software and created a config file as follows:
# CORE
group = core
admin-port = 13000
admin-password = pwd
status-password = pwd
log-file = "/tmp/kannel/kannel.log"
log-level = debug
access-log = "/tmp/kannel/access.log"
smsbox-port = 13001
store-file = "/tmp/kannel/kannel.store"
# SMSC Fake
group = smsc
smsc = fake
host = localhost
port = 13013
# SMSBOX SETUP
group = smsbox
bearerbox-host = localhost
sendsms-port = 13131
sendsms-chars = "0123456789+"
global-sender = 0123456
log-file = "/tmp/kannel/smsbox.log"
log-level = debug
access-log = "/tmp/kannel/access.log"
# SEND-SMS USERS
group = sendsms-user
username = username
password = pwd
# SMS SERVICE 'Default' group = sms-service keyword = default get-url =
"http://www.personal.reading.ac.uk/~siu03jpt/project/temp.php?t=%t&q=%q&a=%a"
temp.php is a php script which does nothing other than dump the contents of
the message to a plaintext file:
<?
if ($t = $_REQUEST['t'] && $q = $_REQUEST['q'] && $a=$_REQUEST['a'])
{
if (!$out_file = fopen('./posts/post.html','w')) die ('error opening
file');
fwrite($out_file,'message: '.$t.' '.$q.' '.$a.' ');
fclose($out_file);
}
else die ('parameters missing!');
?>
I am attempting to send a text sms message by accessing the following URL
in firefox:
http://[my-machine]:13131/cgi-bin/sendsms?username=username&password=pwd&to=0123456&text=Hello+world
and receive the following in logs:
bearerbox: 2006-01-10 15:39:58 [25866] [9] DEBUG: boxc_receiver: sms
received 2006-01-10 15:39:58 [25866] [9] DEBUG: send_msg: sending msg to
box: <127.0.0.1> 2006-01-10 15:40:54 [25866] [8] DEBUG: sms_router:
list_len = 5 2006-01-10 15:40:54 [25866] [8] DEBUG: sms_router: time to
sleep
smsbox: 2006-01-10 15:39:58 [25994] [3] INFO: smsbox: Got HTTP request
</cgi-bin/sendsms> from <134.225.217.49> 2006-01-10 15:39:58 [25994] [3]
INFO: sendsms used by <username> 2006-01-10 15:39:58 [25994] [3] INFO:
sendsms sender:<username:0123456> (134.225.217.49) to:<0123456> msg:<Hello
world> 2006-01-10 15:39:58 [25994] [3] DEBUG: message length 11, sending 1
messages 2006-01-10 15:39:58 [25994] [3] DEBUG: Status: 202 Answer: <Sent.>
2006-01-10 15:39:58 [25994] [3] DEBUG: HTTP: Resetting HTTPClient for
`134.225.217.49'.
Accessing the URL gave me a generic "Sent" page and the logs seem to
support that, and yet it isn't working. is this somehting to do with my PHP
or a configuration problem or what?
also: I have looked through the Kannel documentation and could not find the
fakesmsc program mentioned in the Using Fake SMSC sections, not sure if
this is an installation problem on my part or what, but the above URL-based
method would suggest is possible.
any help would be much appreciated.
- Jonathan
- - -
Hello, I love you -
Won't you tell me your name?
Hello! I'm good for nothing -
Will you love me just the same?
http://www.thedarkside.co.nr