Chapter 3. Using the gateway
This chapter explains how the gateway core, bearerbox, is configured and used. It covers the
configuration file, keeping an eye on the gateway while it is running, and using the HTTP interface to
control the gateway.
After this chapter there is distinct chapter for each kind of gateway use: WAP gateway, SMS gateway and
combined gateway. These chapters explain the configuration and other aspects of gateway of that type.
There is only one configuration file for all parts of Kannel, although when Kannel is distributed to
several hosts some lines from the configuration file can be removed in some hosts.
Configuring the gateway
The configuration file can be divided into three parts: bearerbox configurations, smsbox configurations
and wapbox configurations. Bearerbox part has one ’core’ group and any used SMS center groups, while
wapbox part has only one wapbox group. In smsbox part there is one smsbox group and then number of
sms-service and sendsms-user groups.
Details of each part are in an appropriate section of this documentation. The ’core’ group used by the
bearerbox is explained in this chapter, while ’wapbox’ part is in the next chapter and ’smsbox’, ’smsc’
(SMS center), ’sms-service’ and ’sendsms-user’ groups are in the SMS Kannel chapter.
Configuration file syntax
A configuration file consists of groups of configuration variables. Groups are separated by empty lines,
and each variable is defined on its own line. Each group in Kannel configuration is distinguished with a
group variable. Comments are lines that begin with a number sign (
#
) and are ignored (they don’t, for
example, separate groups of variables).
A variable definition line has the name of the variable, and equals sign (
=
) and the value of the variable.
The name of the variable can contain any characters except whitespace and equals. The value of the
variable is a string, with or without quotation marks () around it. Quotation marks are needed if the
variable needs to begin or end with whitespace or contain special characters. Normal C escape character
syntax works inside quotation marks.
Perhaps an example will make things easier to comprehend:
1
# A do-nothing service.
2
group = sms-service
3
keyword = nop
4
text = "You asked nothing and I did it!"
5
6
# Default service.
7
group = sms-service
8
keyword = default
9
text = "No services defined"
The above snippet defines the keyword
nop
for an SMS service, and a default action for situation when
the keyword in the SMS message does not match any defined service.
13