Install and Configure Kannel to Work with SMPP

    Before beginning to use Kannel, it is necessary to install the Kannel gateway first.

    Kannel Gateway Installation

    1. Download the archive with a source code:
      wget https://redmine.kannel.org/attachments/download/199/gateway-1.5.0.zip
    2. Unzip the archive: unzip gateway-1.5.0.zip
    3. Compile and install the gateway: cd gateway-1.5.0 ./configure --with-mysql --enable-start-stop-daemon

    Note: You MUST install all required libraries (usually this is libxml2-dev or mysql-dev).


    Example for Ubuntu:
    sudo apt-get install libmysqlclient-dev
    sudo apt-get install libxml2-dev

    After installing all required packages the gateway is compiled

    touch .depend
    make .depend
    make
    make install

    The last command will install Kannel executables to your default directory ( /usr/local/sbin/ )

    After installation, download and unzip the archive.

    The archive contains the following files:

    • smskannel.conf – configuration file.
    • kannel.sh – start / stop system script.
    • kannel-install.txt – system installation description.
    • kannel-setup.sh – optional script, creates work directories.

    To complete the installation, launch kannel-setup.sh. This will create work directories, write configuration, and start script into /etc/kannel.

    Use . /etc/kannel/kannel.sh command to start.

    First, though, you need to open and edit the configuration file /etc/kannel/smskannel.conf.


    Edit parameters that are required to be changed:

    • smsc-username - use the received login
    • smsc-password - use the received password

    It is highly recommended that you “uncomment” any lines that relate to logging, and that you change ports and passwords.

    You can find settings and advanced settings descriptions in the formal documentation at
    http://kannel.org/download/kannel-userguide-snapshot/userguide.html, or contact our customer support.

    After you edit and run the system, check its status by putting these links in your browser:
    http://host:port/status?password=defined_password
    where
    host – IP-address of the server
    port – admin-port from Kannel settings
    defined_password – admin-password or status-password from Kannel settings.

    SMS is sent by sending a GET-request to the port specified in the smsbox section. See detailed information in the documentation at http://kannel.org/download/kannel-userguide-snapshot/userguide.html#AEN4952, You can also use this PHP script example (download).