Installation et configuration de SMPP 3.4 et l'API de KANNEL

Fermé
mb42 Messages postés 432 Date d'inscription vendredi 17 octobre 2008 Statut Membre Dernière intervention 14 janvier 2014 - 24 févr. 2013 à 09:19
mb42 Messages postés 432 Date d'inscription vendredi 17 octobre 2008 Statut Membre Dernière intervention 14 janvier 2014 - 25 févr. 2013 à 13:10
Bonjour,


je veux utiliser le protocole SMPP 3.4 pour l'envoi des sms

et pour l'utiliser je dois utiliser l'API de KANNEL c'est open source sous linux

mon but est de savoir comment configurer cet API

A noter , je travail sous ubunu 10.10


merci d'avance

3 réponses

mb42 Messages postés 432 Date d'inscription vendredi 17 octobre 2008 Statut Membre Dernière intervention 14 janvier 2014 7
25 févr. 2013 à 13:10
j'ai modifié le fichier /etc/kannel/kannel.conf par :

# Syed Jahanzaib
    # https://aacable.wordpress.com/
    # aacable [at] hotmail.com

    group = core
    admin-port = 13000
    smsbox-port = 13001
    admin-password = zaibadmin
    status-password = zaibstatus
    log-file = "/var/log/kannel/bearerbox.log"
    log-level = 0
    box-deny-ip = "*.*.*.*"
    box-allow-ip = "127.0.0.1"

    group = smsc
    smsc = at
    modemtype = teltonika
    device = /dev/ttyACM0 # change this to match your port, it could ACM1 , if you dont set it correctly,  it will not work and you will get error in logs that unable to connect to device)
    speed = 19200
    my-number = 92568253 # (put your sim number, not necessary)

    group = modems
    id = teltonika
    name = "Teltonika E12"
    detect-string = "Undefined"
    enable-mms = true
    init-string = "AT+CNMI=2,2,0,1,1"
    speed = 115200

    group = smsbox
    bearerbox-host = localhost
    sendsms-port = 13013
    global-sender = 13013
    sendsms-chars = "0123456789 +-"
    log-file = "/var/log/kannel/smsbox.log"
    log-level = 0
    access-log = "/var/log/kannel/access.log"

    group = sendsms-user
    username = kannel
    password = kannel
    concatenation = true
    max-messages = 3

    group = sms-service
    keyword = default
    get-url = "http://localhost/kannel/receivesms.php?sender=%p&text=%b"
    accept-x-kannel-headers = true
    max-messages = 3
    concatenation = true
    catch-all = true


mais lors de test avec :

http://10.20.20.26:13000/status?password=zaibstatus</code>


j'ai ce message :

Kannel bearerbox version '1.4.3'. Build 'Apr 6 2010 13:16:08', compiler '4.4.3'. System Linux, release 2.6.32-41-generic, version #90-Ubuntu SMP Tue May 22 11:31:25 UTC 2012, machine i686. Hostname ubuntu, IP 127.0.1.1. Libxml version 2.7.6. Using OpenSSL 0.9.8k 25 Mar 2009. Compiled with MySQL 5.1.41, using MySQL 5.1.63. Using native malloc.

Status: running, uptime 0d 0h 9m 7s

WDP: received 0 (0 queued), sent 0 (0 queued)

SMS: received 0 (0 queued), sent 0 (0 queued), store size -1

SMS: inbound (0.00,0.00,0.00) msg/sec, outbound (0.00,0.00,0.00) msg/sec

DLR: 0 queued, using internal storage

No boxes connected

SMSC connections:
    unknown    AT2# change this to match your port, it could ACM1 , if you dont set it correctly, it will not work and you will get error in logs that unable to connect to device) (connecting, rcvd 0, sent 0, failed 0, queued 0 msgs)


je veux comprendre chaque paramètre du fichier kannel.conf
spécifiquement :

group = smsc
        smsc = at
        modemtype = teltonika
        device = /dev/ttyACM0 # change this to match your port, it could ACM1 , if you dont set it correctly,  it will not work and you will get error in logs that unable to connect to device)
1
jeanbi Messages postés 15118 Date d'inscription samedi 9 décembre 2006 Statut Contributeur Dernière intervention 6 février 2023 2 177
24 févr. 2013 à 09:45
bonjour,
au lieu de poster un peu partout ton message ... tu fesais une recherche via google
http://niteen.me/blog/tutorials/configure-kannel-on-ubuntu.html
a+
0
mb42 Messages postés 432 Date d'inscription vendredi 17 octobre 2008 Statut Membre Dernière intervention 14 janvier 2014 7
25 févr. 2013 à 10:55
en fait avant pour envoyer un sms j'ai travaillé avec clickatell

et j'ai utilisé ce code :
 Message = space_to_plus("message de test."),
    Url = io_lib:format("http://api.clickatell.com/http/sendmsg?user=...&password=...&api_id=...&to=216~s&text=~s", [Name, Message]),
    http:request(lists:flatten(Url), sms).


et pour le moment je veux utiliser la notion de smpp et api KANNEL

pour l'envoi du sms

pour commencer j'ai installer API KANNEL avec

apt-get install   KANNEL


mais il ya une configuration à faire dans le fichier

/etc/kannel/kannel.conf


pour le moment le contenu de ce fichier est :

#
# Sample configuration file for Kannel bearerbox on Debian.
# See the documentation for explanations of fields.
#
 
# HTTP administration is disabled by default. Make sure you set the
# password if you enable it.
 
group = core
admin-port = 13000
admin-password = bar
admin-deny-ip = "*.*.*.*"
admin-allow-ip = ""
wapbox-port = 13002
wdp-interface-name = "*"
log-file = "/var/log/kannel/bearerbox.log"
box-deny-ip = "*.*.*.*"
box-allow-ip = "127.0.0.1"
 
group = wapbox
bearerbox-host = localhost
log-file = "/var/log/kannel/wapbox.log"
0