If you need to install openSMPP please have a look on “Install Kannel Addons

OpenSMpp is Kannel addon; used to allow smpp clients to connect to kannel gateway and send SMS over SMPP protocol.

following are the steps for configuring openSMPP with mysql as storage of DLR.

Create a Mysql Database if you don’t have already one.
CREATE DATABASE `kannel` /*!40100 DEFAULT CHARACTER SET utf8 */;

Create table for dlr storage

USE `kannel`;
CREATE TABLE `dlr1` (
`id` int(16) unsigned NOT NULL auto_increment,
`smsc` varchar(64) default NULL,
`boxc_id` varchar(16) default NULL,
`ts` varchar(32) default NULL,
`source` varchar(32) default NULL,
`destination` varchar(32) default NULL,
`service` varchar(16) default NULL,
`url` varchar(2048) default NULL,
`mask` varchar(4) default NULL,
`status` varchar(8) default NULL,
`timestamp` varchar(40) default NULL,
`changed` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
KEY `id` (`id`),
KEY `dlr_index` (`smsc`,`timestamp`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

grant some user access rights to above created table.

GRANT SELECT, INSERT, UPDATE, DELETE ON dlr1 TO 'opensmppbox'@'127.0.0.1' IDENTIFIED BY 'myPassword';

Now we need to create config file of opensmpp, lets call it “smpp.conf”
use your favrout editor, mine is nano,

nano /usr/local/kannel/smpp.conf

and paste the following in file. You need to change things according to your needs.

group = core
dlr-storage = mysql
###################################
group = mysql-connection
id = dlr-db
host = 127.0.0.1
username = opensmppbox
password = "myPassword"
database = kannel
max-connections = 20

###################################
group = dlr-db
id = dlr-db
table = dlr1
field-smsc = smsc
field-timestamp = ts
field-destination = destination
field-source = source
field-service = service
field-url = url
field-mask = mask
field-status = status
field-boxc-id = boxc_id
###################################
group = opensmppbox
opensmppbox-id = smppbox1
opensmppbox-port = 8980
bearerbox-host = 127.0.0.1
bearerbox-port = 13002
log-level = 0
log-file = /var/log/kannel/opensmppbox.log
our-system-id = fdi
#route-to-smsc = hdroaming
use-systemid-as-smsboxid = 1
smpp-logins = "/usr/local/kannel/clients.txt"

Please pay Attention to above Conf, and see the 2 highlighted lines.

bearerbox-port = 13002 (this should be the port of your SMSbox)

smpp-logins = “/usr/local/kannel/clients.txt”

this is plain text file from where the openSMPP do the authentication. here is the example clients.txt

goodclient secret remote*.*.*.*
franchise ourpassword localbox 127.0.0.1;213.110.120.33

The first line defines a username (“goodclient”), a password (“secret”) and an smsbox-id (“remote”).People can log into this account, originating from any ip address.
The second line defines also a username (“franchise”), password(“ourpassword”) and an smsbox-id (“localbox”), but besides that there is a restriction on that user. It can only bind from the ip addresses 127.0.0.1 and 213.110.120.33. If ipaddress(es) is/are given, then only those ip addresses are allowed to connect. It works exactly like connect-allow-ip and connect-deny-ip in Kannel.conf. In that case, connect-deny-ip has a mask of “*.*.*.*”.

The third token in de smpp-logins file is the foreign system-type and is important in terms of Kannel’s sms routing rules. It is used as smsbox-id when connecting to bearerbox. This means that messages sent via that system-type will get corresponding dlr’s back. This also counts for MO messages. Also group =smsbox-route in Kannel.conf “listens” to this value. For this reason, it is important to use a different system-type for each different client unless they should receive each others’ messages. In caseuse-systemid-as-smsboxid = true, then in stead of system-type, system-id will be used as this”smsbox-id” value.