#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2010
    Posts
    2
    Rep Power
    0

    Question How to send SMS using kannel & configuration of kannel.conf n smskannel.conf?


    im new to kannel,can anyone tell me how to send sms from kannel.
    i want complete step.
    Im using kannel 1.4.1 version,modem:BENQ G-33(connected to serial portRS232),SMS Center:BSNL.

    This is my kannel.conf file:
    group = core
    admin-port = 13000
    admin-password = bar
    admin-deny-ip = "*.*.*.*"
    admin-allow-ip = "127.0.0.1"
    wapbox-port = 13002
    wapbox-port-ssl=true
    #wdp-interface-name = "*"
    log-file = "/var/log/kannel/bearerbox.log"
    log-level=0
    access-log="/var/log/kannel/access.log"
    box-deny-ip = "*.*.*.*"
    box-allow-ip = "127.0.0.1"
    unified-prefix="+91"
    http-proxy-host=172.16.0.250
    http-proxy-port=3128
    http-proxy-username=aaa
    http-proxy-password=pwd
    ssl-client-certkey-file="mycertkeyfile.pem"

    group = wapbox
    bearerbox-host = localhost
    log-file = "/var/log/kannel/wapbox.log"

    #This is my smskannel.conf file
    #SMS Connection

    group=smsc
    smsc=fake
    smsc-id=FAKE
    #allowed-smsc-id=""
    #preferred-smsc-id="w"
    #allowed-prefix="+91;98;99;93;96"
    #denied-prefix=""
    port=13013
    connect-allow-ip=127.0.0.1
    log-file="/var/log/smskannel.log"
    log-level=0

    #This is fake smsc connection

    group=smsc
    smsc=at
    modemtype=auto
    device=/dev/ttyS0
    my-number=9404241190
    connect-allow-ip=127.0.0.1
    log-level=0

    #SMSBOX SETUP

    group=smsbox
    bearerbox-host=127.0.0.1
    sendsms-port=130019
    log-file="/var/log/smsbox.log"
    log-level=0

    #SEND-SMS USERS

    group=sendsms-user
    username=tester
    password=foobar
    max-messages=10
    #
    #SERVICES

    group=sms-service
    catch-all=yes
    max-messages=0
    get-url="http://website/templates/sms.php?sender=%p&text=%a"

    group=sms-service
    keyword=nop
    text="you asked nothing and i dit it!"

    #There should be always a 'default' service.This service is used when no
    #other 'sms-service' is applied.

    group=sms-service
    keyword=default
    text="No service specified"

    group=modems
    id=generic
    name="Generic Modem"
    detect-string="BENQ"
    need-sleep=true
    init-string="AT+CNMI=2,1,0,0,0"
    message-storage="SM"

    1)When i run ./bearerbox -v 1 kannel_new.conf file i'l get output

    ./bearerbox -v 1 /etc/kannel/kannel_new.conf
    2010-04-22 10:18:56 [7344] [0] INFO: Debug_lvl = 1, log_file = <none>, log_lvl = 0
    2010-04-22 10:18:56 [7344] [0] WARNING: DLR: using default 'internal' for storage type.
    2010-04-22 10:18:56 [7344] [0] INFO: DLR using storage type: internal
    2010-04-22 10:18:56 [7344] [0] INFO: Added logfile `/var/log/kannel/bearerbox.log' with level `0'.
    2010-04-22 10:18:56 [7344] [0] INFO: Started access logfile `/var/log/kannel/access.log'.
    2010-04-22 10:18:56 [7344] [0] PANIC: reading global client certificate file `mycertkeyfile.pem', the certificate isn't consistent with the private key (or failed reading the file)
    2010-04-22 10:18:56 [7344] [0] PANIC: ./bearerbox(gw_panic+0x107) [0x80c5557]
    2010-04-22 10:18:56 [7344] [0] PANIC: ./bearerbox(use_global_client_certkey_file+0xc6) [0x80b3336]
    2010-04-22 10:18:56 [7344] [0] PANIC: ./bearerbox(conn_config_ssl+0x4b) [0x80b356b]
    2010-04-22 10:18:56 [7344] [0] PANIC: ./bearerbox(main+0x4bd) [0x805431d]
    2010-04-22 10:18:56 [7344] [0] PANIC: /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe0) [0xb70a0450]
    2010-04-22 10:18:56 [7344] [0] PANIC: ./bearerbox [0x8053101]

    can u tell me is this correct?or expected output.

    when i'l give ./bearerbox -v 0 kannel_new.conf i'l get this output:
    output:
    ./bearerbox -v 0 /etc/kannel/kannel_new.conf
    2010-04-22 10:21:45 [7357] [0] INFO: Debug_lvl = 0, log_file = <none>, log_lvl = 0
    2010-04-22 10:21:45 [7357] [0] WARNING: DLR: using default 'internal' for storage type.
    2010-04-22 10:21:45 [7357] [0] INFO: DLR using storage type: internal
    2010-04-22 10:21:45 [7357] [0] DEBUG: Kannel bearerbox version `1.4.1'.
    Build `Mar 29 2008 11:04:25', compiler `4.2.3 (Ubuntu 4.2.3-2ubuntu6)'.
    System Linux, release 2.6.24-27-generic, version #1 SMP Fri Mar 12 01:10:31 UTC 2010, machine i686.
    Hostname sys-admin-desktop, IP 127.0.1.1.
    Libxml version 2.6.31.
    Using OpenSSL 0.9.8g 19 Oct 2007.
    Compiled with MySQL 5.0.51a, using MySQL 5.0.51a.
    Using native malloc.

    2010-04-22 10:21:45 [7357] [0] INFO: Added logfile `/var/log/kannel/bearerbox.log' with level `0'.
    2010-04-22 10:21:45 [7357] [0] INFO: Started access logfile `/var/log/kannel/access.log'.
    2010-04-22 10:21:45 [7357] [0] PANIC: reading global client certificate file `mycertkeyfile.pem', the certificate isn't consistent with the private key (or failed reading the file)
    2010-04-22 10:21:45 [7357] [0] PANIC: ./bearerbox(gw_panic+0x107) [0x80c5557]
    2010-04-22 10:21:45 [7357] [0] PANIC: ./bearerbox(use_global_client_certkey_file+0xc6) [0x80b3336]
    2010-04-22 10:21:45 [7357] [0] PANIC: ./bearerbox(conn_config_ssl+0x4b) [0x80b356b]
    2010-04-22 10:21:45 [7357] [0] PANIC: ./bearerbox(main+0x4bd) [0x805431d]
    2010-04-22 10:21:45 [7357] [0] PANIC: /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe0) [0xb715a450]
    2010-04-22 10:21:45 [7357] [0] PANIC: ./bearerbox [0x8053101]

    What is diffrence betewwn using 1 0r 0 in ./bearerbox -v 1 [conffile] or ./bearerbox -v 0 [conffile].

    please tell me expected output and whether my kannel_new.conf file is right or not?
    If is there anything wrong thn plese tell correct me.
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2010
    Posts
    2
    Rep Power
    0

    Problem solved


    Originally Posted by manusingh
    im new to kannel,can anyone tell me how to send sms from kannel.
    i want complete step.
    Im using kannel 1.4.1 version,modem:BENQ G-33(connected to serial portRS232),SMS Center:BSNL.

    This is my kannel.conf file:
    group = core
    admin-port = 13000
    admin-password = bar
    admin-deny-ip = "*.*.*.*"
    admin-allow-ip = "127.0.0.1"
    wapbox-port = 13002
    wapbox-port-ssl=true
    #wdp-interface-name = "*"
    log-file = "/var/log/kannel/bearerbox.log"
    log-level=0
    access-log="/var/log/kannel/access.log"
    box-deny-ip = "*.*.*.*"
    box-allow-ip = "127.0.0.1"
    unified-prefix="+91"
    http-proxy-host=172.16.0.250
    http-proxy-port=3128
    http-proxy-username=aaa
    http-proxy-password=pwd
    ssl-client-certkey-file="mycertkeyfile.pem"

    group = wapbox
    bearerbox-host = localhost
    log-file = "/var/log/kannel/wapbox.log"

    #This is my smskannel.conf file
    #SMS Connection

    group=smsc
    smsc=fake
    smsc-id=FAKE
    #allowed-smsc-id=""
    #preferred-smsc-id="w"
    #allowed-prefix="+91;98;99;93;96"
    #denied-prefix=""
    port=13013
    connect-allow-ip=127.0.0.1
    log-file="/var/log/smskannel.log"
    log-level=0

    #This is fake smsc connection

    group=smsc
    smsc=at
    modemtype=auto
    device=/dev/ttyS0
    my-number=9404241190
    connect-allow-ip=127.0.0.1
    log-level=0

    #SMSBOX SETUP

    group=smsbox
    bearerbox-host=127.0.0.1
    sendsms-port=130019
    log-file="/var/log/smsbox.log"
    log-level=0

    #SEND-SMS USERS

    group=sendsms-user
    username=tester
    password=foobar
    max-messages=10
    #
    #SERVICES

    group=sms-service
    catch-all=yes
    max-messages=0
    get-url="http://website/templates/sms.php?sender=%p&text=%a"

    group=sms-service
    keyword=nop
    text="you asked nothing and i dit it!"

    #There should be always a 'default' service.This service is used when no
    #other 'sms-service' is applied.

    group=sms-service
    keyword=default
    text="No service specified"

    group=modems
    id=generic
    name="Generic Modem"
    detect-string="BENQ"
    need-sleep=true
    init-string="AT+CNMI=2,1,0,0,0"
    message-storage="SM"

    1)When i run ./bearerbox -v 1 kannel_new.conf file i'l get output

    ./bearerbox -v 1 /etc/kannel/kannel_new.conf
    2010-04-22 10:18:56 [7344] [0] INFO: Debug_lvl = 1, log_file = <none>, log_lvl = 0
    2010-04-22 10:18:56 [7344] [0] WARNING: DLR: using default 'internal' for storage type.
    2010-04-22 10:18:56 [7344] [0] INFO: DLR using storage type: internal
    2010-04-22 10:18:56 [7344] [0] INFO: Added logfile `/var/log/kannel/bearerbox.log' with level `0'.
    2010-04-22 10:18:56 [7344] [0] INFO: Started access logfile `/var/log/kannel/access.log'.
    2010-04-22 10:18:56 [7344] [0] PANIC: reading global client certificate file `mycertkeyfile.pem', the certificate isn't consistent with the private key (or failed reading the file)
    2010-04-22 10:18:56 [7344] [0] PANIC: ./bearerbox(gw_panic+0x107) [0x80c5557]
    2010-04-22 10:18:56 [7344] [0] PANIC: ./bearerbox(use_global_client_certkey_file+0xc6) [0x80b3336]
    2010-04-22 10:18:56 [7344] [0] PANIC: ./bearerbox(conn_config_ssl+0x4b) [0x80b356b]
    2010-04-22 10:18:56 [7344] [0] PANIC: ./bearerbox(main+0x4bd) [0x805431d]
    2010-04-22 10:18:56 [7344] [0] PANIC: /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe0) [0xb70a0450]
    2010-04-22 10:18:56 [7344] [0] PANIC: ./bearerbox [0x8053101]

    can u tell me is this correct?or expected output.

    when i'l give ./bearerbox -v 0 kannel_new.conf i'l get this output:
    output:
    ./bearerbox -v 0 /etc/kannel/kannel_new.conf
    2010-04-22 10:21:45 [7357] [0] INFO: Debug_lvl = 0, log_file = <none>, log_lvl = 0
    2010-04-22 10:21:45 [7357] [0] WARNING: DLR: using default 'internal' for storage type.
    2010-04-22 10:21:45 [7357] [0] INFO: DLR using storage type: internal
    2010-04-22 10:21:45 [7357] [0] DEBUG: Kannel bearerbox version `1.4.1'.
    Build `Mar 29 2008 11:04:25', compiler `4.2.3 (Ubuntu 4.2.3-2ubuntu6)'.
    System Linux, release 2.6.24-27-generic, version #1 SMP Fri Mar 12 01:10:31 UTC 2010, machine i686.
    Hostname sys-admin-desktop, IP 127.0.1.1.
    Libxml version 2.6.31.
    Using OpenSSL 0.9.8g 19 Oct 2007.
    Compiled with MySQL 5.0.51a, using MySQL 5.0.51a.
    Using native malloc.

    2010-04-22 10:21:45 [7357] [0] INFO: Added logfile `/var/log/kannel/bearerbox.log' with level `0'.
    2010-04-22 10:21:45 [7357] [0] INFO: Started access logfile `/var/log/kannel/access.log'.
    2010-04-22 10:21:45 [7357] [0] PANIC: reading global client certificate file `mycertkeyfile.pem', the certificate isn't consistent with the private key (or failed reading the file)
    2010-04-22 10:21:45 [7357] [0] PANIC: ./bearerbox(gw_panic+0x107) [0x80c5557]
    2010-04-22 10:21:45 [7357] [0] PANIC: ./bearerbox(use_global_client_certkey_file+0xc6) [0x80b3336]
    2010-04-22 10:21:45 [7357] [0] PANIC: ./bearerbox(conn_config_ssl+0x4b) [0x80b356b]
    2010-04-22 10:21:45 [7357] [0] PANIC: ./bearerbox(main+0x4bd) [0x805431d]
    2010-04-22 10:21:45 [7357] [0] PANIC: /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe0) [0xb715a450]
    2010-04-22 10:21:45 [7357] [0] PANIC: ./bearerbox [0x8053101]

    What is diffrence betewwn using 1 0r 0 in ./bearerbox -v 1 [conffile] or ./bearerbox -v 0 [conffile].

    please tell me expected output and whether my kannel_new.conf file is right or not?
    If is there anything wrong thn plese tell correct me.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2010
    Posts
    3
    Rep Power
    0

    Sending many messages to many reciepients


    Hi,
    I am using kannel WAP gateway in Ubuntu 9.10, i want to send multiple messages to multiple recipients depending on on criteria determined from MySQL database using PHP script,Any Ideal

    Here is the sample of the loop am using to send messages


    PHP Code:
    while($noma=mysql_fetch_array($rt) { $to=$noma['mobile']; $msgText=$noma['message']; $URL "http://localhost:13013/cgi-bin/sendsms?username=".peter."&password=".malosha."&from=".GLOBAL_SENDER."&to=$to&text=".urlencode($msgText);     header('Location: '.$URL); } 
    whenever i try to execute that script it just send on message even if there was a possibility of many messages

    Please Help i am stack!

IMN logo majestic logo threadwatch logo seochat tools logo