Kannel with LOX24

Kannel is an opensource SMS gateway and a real dinosaur in the best sense of the word. A dinosaur because the Kannel development began back in 1999. Also a dinosaur because of its size. The Kannel system consists of 300,000 lines of C code. Such a large project cannot be easily replaced or redeveloped.

And although we affectionately call Kannel the dinosaur, Kannel is still very much alive today. Not only because a lot of customers and also we ourselves use Kannel as a client to connect SMPP connections, but because after a long break between 2014 and 2018 life and movement has returned to the project.

LOX24 and SMPP

How does LOX24 come into play now? We do not actually offer an SMPP interface for sending SMS. SMPP is a compact binary protocol that is ideal for large SMS volumes with low bandwidth usage and consumes very little power. However, it also keeps one or more TCP sockets permanently connected to the SMSC, which has a poor impact on scalability, load balancing, and failover.

Worse, SMPP offers no transport-level security, such as SSL/TLS, and sends all your data, including credentials, as plain text. The connection must therefore be secured via VPN or tunnel, which brings additional complexity and susceptibility to interference into play.

HTTPS SMS is the solution

So it is advantageous to connect Kannel with our https SMS API. Then we have the advantage of SSL encryption without any additional tools and at the same time Kannel customers can continue to use their usual tool and do not need to integrate our API into their system. If you already use SMPP connections with Kannel, you can configure our SMS gateway in about 5 minutes and use it like any other SMS connection.

Kannel is inherently compatible with https. So there is no need to change the source code of Kannel or install anything additional. Normally one would use the system type “generic” (group = smsc, smsc = http, system-type = kannel). However, “generic” is complicated to configure and – once you get into the edge cases – it is also very limited compared to the other SMSC types.

We therefore use“system-type = kannel“. This https connection is actually intended to connect different Kannel clients, but is perfectly suited to use the LOX24 SMS Gateway. For Kannel it looks like the SMS are sent to another Kannel client. In reality, however, the SMS are sent to the LOX24 SMS Api. This is not a disadvantage for Kannel and a big advantage for you as a Kannel user, because this makes configuration extremely easy and there are no disadvantages like with the generic type. If you like, LOX24 simulates being a small Kannel.

However, you must make a decision in advance. How would you like to receive the delivery reports. We can either send them directly to your system, so for example a URL on your server or a mail address. In this case, we do not send the delivery reports back to Kannel, but directly to you. Or we can send the delivery reports back to Kannel and you can then receive the delivery reports from Kannel. This solution is mostly useful if you already send SMS with Kannel via SMPP and process the delivery reports from Kannel.

Variant 1: Delivery reports directly to you

In Kannel, you create the following configuration:

group = smsc
smsc = http
system-type = kannel
smsc-id = "lox24"
allowed-smsc-id = "lox24"
port = 10443
send-url = "https://lox24.eu/api/kannel/{SERVICE_CODE}.php"
smsc-username = "{USER_ID}"
smsc-password = "{API_KEY}"
max-sms-octets = 1530

  • SERVICE_CODE – replace with the SMS type you want to use, i.e. ‘economy’, ‘pro’ or ‘direct’.
  • USER_ID – is your customer no. as you also use it for the login on our website
  • API_KEY – is the key which you can generate in your web account in the API settings. You must select the ‘Kannel’ type.

The delivery reports go to the URL you have set in your web account as notification endpoint. This can also be a mail address.

Variant 2: Delivery reports to Kannel

In this case, create the following configuration in Kannel:

group = smsc
smsc = http
system-type = kannel
smsc-id = "lox24"
allowed-smsc-id = "lox24"
port = 10443
send-url = "https://lox24.eu/api/kannel/{SERVICE_CODE}.php"
smsc-username = "{USER_ID}"
smsc-password = "{API_KEY}"
dlr-url = "http://youhosthere.com:10443/?username={USER_ID}&password={API_KEY}"
connect-allow-ip = "127.0.0.1;213.133.127.70;116.203.64.153;85.10.245.*"
max-sms-octets = 1530

  • SERVICE_CODE – replace with the SMS type you want to use, i.e. ‘economy’, ‘pro’ or ‘direct’.
  • USER_ID – is your customer no. as you also use it for the login on our website
  • API_KEY – is the key which you can generate in your web account in the API settings. You must select the ‘Kannel’ type.
  • youhosthere.com:10443 – you must replace with the address of your Kannel installation

In the SMSC configuration we use port 10443, but it can be any port you like. We strongly recommend to allow only the LOX24 server in your firewall setting so that nobody else sends DLRs to your channel:

LOX24 servers: 116.203.64.153, 213.133.127.127.70, 85.10.245.*

A bit more information about the delivery reports and the exact configuration can be found in our API description.

You might also like

Mails in SMS umwandeln und so via SMS Gateway versenden

With Mail2SMS you can send SMS directly by e-mail without the need for any technical knowledge. A mail SMS gateway is a service that converts e-mails into SMS and forwards them to the desired recipients.

Register now and test for free

You can test our service with 50 Cent free credits. Register now!