Chapter 5. Setting up a SMS Gateway
accepted-smsc = B
get-url = "..."
As can be seen, the
smsc-id
is used to identify the SMS center from which the message came. Then, the
denied-smsc-id
variable is used to prevent messages originally from the other SMS center from being
sent through the other one. Finally ’sms-service’ groups are defined with
accepted-smsc
so that they
only accept messages from certain SMS center.
If you want to use SMS push services, requesters should then set the
smsc
request parameter, or
’sendsms-user’ groups should be defined like this:
group = sendsms-user
username = operator_A
password = foo
forced-smsc = A
group = sendsms-user
username = operator_B
password = bar
forced-smsc = B
Note that if your SMS centers do not set the sender phone number but rely on number transmitted, you
should set
faked-sender
to all ’sendsms-user’ groups.
Running SMS gateway
Using the HTTP interface to send SMS messages
After you have configured Kannel to allow the sendsms service, you can send SMS messages via HTTP,
e.g., using a WWW browser. The URL looks something like this:
http://smsbox.host.name:13013/cgi-bin/sendsms?
username=foo&password=bar&to=0123456&text=Hello+world
Thus, technically, you make an HTTP GET request. This means that all the information is stuffed into
the URL. If you want to use this often via a browser, you probably want to make an HTML form for this.
Table 5-15. SMS Push (send-sms) CGI Variables
username
(or
user
)
string
Username or account name.
Must be
username
of the one
’sendsms-user’ group in the
Kannel configuration, or results
in ’Authorization failed’ reply.
76