And the flags are in :
http://www.kannel.org/download/1.4.0/userguide-1.4.0/userguide.html#AEN3338
isn't???

this is my example script : (myCoding.php)
<?
$a = $_GET['a'];
$fp = fopen("/tmp/textfile_name.txt", "w");
fwrite($fp, $a);
fclose($fp);
?>

my config:
group = smsc
smsc = smpp
smsc-id = 3345
host = xxxxxx
port = 2775
receive-port = 2775
smsc-username = "xxxxx"
smsc-password = xxxxx
system-type = "xxxxx"
address-range = ""
keepalive = 10
log-file = "/var/log/kannel/smsc-spice3.log"
log-level = 0
our-host = 127.0.0.1
reconnect-delay = 10
enquire-link-interval = 30
my-number = "3345"

group = sms-service
keyword = default
text = "No service specified"
accepted-smsc = 3345
get-url = "http://127.0.0.1/myCoding.php?a=%a";
catch-all = true
send-sender = true
omit-empty = true
max-messages = 0

why in directory /tmp there isn't file named "textfile_name.txt"
I think this becaused the get-url parameter isn't triggered by the incoming messages...
Is my script right??

thanx


Kyriacos Sakkas wrote:

Ricky Wibowo wrote:

No.. :-(
i think i'm a little stupid in here...
i just want to receive all messages inbound, and injected to mysql
database

This will need an external script/app that can handle http get requests,
and can be in any language of your choice

and all connection via SMPP Protocol to the operator..

for the connection the kannel documentation gives enough information on
setup, but you will need to contact an operator to get some of the
configuration details eg. port numbers.

thanx

Gareth Reakes wrote:

Hi Ricky,

Ricky Wibowo wrote:

By the way,
sorry if i'm wrong, your configuration seems that if any incoming
messages, it will be send again to the sender (MO)...



group   = smsc
smsc   = smpp
smsc-id   = SMSC-1

group  = smsc
smsc  = smpp
smsc-id    = SMSC-2
Above you set up 2 smsc that talk smpp.


group   = sms-service
keyword  = default
get-url  =
"http://localhost:8080/cgi-bin/sendsms?smsc=SMSC-2&?username=test2&password=test2&sender=%p&text=%a&recipient=%P";

accepted-smsc   = SMSC-1

group   = sms-service
keyword   = default
get-url   =
"http://localhost:8080/cgi-bin/sendsms?smsc=SMSC-1&username=test2&password=test2&sender=%p&text=%a&recipient=%P";

accepted-smsc   = SMSC-2
Here you set up 2 services with the magic keyword default that only
accept messages (all messages though) from 1 of the smsc. So incoming
messages from each of the smsc will go to a particular sms-service.
From there they call a sendsms - but notice the smsc=SMSC-x in the
parameter list. This routes the message back to the other smsc to be
sent out over smpp.


Is that clear? :)


Gareth




Reply via email to