Results 1 to 6 of 6

Thread: Using kannel for sending SMS

  1. #1
    Join Date
    Nov 2010
    Posts
    62

    Using kannel for sending SMS

    I am having Fedora operating system installed on my desktop which belongs to the Linux family. I have downloaded and installed kannel on my system for sending messages. I have also configured kannel successfully. When I want to send messages I am not able to send it. Is there any installation problem with kannel? Also give me the installation and configuration steps so that I can fix the problem.

  2. #2
    Join Date
    Nov 2009
    Posts
    1,118

    Re: Using kannel for sending SMS

    Kannel is software used for sending and receiving messages. The steps for downloading and installation of kannel are given below:
    The kannel software is very easy to download and compile. For downloading you need to visit the website and download gateway-1.X.Y.tar.gz file.
    The command for downloading is given below
    Code:
    # mkdir src
    # cd src
    # tar xfz ../downloads/gateway-1.4.1.tar.gz
    # cd gateway-1.4.1
    # configure --prefix=/usr/local/kannel
    Now install the kannel to the /usr/local/kannel folder.
    The code for compiling and installing is given below
    Code:
    # make
    # sudo make install
    password: **************
    If you have set the password for your system then you need to enter it for installing. The installation of kannel will start.

  3. #3
    Join Date
    Nov 2009
    Posts
    712

    Re: Using kannel for sending SMS

    After performing the installation of kannel software you need to set up the configuration files. This file is having a zillion options to support kannel in all the possible ways and methods. The simple smskannel.conf file in the gw/ directory has all the basic information we want. The configuration is divided into several parts including server that handle sending and receiving of SMS and system that handles final dispatching of scripts.

    The configuration for “Core” group is given below:
    group = core
    admin-port = 13000
    smsbox-port = 13001
    admin-password = bar
    #log-file = "/tmp/kannel.log"
    #log-level = 0
    box-deny-ip = "*.*.*.*"
    box-allow-ip = "127.0.0.1"

    The configuration for smsc is given below
    group = smsc
    smsc = at
    modemtype = auto
    device=/dev/ttyS0
    my-number = 123123123123
    connect-allow-ip = 127.0.0.1
    log-level = 0

  4. #4
    Join Date
    Nov 2009
    Posts
    877

    Re: Using kannel for sending SMS

    Steps to send messages via kannel are very simple. We can also send messages via HTTP interface whereas you can send messages in PHP5 by using the iconv function. The code to send messages using kannel is given below:

    function sendSmsMessage($in_phoneNumber, $in_msg)
    {
    $url = '/cgi-bin/sendsms?username=' . CONFIG_KANNEL_USER_NAME
    . '&password=' . CONFIG_KANNEL_PASSWORD
    . '&charset=UCS-2&coding=2'
    . "&to={$in_phoneNumber}"
    . '&text=' . urlencode(iconv('utf-8', 'ucs-2', $in_msg));

    $results = file('http://'
    . CONFIG_KANNEL_HOST . ':'
    . CONFIG_KANNEL_PORT . $url);
    }

    You need to set allow_url_fopen to on in order to send message.

  5. #5
    Join Date
    Nov 2009
    Posts
    862

    Re: Using kannel for sending SMS

    The above solutions works fine and I have downloaded and installed kannel on my system. After successfully configuring the kannel I am facing the problem. The messages are not send it is blocked by the PHP scripts coming from the internet. Is there any way to stop the PHP scripts so that it doesn’t block the messages?

  6. #6
    Join Date
    Nov 2009
    Posts
    569

    Re: Using kannel for sending SMS

    When successfully installing kannel on the system the server listens to a particular ports. On that port the request is send. So if you want to send SMS you can send it by making use of the PHP script using the fopen command. It will connect to a particular port which is specified in the code. The code of fopen command is given below:

    Code:
    #!/usr/bin/php -q
    <?php
     
    $fd = fopen("php://stdin", "r");
    $email = "";
    while (!feof($fd))
    {
    	$email .= fread($fd, 1024);
    }
    fclose($fd);
    mail('you@yoursite.com','From my email pipe!','"' . $email . '"');
    ?>

Similar Threads

  1. SMS is not sending by Nokia X3-02
    By Sparrow in forum Portable Devices
    Replies: 3
    Last Post: 26-11-2010, 10:57 PM
  2. Using kannel SMPP and GSM Modem simultaneously
    By ravinderroy in forum Operating Systems
    Replies: 4
    Last Post: 16-11-2010, 09:35 AM
  3. Sending a Fax
    By saly in forum Technology & Internet
    Replies: 1
    Last Post: 02-09-2010, 04:34 PM
  4. Sending Attachment of 50 MB
    By s2009 in forum Technology & Internet
    Replies: 5
    Last Post: 21-07-2009, 07:13 AM
  5. SMS sending problem
    By AniketS in forum Portable Devices
    Replies: 4
    Last Post: 16-08-2008, 02:22 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,129,992.14011 seconds with 16 queries