Kannel

How to connect Kannel SMS Gateway to SMSPortal over the SMPP protocol.

Install and Configure Kannel SMS Gateway

You can use Kannel version 1.4.3 or higher to configure SMPP access.

1. Download the latest package information from all configured sources.

sudo apt-get update

2. Install Kannel and OpenSSL (optional for SSL binding).

sudo apt-get install kannel
sudo apt-get install openssl

3. Stop your Kannel SMS Gateway using the following command:

sudo /etc/init.d/kannel stop

4. Backup old kannel.conf

sudo cp /etc/kannel/kannel.conf -T /etc/kannel/kannel.conf.bak

5. Download the example kannel.conf file and edit to replace $smsportal_user and $smsportal_password with your SMSPortal SMPP credentials.

6. For security reasons kannel.conf only allows access from localhost. To enable access from a different machine, edit the following parameters in kannel.conf. For example, for the IP addresses X.X.X.X and Y.Y.Y.Y:

admin-allow-ip = "127.0.0.1;X.X.X.X;Y.Y.Y.Y"

box-allow-ip = "127.0.0.1;X.X.X.X;Y.Y.Y.Y"

user-allow-ip = "127.0.0.1;X.X.X.X;Y.Y.Y.Y"

7. Overwrite your old configuration file. Alternatively if you are familiar with Kannel already, update the relevant SMSC group with our Connection Details or by referencing our provided example file.

sudo cp >>path to our version<< -i -T /etc/kannel/kannel.conf

8. Start your Kannel SMS Gateway using the following command:

sudo /etc/init.d/kannel start

9. You should be successfully bound to one of our SMPP servers. To confirm, you can view the state of your SMSC connections by viewing the SMSC connections segment on the status page or by using the below cURL request:

curl http://127.0.0.1:13000/status

10. To test a send you will need to start the "smsbox" as per the kannel.conf config file provided.

cd /etc/kannel/
smsbox

11. Fill in the "to" number and run the cURL command to send a test message as per the example below:

https://localhost:13013/cgi-bin/sendsms?username=username&password=pwd&to=27XXXXXXXXX&text=Hello%20World&from=1000

A successful response of "accepted for delivery" should be returned.


Did this page help you?