SMPP Module for Kamailio
=====================
This module implements SMPP (Short Message Peer-to-Peer) protocol support
for Kamailio.
It supports both SMPP v3.4 and v5.0 protocols and provides database
authentication for SMPP clients.
Module Components
---------------
Core Components:
* smpp_mod.c/h - Main module interface
* smpp_server.c/h - SMPP server implementation
* smpp_protocol.h - SMPP protocol definitions
* smpp_operations.c/h - SMPP operations handling
* smpp_config.c/h - Configuration management
Routing Components:
* routing_blocks.c/h - Routing block implementation
* smpp_router.c/h - Message routing logic
Database Components:
* smpp_db.h - Database interface definitions
* smpp.sql - Database schema
Additional Components:
* smpp_rpc.c/h - RPC interface implementation
* smpp_lcr.h - Least Cost Routing definitions
* smpp_enum.h - ENUM support definitions
* smpp_udh.h - User Data Header support
Features
--------
* SMPP v3.4 and v5.0 support
* Database authentication
* IP-based access control
* Multiple concurrent binds support
* Connection tracking
* Automatic unbind on timeout
* TLS/SSL support
* Message queuing
* Rate limiting
* Character set conversion
* Routing capabilities
* RPC interface
Configuration
------------
The module can be configured in two ways:
1. Using Kamailio's main configuration file (kamailio.cfg):
```
loadmodule "smpp.so"
# Basic configuration
modparam("smpp", "config_file",
"/etc/kamailio/mod_smpp.conf")
```
2. Using the dedicated configuration file (mod_smpp.conf):
The module looks for the configuration file at `/etc/kamailio/mod_smpp.conf`
by default.
You can override this location using the config_file parameter.
Configuration Parameters
----------------------
All parameters can be set either in kamailio.cfg or in mod_smpp.conf:
Basic Settings:
* smpp_port (integer) - Port to listen for SMPP connections (default: 2775)
* max_connections (integer) - Maximum number of concurrent connections
(default: 100)
* smpp_version (integer) - SMPP protocol version (34 for v3.4, 50 for v5.0)
Database Settings:
* db_url (string) - Database URL for authentication
* auth_table (string) - Name of the authentication table (default:
smpp_auth)
Protocol Settings:
* max_pdu_size (integer) - Maximum PDU size in bytes (default: 4096)
* enquire_link_interval (integer) - Interval for keep-alive messages in
seconds (default: 30)
* inactivity_timeout (integer) - Connection timeout in seconds (default: 60)
Security Settings:
* enable_ip_acl (integer) - Enable IP-based access control (default: 1)
* max_failed_binds (integer) - Maximum failed bind attempts before blocking
(default: 3)
* block_duration (integer) - Block duration after max failed binds in
seconds (default: 300)
TLS Settings:
* enable_tls (integer) - Enable TLS support (default: 0)
* tls_cert_file (string) - TLS certificate file path
* tls_key_file (string) - TLS private key file path
* tls_ca_file (string) - TLS CA certificate file path
Database Schema
--------------
The module requires a database table for authentication. Create it using:
mysql -u user -p database_name < smpp.sql
Dependencies
-----------
* Kamailio Core
* Database module (mysql)
* OpenSSL libraries (for TLS support)
* srdb1 library
* trie library
Build Requirements
----------------
The module requires the following build flags (already set in Makefile):
* KAMAILIO_MOD_INTERFACE
* WITH_MYSQL
* USE_TLS
Authors
-------
Tarik Ogut (tarikogut(a)gmail.com)
Henning Westerholt <hw(a)gilawa.com>om>, 8 Oca 2025 Çar, 22:54 tarihinde şunu
yazdı:
Hello Tarik,
Ok, I see. 😊 You will probably learn it fast.
If you like, you can send me the module code or diff/patch by direct
e-mail, and I (or my colleague) will create a pull-request for you.
Cheers,
Henning
*From:* Tarık ÖĞÜT <tarikogut(a)gmail.com>
*Sent:* Mittwoch, 8. Januar 2025 19:44
*To:* Henning Westerholt <hw(a)gilawa.com>
*Cc:* Kamailio (SER) - Development Mailing List <sr-dev(a)lists.kamailio.org
*Subject:* Re: [sr-dev] mod_smpp
i never used github :(
Henning Westerholt <hw(a)gilawa.com>om>, 8 Oca 2025 Çar, 22:40 tarihinde şunu
yazdı:
Hello Tarik,
thank for the message, this new module looks indeed interesting!
Could you create a pull-request in our GitHub tracker for it? There might
be some topics that other developers can also share some comments or
suggestions.
We might also need to adapt a few things (e.g. the database table creation
step) before it can be merged.
Thanks, and regards,
Henning Westerholt
> -----Original Message-----
> From: Tarik ogut via sr-dev <sr-dev(a)lists.kamailio.org>
> Sent: Mittwoch, 8. Januar 2025 18:33
> To: sr-dev(a)lists.kamailio.org
> Cc: tarikogut(a)gmail.com
> Subject: [sr-dev] mod_smpp
> SMPP Module for Kamailio
> =====================
> This module implements SMPP (Short
Message Peer-to-Peer) protocol
> support for Kamailio.
> It supports both SMPP v3.4 and v5.0 protocols and provides database
> authentication for SMPP clients.
> Features
> --------
> * SMPP v3.4 and v5.0 support
> * Database authentication
> * IP-based access control
> * Multiple concurrent binds support
> * Connection tracking
> * Automatic unbind on timeout
> * TLS/SSL support
> * Message queuing
> * Rate limiting
> * Character set conversion
> Configuration
> ------------
> The module can be configured in two ways:
> 1. Using Kamailio's main
configuration file (kamailio.cfg):
> ```
> loadmodule "smpp.so"
> # Basic configuration
> modparam("smpp", "config_file",
"/etc/kamailio/mod_smpp.conf") ```
> 2. Using the dedicated configuration
file (mod_smpp.conf):
> The module looks for the configuration file at
`/etc/kamailio/mod_smpp.conf`
> by default.
> You can override this location using the config_file parameter.
> Configuration Parameters
> ----------------------
> All parameters can be set either in kamailio.cfg or in mod_smpp.conf:
> Basic Settings:
> * smpp_port (integer) - Port to listen for SMPP connections (default:
2775)
* max_connections (integer) - Maximum number of
concurrent connections
(default: 100)
* smpp_version (integer) - SMPP protocol version (34 for v3.4, 50 for
v5.0)
> Database Settings:
> * db_url (string) - Database URL for authentication
> * auth_table (string) - Name of the authentication table (default:
smpp_auth)
> Protocol Settings:
> * max_pdu_size (integer) - Maximum PDU size in bytes (default: 4096)
> * enquire_link_interval (integer) - Interval for keep-alive messages in
seconds
(default: 30)
* inactivity_timeout (integer) - Connection timeout in seconds (default:
60)
> Security Settings:
> * enable_ip_acl (integer) - Enable IP-based access control (default: 1)
> * max_failed_binds (integer) - Maximum failed bind attempts before
blocking
(default: 3)
* block_duration (integer) - Block duration after max failed binds in
seconds
> (default: 300)
> Logging Settings:
> * log_level (integer) - Log level (1-4: error, warn, info, debug)
(default: 3)
> * debug_pdu (integer) - Enable detailed PDU logging (default: 0)
> * log_file (string) - Log file path (default: /var/log/kamailio/smpp.log)
> Advanced Settings:
> * window_size (integer) - Window size for windowing/throttling (default:
10)
* max_message_rate (integer) - Maximum message
rate per second (0 =
unlimited)
* default_charset (string) - Character set for message conversion
(default: UTF-
> 8)
> * enable_queue (integer) - Enable message queuing (default: 1)
> * max_queue_size (integer) - Maximum queue size (default: 1000)
> TLS Settings:
> * enable_tls (integer) - Enable TLS support (default: 0)
> * tls_cert_file (string) - TLS certificate file path
> * tls_key_file (string) - TLS private key file path
> * tls_ca_file (string) - TLS CA certificate file path
> Database Schema
> --------------
> The module requires a database table for authentication. Create it using:
> mysql -u user -p database_name
< smpp.sql
> Example Configuration
> -------------------
> 1. In kamailio.cfg:
> ```
> loadmodule "smpp.so"
> modparam("smpp", "config_file",
"/etc/kamailio/mod_smpp.conf") ```
> 2. In mod_smpp.conf:
> ```
> # Basic settings
> smpp_port = 2775
> max_connections = 100
> smpp_version = 34
> # Database settings
> db_url = "mysql://kamailio:kamailiorw@localhost/kamailio"
> auth_table = "smpp_auth"
> # Security settings
> enable_ip_acl = 1
> max_failed_binds = 3
> # TLS settings
> enable_tls = 1
> tls_cert_file = "/etc/kamailio/certs/smpp_cert.pem"
> tls_key_file = "/etc/kamailio/certs/smpp_key.pem"
> tls_ca_file = "/etc/kamailio/certs/ca.pem"
> ```
> Dependencies
> -----------
> * Kamailio Core
> * Database module (mysql, postgresql, etc.)
> * TLS module (if TLS support is enabled)
> Author
> ------
> Kamailio Project (
https://www.kamailio.org) Tarik Ogut
> (tarikogut(a)gmail.com)
> _______________________________________________
> Kamailio - Development Mailing List -- sr-dev(a)lists.kamailio.org To
> unsubscribe send an email to sr-dev-leave(a)lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
the
sender!