IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Applications et environnements graphiques Discussion :

installation et configuration de SMPP 3.4 et l’API de KANNEL


Sujet :

Applications et environnements graphiques

  1. #1
    Membre régulier
    Homme Profil pro
    Inscrit en
    Juin 2012
    Messages
    180
    Détails du profil
    Informations personnelles :
    Sexe : Homme

    Informations forums :
    Inscription : Juin 2012
    Messages : 180
    Points : 73
    Points
    73
    Par défaut installation et configuration de SMPP 3.4 et l’API de KANNEL
    salut,

    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

  2. #2
    Expert confirmé
    Avatar de becket
    Profil pro
    Informaticien multitâches
    Inscrit en
    Février 2005
    Messages
    2 854
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations professionnelles :
    Activité : Informaticien multitâches
    Secteur : Service public

    Informations forums :
    Inscription : Février 2005
    Messages : 2 854
    Points : 5 915
    Points
    5 915
    Par défaut
    Oui et ? Ce n'est pas une question ! Quel est le soucis ?

  3. #3
    Membre régulier
    Homme Profil pro
    Inscrit en
    Juin 2012
    Messages
    180
    Détails du profil
    Informations personnelles :
    Sexe : Homme

    Informations forums :
    Inscription : Juin 2012
    Messages : 180
    Points : 73
    Points
    73
    Par défaut
    en fait avant pour envoyer un sms j'ai travaillé avec clickatell

    et j'ai utilisé ce code :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
     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

    mais il ya une configuration à faire dans le fichier
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    /etc/kannel/kannel.conf
    pour le moment le contenu de ce fichier est :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
     
    #
    # 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"

  4. #4
    Membre régulier
    Homme Profil pro
    Inscrit en
    Juin 2012
    Messages
    180
    Détails du profil
    Informations personnelles :
    Sexe : Homme

    Informations forums :
    Inscription : Juin 2012
    Messages : 180
    Points : 73
    Points
    73
    Par défaut
    j'ai modifié le fichier /etc/kannel/kannel.conf par :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    # Syed Jahanzaib
        # http://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 :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    http://10.20.20.26:13000/status?password=zaibstatus
    j'ai ce message :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    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[/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)] (connecting, rcvd 0, sent 0, failed 0, queued 0 msgs)
    je veux comprendre chaque paramètre du fichier kannel.conf
    spécifiquement

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    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)

    quand j'ai testé avec :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
    http://10.20.20.26:13013/cgi-bin/sendsms?username=kannel&password=kannel&to=22222222&text=ZAIB+KANNEL+WORK
    j'ai ce message :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    3: Queued for later delivery
    pour le log du fichier bearerbox.log


    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    2013-02-22 07:39:41 [14035] [0] INFO: Added logfile `/var/log/kannel/bearerbox.log' with level `0'.
    2013-02-22 07:39:41 [14035] [0] INFO: HTTP: Opening server at port 13000.
    2013-02-22 07:39:41 [14035] [0] DEBUG: Started thread 1 (gwlib/fdset.c:poller)
    2013-02-22 07:39:41 [14035] [0] DEBUG: Started thread 2 (gwlib/http.c:server_thread)
    2013-02-22 07:39:41 [14035] [1] DEBUG: Thread 1 (gwlib/fdset.c:poller) maps to pid 14035.
    2013-02-22 07:39:41 [14035] [0] DEBUG: Started thread 3 (gw/bb_http.c:httpadmin_run)
    2013-02-22 07:39:41 [14035] [0] DEBUG: starting UDP sender/receiver module
    2013-02-22 07:39:41 [14035] [0] INFO: Adding interface *
    2013-02-22 07:39:41 [14035] [2] DEBUG: Thread 2 (gwlib/http.c:server_thread) maps to pid 14035.
    2013-02-22 07:39:41 [14035] [0] DEBUG: udpc_create: Bound to UDP <0.0.0.0:9200>
    2013-02-22 07:39:41 [14035] [3] DEBUG: Thread 3 (gw/bb_http.c:httpadmin_run) maps to pid 14035.
    2013-02-22 07:39:41 [14035] [0] DEBUG: Started thread 4 (gw/bb_udp.c:udp_receiver)
    2013-02-22 07:39:41 [14035] [0] DEBUG: Started thread 5 (gw/bb_udp.c:udp_sender)
    2013-02-22 07:39:41 [14035] [4] DEBUG: Thread 4 (gw/bb_udp.c:udp_receiver) maps to pid 14035.
    2013-02-22 07:39:41 [14035] [0] DEBUG: udpc_create: Bound to UDP <0.0.0.0:9201>
    2013-02-22 07:39:41 [14035] [5] DEBUG: Thread 5 (gw/bb_udp.c:udp_sender) maps to pid 14035.
    2013-02-22 07:39:41 [14035] [6] DEBUG: Thread 6 (gw/bb_udp.c:udp_receiver) maps to pid 14035.
    2013-02-22 07:39:41 [14035] [0] DEBUG: Started thread 6 (gw/bb_udp.c:udp_receiver)
    2013-02-22 07:39:41 [14035] [0] DEBUG: Started thread 7 (gw/bb_udp.c:udp_sender)
    2013-02-22 07:39:41 [14035] [7] DEBUG: Thread 7 (gw/bb_udp.c:udp_sender) maps to pid 14035.
    2013-02-22 07:39:41 [14035] [0] DEBUG: starting wapbox connection module
    2013-02-22 07:39:41 [14035] [0] DEBUG: Started thread 8 (gw/bb_boxc.c:wdp_to_wapboxes)
    2013-02-22 07:39:41 [14035] [8] DEBUG: Thread 8 (gw/bb_boxc.c:wdp_to_wapboxes) maps to pid 14035.
    2013-02-22 07:39:41 [14035] [0] DEBUG: Started thread 9 (gw/bb_boxc.c:wapboxc_run)
    2013-02-22 07:39:41 [14035] [0] DEBUG: starting WDP router
    2013-02-22 07:39:41 [14035] [9] DEBUG: Thread 9 (gw/bb_boxc.c:wapboxc_run) maps to pid 14035.
    2013-02-22 07:39:41 [14035] [0] DEBUG: Started thread 10 (gw/bearerbox.c:wdp_router)
    2013-02-22 07:39:41 [14035] [0] INFO: ----------------------------------------
    2013-02-22 07:39:41 [14035] [0] INFO: Kannel bearerbox II version 1.4.3 starting
    2013-02-22 07:39:41 [14035] [0] INFO: MAIN: Start-up done, entering mainloop
    2013-02-22 07:39:41 [14035] [10] DEBUG: Thread 10 (gw/bearerbox.c:wdp_router) maps to pid 14035.
    2013-02-22 07:39:42 [14035] [9] INFO: Client connected from <127.0.0.1> 
    2013-02-22 07:39:42 [14035] [9] DEBUG: Started thread 11 (gw/bb_boxc.c:function)
    2013-02-22 07:39:42 [14035] [11] DEBUG: Thread 11 (gw/bb_boxc.c:function) maps to pid 14035.
    2013-02-22 07:39:42 [14035] [11] DEBUG: setting up systems for new wapbox
    2013-02-22 07:39:42 [14035] [11] DEBUG: Started thread 12 (gw/bb_boxc.c:boxc_sender)
    2013-02-22 07:39:42 [14035] [12] DEBUG: Thread 12 (gw/bb_boxc.c:boxc_sender) maps to pid 14035.
    2013-02-25 01:16:38 [14035] [11] INFO: Connection closed by the box <127.0.0.1>
    2013-02-25 01:16:38 [14035] [12] DEBUG: send_msg: sending msg to box: <127.0.0.1>
    2013-02-25 01:16:38 [14035] [12] DEBUG: Thread 12 (gw/bb_boxc.c:boxc_sender) terminates.
    2013-02-25 01:16:38 [14035] [11] DEBUG: Thread 11 (gw/bb_boxc.c:function) terminates.
    2013-02-25 01:16:38 [14035] [0] WARNING: Killing signal or HTTP admin command received, shutting down...
    2013-02-25 01:16:38 [14035] [0] DEBUG: Shutting down Kannel...
    2013-02-25 01:16:38 [14035] [0] DEBUG: shutting down smsc
    2013-02-25 01:16:38 [14035] [0] DEBUG: shutting down udp
    2013-02-25 01:16:38 [14035] [0] DEBUG: udp_shutdown: Starting avalanche
    2013-02-25 01:16:38 [14035] [6] DEBUG: Thread 6 (gw/bb_udp.c:udp_receiver) terminates.
    2013-02-25 01:16:38 [14035] [4] DEBUG: Thread 4 (gw/bb_udp.c:udp_receiver) terminates.
    2013-02-25 01:16:38 [14035] [8] DEBUG: wdp_to_wapboxes: destroying lists
    2013-02-25 01:16:38 [14035] [8] DEBUG: Thread 8 (gw/bb_boxc.c:wdp_to_wapboxes) terminates.
    2013-02-25 01:16:39 [14035] [9] DEBUG: Thread 9 (gw/bb_boxc.c:wapboxc_run) terminates.
    2013-02-25 01:16:39 [14035] [10] DEBUG: udp_die: removing producers from udp-lists
    2013-02-25 01:16:39 [14035] [0] INFO: All flow threads have died, killing core
    2013-02-25 01:16:39 [14035] [10] DEBUG: Thread 10 (gw/bearerbox.c:wdp_router) terminates.
    2013-02-25 01:16:39 [14035] [7] DEBUG: Thread 7 (gw/bb_udp.c:udp_sender) terminates.
    2013-02-25 01:16:39 [14035] [5] DEBUG: Thread 5 (gw/bb_udp.c:udp_sender) terminates.
    2013-02-25 01:16:39 [14035] [0] DEBUG: Waiting for 2 (gwlib/http.c:server_thread) to terminate
    2013-02-25 01:16:39 [14035] [3] DEBUG: HTTP: No clients with requests, quitting.
    2013-02-25 01:16:39 [14035] [3] DEBUG: Thread 3 (gw/bb_http.c:httpadmin_run) terminates.
    2013-02-25 01:16:39 [14035] [2] DEBUG: Thread 2 (gwlib/http.c:server_thread) terminates.
    2013-02-25 01:16:39 [14035] [1] DEBUG: Thread 1 (gwlib/fdset.c:poller) terminates.
    2013-02-25 01:16:39 [14035] [0] INFO: Total WDP messages: received 0, sent 0
    2013-02-25 01:16:39 [14035] [0] INFO: Total SMS messages: received 0, sent 0
    2013-02-25 01:16:39 [14035] [0] DEBUG: Immutable octet strings: 77.
    2013-02-25 02:16:14 [15173] [0] INFO: Added logfile `/var/log/kannel/bearerbox.log' with level `0'.
    2013-02-25 02:16:14 [15173] [0] INFO: HTTP: Opening server at port 13000.
    2013-02-25 02:16:14 [15173] [0] DEBUG: Started thread 1 (gwlib/fdset.c:poller)
    2013-02-25 02:16:14 [15173] [0] DEBUG: Started thread 2 (gwlib/http.c:server_thread)
    2013-02-25 02:16:14 [15173] [0] DEBUG: Started thread 3 (gw/bb_http.c:httpadmin_run)
    2013-02-25 02:16:14 [15173] [2] DEBUG: Thread 2 (gwlib/http.c:server_thread) maps to pid 15173.
    2013-02-25 02:16:14 [15173] [3] DEBUG: Thread 3 (gw/bb_http.c:httpadmin_run) maps to pid 15173.
    2013-02-25 02:16:14 [15173] [1] DEBUG: Thread 1 (gwlib/fdset.c:poller) maps to pid 15173.
    2013-02-25 02:16:14 [15173] [0] DEBUG: starting UDP sender/receiver module
    2013-02-25 02:16:14 [15173] [0] INFO: Adding interface *
    2013-02-25 02:16:14 [15173] [0] DEBUG: udpc_create: Bound to UDP <0.0.0.0:9200>
    2013-02-25 02:16:14 [15173] [0] DEBUG: Started thread 4 (gw/bb_udp.c:udp_receiver)
    2013-02-25 02:16:14 [15173] [0] DEBUG: Started thread 5 (gw/bb_udp.c:udp_sender)
    2013-02-25 02:16:14 [15173] [4] DEBUG: Thread 4 (gw/bb_udp.c:udp_receiver) maps to pid 15173.
    2013-02-25 02:16:14 [15173] [0] DEBUG: udpc_create: Bound to UDP <0.0.0.0:9201>
    2013-02-25 02:16:14 [15173] [0] DEBUG: Started thread 6 (gw/bb_udp.c:udp_receiver)
    2013-02-25 02:16:14 [15173] [5] DEBUG: Thread 5 (gw/bb_udp.c:udp_sender) maps to pid 15173.
    2013-02-25 02:16:14 [15173] [0] DEBUG: Started thread 7 (gw/bb_udp.c:udp_sender)
    2013-02-25 02:16:14 [15173] [6] DEBUG: Thread 6 (gw/bb_udp.c:udp_receiver) maps to pid 15173.
    2013-02-25 02:16:14 [15173] [0] DEBUG: starting wapbox connection module
    2013-02-25 02:16:14 [15173] [7] DEBUG: Thread 7 (gw/bb_udp.c:udp_sender) maps to pid 15173.
    2013-02-25 02:16:14 [15173] [0] DEBUG: Started thread 8 (gw/bb_boxc.c:wdp_to_wapboxes)
    2013-02-25 02:16:14 [15173] [0] DEBUG: Started thread 9 (gw/bb_boxc.c:wapboxc_run)
    2013-02-25 02:16:14 [15173] [0] DEBUG: starting WDP router
    2013-02-25 02:16:14 [15173] [0] DEBUG: Started thread 10 (gw/bearerbox.c:wdp_router)
    2013-02-25 02:16:14 [15173] [0] INFO: ----------------------------------------
    2013-02-25 02:16:14 [15173] [0] INFO: Kannel bearerbox II version 1.4.3 starting
    2013-02-25 02:16:14 [15173] [9] DEBUG: Thread 9 (gw/bb_boxc.c:wapboxc_run) maps to pid 15173.
    2013-02-25 02:16:14 [15173] [10] DEBUG: Thread 10 (gw/bearerbox.c:wdp_router) maps to pid 15173.
    2013-02-25 02:16:14 [15173] [8] DEBUG: Thread 8 (gw/bb_boxc.c:wdp_to_wapboxes) maps to pid 15173.
    2013-02-25 02:16:14 [15173] [0] INFO: MAIN: Start-up done, entering mainloop
    2013-02-25 02:18:07 [15173] [0] WARNING: Killing signal or HTTP admin command received, shutting down...
    2013-02-25 02:18:07 [15173] [0] DEBUG: Shutting down Kannel...
    2013-02-25 02:18:07 [15173] [0] DEBUG: shutting down smsc
    2013-02-25 02:18:07 [15173] [0] DEBUG: shutting down udp
    2013-02-25 02:18:07 [15173] [0] DEBUG: udp_shutdown: Starting avalanche
    2013-02-25 02:18:07 [15173] [6] DEBUG: Thread 6 (gw/bb_udp.c:udp_receiver) terminates.
    2013-02-25 02:18:07 [15173] [4] DEBUG: Thread 4 (gw/bb_udp.c:udp_receiver) terminates.
    2013-02-25 02:18:07 [15173] [8] DEBUG: wdp_to_wapboxes: destroying lists
    2013-02-25 02:18:07 [15173] [8] DEBUG: Thread 8 (gw/bb_boxc.c:wdp_to_wapboxes) terminates.
    2013-02-25 02:18:07 [15173] [9] DEBUG: Thread 9 (gw/bb_boxc.c:wapboxc_run) terminates.
    2013-02-25 02:18:07 [15173] [10] DEBUG: udp_die: removing producers from udp-lists
    2013-02-25 02:18:07 [15173] [10] DEBUG: Thread 10 (gw/bearerbox.c:wdp_router) terminates.
    2013-02-25 02:18:07 [15173] [5] DEBUG: Thread 5 (gw/bb_udp.c:udp_sender) terminates.
    2013-02-25 02:18:07 [15173] [7] DEBUG: Thread 7 (gw/bb_udp.c:udp_sender) terminates.
    2013-02-25 02:18:07 [15173] [0] INFO: All flow threads have died, killing core
    2013-02-25 02:18:07 [15173] [0] DEBUG: Waiting for 2 (gwlib/http.c:server_thread) to terminate
    2013-02-25 02:18:07 [15173] [3] DEBUG: HTTP: No clients with requests, quitting.
    2013-02-25 02:18:07 [15173] [3] DEBUG: Thread 3 (gw/bb_http.c:httpadmin_run) terminates.
    2013-02-25 02:18:07 [15173] [0] PANIC: Cannot die by its own will
    2013-02-25 02:18:07 [15173] [2] DEBUG: Thread 2 (gwlib/http.c:server_thread) terminates.
    2013-02-25 02:18:07 [15173] [0] PANIC: bearerbox(gw_panic+0xcd) [0x80d21ed]
    2013-02-25 02:18:07 [15173] [0] PANIC: bearerbox() [0x80548f0]
    2013-02-25 02:18:07 [15173] [0] PANIC: [0x277400]
    2013-02-25 02:18:07 [15173] [0] PANIC: bearerbox(http_close_all_ports+0x2e) [0x80cb81e]
    2013-02-25 02:18:07 [15173] [0] PANIC: bearerbox(httpadmin_stop+0xb) [0x805a05b]
    2013-02-25 02:18:07 [15173] [0] PANIC: bearerbox(main+0x9fc) [0x805568c]
    2013-02-25 02:18:07 [15173] [0] PANIC: /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6) [0xdc8bd6]
    2013-02-25 02:18:07 [15173] [0] PANIC: bearerbox() [0x8053f51]
    2013-02-25 02:24:59 [15280] [0] INFO: Added logfile `/var/log/kannel/bearerbox.log' with level `0'.
    2013-02-25 02:24:59 [15280] [0] INFO: HTTP: Opening server at port 13000.
    2013-02-25 02:24:59 [15280] [0] DEBUG: Started thread 1 (gwlib/fdset.c:poller)
    2013-02-25 02:24:59 [15280] [1] DEBUG: Thread 1 (gwlib/fdset.c:poller) maps to pid 15280.
    2013-02-25 02:24:59 [15280] [0] DEBUG: Started thread 2 (gwlib/http.c:server_thread)
    2013-02-25 02:24:59 [15280] [0] DEBUG: Started thread 3 (gw/bb_http.c:httpadmin_run)
    2013-02-25 02:24:59 [15280] [2] DEBUG: Thread 2 (gwlib/http.c:server_thread) maps to pid 15280.
    2013-02-25 02:24:59 [15280] [0] DEBUG: starting smsbox connection module
    2013-02-25 02:24:59 [15280] [3] DEBUG: Thread 3 (gw/bb_http.c:httpadmin_run) maps to pid 15280.
    2013-02-25 02:24:59 [15280] [0] INFO: BOXC: 'smsbox-max-pending' not set, using default (100).
    2013-02-25 02:24:59 [15280] [0] DEBUG: Started thread 4 (gw/bb_boxc.c:sms_to_smsboxes)
    2013-02-25 02:24:59 [15280] [4] DEBUG: Thread 4 (gw/bb_boxc.c:sms_to_smsboxes) maps to pid 15280.
    2013-02-25 02:24:59 [15280] [0] DEBUG: Started thread 5 (gw/bb_boxc.c:smsboxc_run)
    2013-02-25 02:24:59 [15280] [5] DEBUG: Thread 5 (gw/bb_boxc.c:smsboxc_run) maps to pid 15280.
    2013-02-25 02:24:59 [15280] [0] INFO: Set SMS resend frequency to 60 seconds.
    2013-02-25 02:24:59 [15280] [0] INFO: SMS resend retry set to unlimited.
    2013-02-25 02:24:59 [15280] [0] DEBUG: smsbox MO concatenated message handling enabled
    2013-02-25 02:24:59 [15280] [0] INFO: DLR rerouting for smsc id <(null)> disabled.
    2013-02-25 02:24:59 [15280] [0] INFO: AT2[/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)]: configuration shows modemtype <teltonika>
    2013-02-25 02:24:59 [15280] [0] DEBUG: AT2[/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)]: Reading modem definitions from </etc/kannel/kannel.conf>
    2013-02-25 02:24:59 [15280] [0] DEBUG: AT2[/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)]: Found <1> modems in config
    2013-02-25 02:24:59 [15280] [0] INFO: AT2[/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)]: read modem definition for <Teltonika E12>
    2013-02-25 02:24:59 [15280] [0] DEBUG: Started thread 6 (gw/smsc/smsc_at.c:at2_device_thread)
    2013-02-25 02:24:59 [15280] [0] DEBUG: Started thread 7 (gw/bb_smscconn.c:sms_router)
    2013-02-25 02:24:59 [15280] [0] INFO: ----------------------------------------
    2013-02-25 02:24:59 [15280] [0] INFO: Kannel bearerbox II version 1.4.3 starting
    2013-02-25 02:24:59 [15280] [0] INFO: MAIN: Start-up done, entering mainloop
    2013-02-25 02:24:59 [15280] [0] DEBUG: AT2[/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)]: start called
    2013-02-25 02:24:59 [15280] [7] DEBUG: Thread 7 (gw/bb_smscconn.c:sms_router) maps to pid 15280.
    2013-02-25 02:24:59 [15280] [6] DEBUG: Thread 6 (gw/smsc/smsc_at.c:at2_device_thread) maps to pid 15280.
    2013-02-25 02:24:59 [15280] [6] INFO: AT2[/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)]: opening device
    2013-02-25 02:24:59 [15280] [6] ERROR: AT2[/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)]: open failed! ERRNO=2
    2013-02-25 02:24:59 [15280] [6] ERROR: System error 2: No such file or directory
    2013-02-25 02:24:59 [15280] [6] ERROR: AT2[/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)]: at2_device_thread: open_at2_device failed.
    2013-02-25 02:24:59 [15280] [6] ERROR: System error 2: No such file or directory
    2013-02-25 02:24:59 [15280] [6] ERROR: AT2[/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)]: Couldn't connect (retrying in 10 seconds).
    2013-02-25 02:24:59 [15280] [6] INFO: AT2[/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)]: opening device
    ................................
    ..................................

  5. #5
    Membre régulier
    Homme Profil pro
    Inscrit en
    Juin 2012
    Messages
    180
    Détails du profil
    Informations personnelles :
    Sexe : Homme

    Informations forums :
    Inscription : Juin 2012
    Messages : 180
    Points : 73
    Points
    73
    Par défaut
    actuellement j'ai envoyé les SMS avec clickatell en utilisant ce code :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    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 nous avons fait une convention avec un opérateur orange

    et nous devons envoyer les sms en passant par cet opérateur

    les sms seront envoyé en utilisant smpp 3.4 et l'API kannel

    j'ai installé kannel avec :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    apt-get install libxml2
     
    apt-get install kannel
    j'ai fait cette configuration pour le fichier kannel.conf

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    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 = smpp
    smsc-id = testsmsc
    host = localhost
    port = 2775
    receive-port = 2775 
    smsc-username = 'smppclient'
    smsc-password = password
    system-type = 'VMA'
    service-type = 'test'
    interface-version = 34
    address-range = ''
    msg-id-type = 0
     
     
     
     
     
        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&amp;text=%b"
        accept-x-kannel-headers = true
        max-messages = 3
        concatenation = true
        catch-all = true
    je pense qu'il y a des paramètres qui seront mis par l’opérateur orange comme :

    smsc-username
    smsc-password
    host
    port


    quand j'ai essayé avec :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    http://10.20.20.26:13000/status?password=zaibstatus

    j'ai ce message :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    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 0m 38s
     
    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
     
    Box connections:
        smsbox:(none), IP 127.0.0.1 (0 queued), (on-line 0d 0h 0m 33s)
     
    SMSC connections:
        testsmsc    SMPP:localhost:2775/2775:'smppclient':'VMA' (re-connecting, rcvd 0, sent 0, failed 0, queued 0 msgs)
    et avec ce test :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    http://10.20.20.26:13013/cgi-bin/sendsms?username=kannel&password=kannel&to=97919860&text=ZAIB+KANNEL+WORk
    j'ai ce message :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    3: Queued for later delivery
    est ce quelqu'un pouvez m'aidez pour corriger la configuration de fichier kannel.conf

    merci d'avance

  6. #6
    Membre à l'essai
    Profil pro
    developpeur
    Inscrit en
    Août 2010
    Messages
    9
    Détails du profil
    Informations personnelles :
    Localisation : Cameroun

    Informations professionnelles :
    Activité : developpeur

    Informations forums :
    Inscription : Août 2010
    Messages : 9
    Points : 10
    Points
    10
    Par défaut
    Bonjour franco09,

    j'espère que ton problème est toujours d’actualité, si c'est le cas voici quelques pistes pour l'installation et la configuration de kannel. Nous allons posséder comme suit.

    - installation des paquets nécessaires
    - installation (configure et Make) de kannel avec mysql comme support de stockage
    - configuration de fichiers kannel.conf et smsbox.conf avec un client SMPP
    - Démarrage et test de kannel

    1 installation de paquets nécessaires à l'installation de kannel
    - sudo apt-get install libxml2-dev libxml2
    - sudo apt-get install libmysqlclient-dev ( pour connecter kannel à mysql)
    - sudo apt-get install automake

    2 installation de kannel

    télécharge la version 1.5 gateway-1.5.0.tar.gz dans le repertoire de votre choix. /home/ton_user par exemple.
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
     
       - faire cd /home/ton_user/
       - sudo tar xzvf gateway-1.5.0.tar.gz
       - cd gateway-1.5.0
       - ./configure -with-mysql -with-mysql-dir
       - make
       - make   bindir=/usr/local/kannel install
    NB: kannel est installé dans le répertoire /usr/local/kannel. vous pouvez créer au préalable.
    un certain nombre de message d'erreur peuvent apparaître pendant l'installation. faites des retours ici pour des analyses.

    Supposons que Kannel est déployé dans /usr/local/kannel. Les composants ont besoin des fichiers de configuration qui contiennent les directives de fonctionnement. Ouvrez un terminal et créer d’abord le répertoire /etc/kannel. Et copier les fichiers de configuration kannelsms.conf et smsbox.conf à l'intérieur de /etc/kannel.

    3 configuration de fichiers kannel.conf avec un client SMPP

    kannel.conf
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
     
    #------------------goupe core d'administraion de kannel-- il est unique-----------
    #debut configuration 
    #CORE 
    group = core 
    admin-port = 13000 
    admin-password = bar 
    #admin-deny-ip = "*.*.*.*" 
    admin-allow-ip = "127.0.0.1" 
    #wapbox-port = 13002 
    smsbox-port = 13001 
    #dlr-storage = internal
    dlr-storage = mysql
    wdp-interface-name = "*" 
    log-file = "/etc/logkannel/bearerbox.log" 
    #log-level=1 
    access-log = "access.log" 
    #box-deny-ip = "*.*.*.*" 
    box-allow-ip = "127.0.0.1" 
    #log-level=1 
    unified-prefix = "00221,+237,00" 
    #group = wapbox 
    #bearerbox-host = localhost 
    #log-file = "/etc/logkannel/wapbox.log"
     
    #--------------------interface d’écoute de clients ----------------------- 
    # SMSBOX SETUP 
     
    group = smsbox 
    bearerbox-host = 127.0.0.1
    sendsms-port = 6013
    global-sender = 6013
    sendsms-url = "/cgi-bin/sendsms" 
    global-sender = 13013 
    sendsms-chars = "0123456789 +-" 
    log-file = "/etc/logkannel/smsbox.log" 
    log-level = 1 
    access-log = "access.log" 
     
    #-------------------------Configure ton smpp ici  --------------------- 
    #Fakesmsc 
     
    group = smsc
    smsc = smpp
    smsc-id = SMPPSim
    host = 127.0.0.1
    port = 2775
    receive-port = 2775 
    smsc-username = smppclient1
    smsc-password = password
    system-type = 'VMA'
    #service-type = 'test'
    interface-version = 34
    address-range = ''
    msg-id-type = 0
    preferred-smsc-id = SMPPSim
    #-----------------User ---------------------------- 
     
    # SEND-SMS USERS 
     
    group = sendsms-user 
    username = tester 
    password = foobar 
    max-messages = 1000 
    concatenation = true 
    #user-deny-ip = "*.*.*.*" 
    #user-allow-ip = "127.0.0.1,192.168.1.13" 
     
    #--------------paramètre de connextion à la BD------------------------------- 
     
    #--- mysql connection
    group = mysql-connection
    id = mydlr
    host = localhost
    username = root
    password = nexxys2011
    database = managesms
    #max-connections = 1
     
    #---- DLR table structure pour le gestion de accusés de recption
    group = dlr-db
    id = mydlr
    table = dlr
    field-smsc = smsc
    field-timestamp = timestamp
    field-destination = destination
    field-source = source
    field-service = service
    field-url = url
    field-mask = mask
    field-status = status
    field-boxc-id = boxc_id
     
     
    # SERVICES pour implémenter des service
     
    group = sms-service
    keyword = test
    text = “test kannel is valide!

    4 Démarrage de kannel
    Ouvez un terminal et tapez
    /usr/local/sbin/bearerbox /etc/kannel/kannel.conf

    Puis dans un autre terminal

    sudo /usr/local/sbin/smsbox /etc/kannel/kannel.conf

    5 Test

    A partir de ce lien
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
    http://localhost:13013/cgi-bin/sendsms?username=tester&password=foobar&to=xxxxxxxxxxx&text=test+kannel+configuration

Discussions similaires

  1. [phpMyAdmin] Installer et configurer phpMyAdmin 2.8.0.2
    Par LadyArwen dans le forum EDI, CMS, Outils, Scripts et API
    Réponses: 1
    Dernier message: 04/04/2006, 18h02
  2. Réponses: 16
    Dernier message: 24/01/2006, 21h31
  3. Installation et configuration de postfix
    Par ggnore dans le forum Réseau
    Réponses: 3
    Dernier message: 05/10/2004, 15h17
  4. [Debutant] Installation et Configuration Interbase
    Par goupil_32x dans le forum InterBase
    Réponses: 11
    Dernier message: 12/11/2003, 23h51
  5. Installation et configuration d'un routeur FlowPoint SSR255
    Par arnaud_verlaine dans le forum Développement
    Réponses: 3
    Dernier message: 11/08/2003, 14h43

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo