Helping ordinary people create extraordinary websites!
GET OUR NEWSLETTER
Your Email:
 

Build a Push Proxy Gateway on Linux

By Manas Ranjan Behera
2005-06-15


Configuring the gateway for PPG

In the previous article in this series, you downloaded and installed the gateway; if you haven't already done this, refer back to that article for instructions. In this section, I describe how to start configuring the gateway for PPG. I use two components: the PPG core group and the PPG user group. The PPG core group is used to configure the PI interface.

Configuring the PPG core group (PI interface)
In the main Kannel configuration file (kannel.conf), you must add one more group (like wapbox and bearerbox) with the name ppg and set up the corresponding values. My sample configuration file for this group is shown in Listing 3.

Listing 3. Sample configuration file for ppg group


group = ppg
ppg-url = /wappush
ppg-port = 8080
concurrent-pushes = 50
users = 52
ppg-allow-ip = 192.168.1.35;127.0.0.1
trusted-pi = false

However, you can add your own fields and configure the settings to your own needs. Table 1 defines some of the variables that can be set. (To familiarize yourself with setting and using these variables, see the first article of this series.) Note that Tables 1 and 2 include information about ways to route push messages through a SMS gateway, but those features are beyond the scope of this article.

Table 1. PPG core group configuration variables

VariableValueDescription
groupppgMandatory value. Indicates that you are configuring the PPG group.
ppg-portnumberThe port at which PPG is listening. The default is 8080.
ppg-ssl-port(o)numberMandatory value for PPG HTTPS support. The port at which PPG listens for HTTPS requests. There are no defaults; you must set the value separately.
ssl-server-cert-filestringMandatory value for PPG HTTPS support. This file contains the server's SSL certificate.
ssl-server-key-filestringMandatory value for PPG HTTPS support. This file contains the server's SSL private key.
ppg-urlURLLocation of PPG services. The default is /wappush.
global-senderstringThe sender phone number. This is required by some protocols.
concurrent-pushesnumberThe number of concurrent pushes expected. Note that PPG works even if the value is too low; it will only be slower. The default is 100.
usersnumberNumber of actually configured user accounts. Note that PPG works even value is too low; it will only be slower. The default is 1,024.
trusted-pibooleanIf true, PI does authentication for PPG. Obviously, both must reside inside the same firewall. The default is true. If this variable is true, all security variables are ignored (even though they might be present).
ppg-deny-ipip-listPPG does not accept pushes from these IP addresses. Wildcards are allowed. If this attribute is missing, no IP address is denied by this list.
ppg-allow-ipip-listPPG accepts pushes from these, and only these, IP addresses. Wildcards are allowed. If you add this list, IP addresses not mentioned are denied.
default-smscstringIf no SMSC ID is given with the wappush HTTP request (see below), this one is used as the default route for all push messages.
default-dlrstringIf no DLR-URL is given with the wappush HTTP request (see below), this one is used as the default route for all push messages.
ppg-smsbox-idstringAll PPG delivery reports are handled by this smsbox. This routes all DLR messages inside bearerbox to the specified smsbox for processing the HTTP requests to the DLR-URL.
service-namestringThis is the SMS service name used by smsbox for WAP push.
default-dlrstringIf no DLR-URL is given with the wappush HTTP request (see below), this one is used as the default route for all push messages.
ppg-smsbox-idstringAll PPG delivery reports are handled by this smsbox.
service-namestringThis is the SMS service name used by smsbox for WAP push. The default is on. You normally do not need to set this value.
max-messagesintegerMaximum number of SMS messages generated. The default is 10. You only need to set this variable when your push documents are very long.

Configuring the PPG user group
You also need to configure the PPG user group values in the configuration file. Table 2 describes the details of the variables and values.

Table 2. PPG User group configuration variables

VariableValueDescription
wap-push-userstring(More) human readable name of a user.
ppg-usernamestringUsername for this user.
ppg-passwordstringPassword for this user.
allowed-prefixnumber-listPhone number prefixes allowed in pushes coming from this PI. These prefixes must conform to the standard international phone number format.
denied-prefixnumber-listPhone number prefixes denied in pushes coming from this PI. These prefixes must conform to the international phone number format.
white-listurlDefines a URL from which the whitelist can be fetched. The whitelist itself contains list of phone numbers accepting pushes from this PI.
black-listurlDefines a URL from which the blacklist can be fetched. The blacklist itself contains list of phone number not accepting pushes from this PI.
allow-ipip-listDefines IP addresses from which this PI can do pushes. Adding this list means that addresses not mentioned are denied.
deny-ipip-listDefines IP addresses from which this PI cannot do pushes. Addresses not mentioned in either list are denied, too.
default-smscstringIf no SMSC ID is given with the wappush HTTP request (see below), this one is used as the default route for this specific push user. The forced-smsc string allows only routing to a defined SMSC ID for this specific push user.
dlr-urlstringIf no dlr is given with the wappush HTTP request (see below), this one is used as default route for this specific push user.
smsbox-idstringsmsbox handles delivery reports from this user.
forced-smscstringAllows only routing to a defined SMSC ID for this specific push user.
white-list-regexPOSIX regular expressionDefines the set of phone numbers accepting pushes from this PI.
black-list-regexPOSIX regular expression Defines the set of phone-numbers rejecting pushes from this PI.



Tutorial Pages:
» Introduction
» Basic overview of push
» Configuring the gateway for PPG
» Testing with a handset simulator
» Resources


First published by IBM DeveloperWorks


 | Bookmark
Related Tutorials:
» How to Install PHP 5 on Linux
» How to Install Apache 2 on Linux
» How to Install MySQL 5.0 on Linux
» SMB Caching
» Mound --Bind
» Tar Wild Card Interpretation

Advertise with Us!


Tutorials Scripts Web Hosting Developer Manuals
Resources