Similar to SMSBox, OpenSMPPBox is a type of box that runs on top of an existing Kannel installation. However this is a special type of box that will listen to incoming SMPP Connections to allow messages to be sent to and from SMPP Clients allowing you to act as an SMPP Provider.
In this post I will provide basic configuration for installing the additional OpenSMPPBox on top of an existing Kannel Installation. You can find how to install Kannel in my previous post, you must however install this on top of the latest version of kannel, found here.
The user guide for Kannel can be found at http://www.kannel.com/userguide.shtml and the user guide for OpenSMPPBox can be found at http://www.scribd.com/doc/89943592/Opensmpp-Userguide .
1. With Kannel 1.5.0 Installed and working, download the OpenSMPPBox source code, available from multiple sources:
https://redmine.kannel.org/projects/smppbox/repository
or
https://github.com/pruiz/kannel-opensmppbox
The easiest step is to download the zip file from the above github url:
wget https://github.com/pruiz/kannel-opensmppbox/zipball/master
2. Extract the archive
unzip master
3. Change to the directory to compile
cd pruiz-kannel-opensmppbox-b6712e2/
Use the following steps to install:
./configure --prefix=/usr/local/kannel --with-kannel-dir=/usr/local/kannel (specify Kannel base install directory)
NOTE: [ If you receive error like:
/root/pruiz-kannel-opensmppbox-b6712e2/gw/box-dlr.c:178: undefined reference to `dbpool_destroy'
collect2: ld returned 1 exit status
make[2]: *** [opensmppbox] Error 1
you will need to change to the source directory for your base Kannel installation and re-compile with database support
./configure --with-mysql or --with-pgsql
make
make install
Then continue in the OpenSMPPBox directory:
cd pruiz-kannel-opensmppbox-b6712e2/
./configure --prefix=/usr/local/kannel --with-kannel-dir=/usr/local/kannel (specify Kannel base install directory)
make
make installmake
You'll notice a new file created in usr/local/kannel/sbin/opensmppbox
4. Change to the kannel directory
cd /usr/local/kannel
Create a new opensmppbox.conf file with the following content, this is basic without database support. Full parameter list can be found in the user guide. :
group = core
dlr-storage = internal
group = opensmppbox
opensmppbox-id = SMPP
opensmppbox-port = 2775
bearerbox-host = 127.0.0.1
bearerbox-port = 13001
our-system-id = SMPP
smpp-logins = /usr/local/kannel/smpplogins.txt
use-systemid-as-smsboxid = true
route-to-smsc = smsc1 (the smsc you want to send to in kannel.conf, could be your own http smsc)
log-file = /usr/local/kannel/logs/smppbox.log
4. Create an smpplogin.txt file in the specified path above. This will define who can connect over SMPP, refer to the guide for more details. A sample line could look like:
testname testpassword smsc1 *.*.*.*
This can contain an endless list of entires.
5. Ensure kannel base installation is running. Now run OpenSMPPBox using the following commands:
/usr/local/kannel/sbin/opensmppbox opensmppbox.conf
If OpenSMPPBox is running correctly and ready to accept connections the log file will show the following:
INFO: Waiting for SMPP connections on port 2775.
You box is now ready to accept connections on port 2755 from users defined in smpplogin.txt file.
For further reference and exploration, the user guide for Kannel can be found at http://www.kannel.com/userguide.shtml and the user guide for OpenSMPPBox can be found at http://www.scribd.com/doc/89943592/Opensmpp-Userguide .