Affichage des résultats 1 à 10 sur 45

Discussion: fichier call ne fonctionne pas

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre
    Date d'inscription
    mai 2014
    Messages
    35
    Downloads
    0
    Uploads
    0

    fichier call ne fonctionne pas

    Bonjour,

    Je suis en stage dans une petite entreprise et je dois développer un programme devant faire des appels automatique vers différents destinataire (numéro dans une base de donnée). Après pas mal de recherche je me suis tourner vers Asterisk. Étant nouveau dans le monde Asterisk j'ai beaucoup de mal à développer avec ^^' .

    Alors voila l'idée est de générer un fichier call qui va être ensuite envoyer dans le dossier outgoing.

    Avant de faire un petit programme pour générer se fichier, je voulais d'abord en tester un que voici :

    Channel: SIP/00240XXXXXX@192.168.1.XX
    MaxRetries: 2
    RetryTime: 60
    WaitTime: 30
    Context : test
    Extension : s
    Priority: 1

    J'ai configurer un trunk pour faire mes appels avec un compte sip, j'ai ensuite créé un fichier extension que j'ai appelé extension_appel_custum et j'y ai mis ce contenu :

    [global]

    TRUNK=freephonie

    [default]
    exten => _0.,1,Dial(SIP/${TRUNK}/${EXTEN:1})

    [test]

    exten => s,1,Playback(welcome)
    exten => s,n,Waitexten()

    exten => 1,1,Goto(s,1)

    exten => 2,1,Hangup()

    Je transfert mon fichier call dans /tmp et mon fichier extension dans /etc/asterisk

    Au moment de faire la commande mv /tmp/test.call /var/spool/asterisk/outgoing je m'attends à recevoir un appel sur mon fixe , mais apparemment ca n'appel pas. Le fichier est bien envoyé dans le dossier outgoing et le fichier dans outgoing est bien supprimé.

    Quelqu'un peut m'aider ?!!!

  2. #2
    Membre Senior
    Date d'inscription
    septembre 2010
    Localisation
    Where the sun shines
    Messages
    1 418
    Downloads
    0
    Uploads
    0
    pour débuger, il faut être sur la console asteirsk (asterisk -rvvvv), et voir ce qui se passe lors du move du fichier. il faut aussi vérifier que le fichier disparaiit de /var/spool/asterisk/outgoing - de mémoire.

    dans ton cas, le channel n'est pas bon je pense. essaie sans le @192.... - mais sans les erreurs de la console, c'est dur à dire

  3. #3
    Membre
    Date d'inscription
    mai 2014
    Messages
    35
    Downloads
    0
    Uploads
    0
    merci enfin une réponse

    Alors effectivement au début le fichier ne disparaissait pas, mais après changement (je ne me souvient plus du quel j'ai essayé plein de truc) il disparaissait enfin. Pour le débuggage je ne pourrais rien faire ce soir, mais demain à la première heure je jetterais un coup d’œil.

  4. #4
    Membre
    Date d'inscription
    mai 2014
    Messages
    35
    Downloads
    0
    Uploads
    0
    Encore merci jean pour m'avoir répondu hier , alors après avoir lancer le debug d'asterisk, j'ai fait un mv vers outgoing et voila les messages d'erreurs :

    localhost*CLI> pri set debug file [test.call]
    PRI debug output will be sent to '[test.call]'
    [2014-07-03 09:06:52] WARNING[20486]: pbx_spool.c:285 apply_outgoing: Unknown keyword 'Context ' at line 5 of /var/spool/asterisk/outgoing/test.call
    [2014-07-03 09:06:52] WARNING[20486]: pbx_spool.c:285 apply_outgoing: Unknown keyword 'Extension ' at line 6 of /var/spool/asterisk/outgoing/test.call
    [2014-07-03 09:06:52] WARNING[20486]: pbx_spool.c:289 apply_outgoing: At least one of app or extension must be specified, along with tech and dest in file /var/spool/asterisk/outgoing/test.call
    [2014-07-03 09:06:52] WARNING[20486]: pbx_spool.c:456 scan_service: Invalid file contents in /var/spool/asterisk/outgoing/test.call, deleting
    [2014-07-03 09:07:40] WARNING[20467]: chan_sip.c:23507 handle_response_register: Got 423 Interval too brief for service 0980487667@freephonie.net, minimum is 1800 seconds
    -- Registered SIP '1002' at 192.168.1.54:34566
    [2014-07-03 09:07:57] NOTICE[20467]: chan_sip.c:23645 handle_response_peerpoke: Peer '1002' is now Reachable. (9ms / 2000ms)

    quand je change @192.168.1.80 par @freephonie.net voila ce qu'il se passe :

    PRI debug output will be sent to '[test.call]'
    [2014-07-03 09:23:55] WARNING[20486]: pbx_spool.c:285 apply_outgoing: Unknown keyword 'Context ' at line 5 of /var/spool/asterisk/outgoing/test.call
    [2014-07-03 09:23:55] WARNING[20486]: pbx_spool.c:285 apply_outgoing: Unknown keyword 'Extension ' at line 6 of /var/spool/asterisk/outgoing/test.call
    [2014-07-03 09:23:55] WARNING[20486]: pbx_spool.c:289 apply_outgoing: At least one of app or extension must be specified, along with tech and dest in file /var/spool/asterisk/outgoing/test.call
    [2014-07-03 09:23:55] WARNING[20486]: pbx_spool.c:456 scan_service: Invalid file contents in /var/spool/asterisk/outgoing/test.call, deleting

    les messages d'erreurs sont les mêmes lorsque je mets seulement "SIP/00240XXXXXX"

    Je ne vois pas trop à quoi ca correspond mais j'espère que ca t'aidera
    Dernière modification par jeremyb ; 03/06/2014 à 09h28.

  5. #5
    Membre Senior
    Date d'inscription
    septembre 2010
    Localisation
    Where the sun shines
    Messages
    1 418
    Downloads
    0
    Uploads
    0
    Citation Envoyé par jeremyb Voir le message
    [2014-07-03 09:06:52] WARNING[20486]: pbx_spool.c:285 apply_outgoing: Unknown keyword 'Context ' at line 5 of /var/spool/asterisk/outgoing/test.call
    [2014-07-03 09:06:52] WARNING[20486]: pbx_spool.c:285 apply_outgoing: Unknown keyword 'Extension ' at line 6 of /var/spool/asterisk/outgoing/test.call
    [2014-07-03 09:06:52] WARNING[20486]: pbx_spool.c:289 apply_outgoing: At least one of app or extension must be specified, along with tech and dest in file /var/spool/asterisk/outgoing/test.call
    [2014-07-03 09:06:52] WARNING[20486]: pbx_spool.c:456 scan_service: Invalid file contents in /var/spool/asterisk/outgoing/test.call, deleting
    ben j'crois qu'c'est claire, serge.... https://www.youtube.com/watch?v=u99WjU47-Sc

    Il ne reconnait pas tes mots clés... Context, Extension => je pense que l'espace entre le mot clé et le : est à supprimer
    channel: essaie Channel: SIP/freephonie/00240xxx

  6. #6
    Membre
    Date d'inscription
    mai 2014
    Messages
    35
    Downloads
    0
    Uploads
    0
    merci, alors j'ai essayé comme tu m'as dis et voila le résultat :

    localhost*CLI> pri set debug file [test_v3.call]
    PRI debug output will be sent to '[test_v3.call]'
    [2014-07-03 15:40:44] WARNING[20486]: pbx_spool.c:309 safe_append: Unable to setutime on /var/spool/asterisk/outgoing/test_v3.call: Operation not permitted
    -- Attempting call on SIP/freephonie/00240160144 for s@test:1 (Retry 1)
    == Using SIP RTP TOS bits 184
    == Using SIP RTP CoS mark 5
    [2014-07-03 15:40:44] WARNING[20451]: res_odbc.c:1412 _ast_odbc_request_obj2: SetConnectAttr (Txn isolation) returned an error: HY000: [MySQL][ODBC 5.1 Driver]MySQL server has gone away
    [2014-07-03 15:40:44] WARNING[20451]: res_odbc.c:646 ast_odbc_prepare_and_execute: SQL Execute returned an error -1: 08S01: [MySQL][ODBC 5.1 Driver][mysqld-5.1.73]MySQL server has gone away (65)
    [2014-07-03 15:40:44] WARNING[20451]: res_odbc.c:658 ast_odbc_prepare_and_execute: SQL Execute error -1! Verifying connection to asteriskcdrdb [MySQL-asteriskcdrdb]...
    [2014-07-03 15:40:44] WARNING[20451]: res_odbc.c:762 ast_odbc_sanity_check: Conn ection is down attempting to reconnect...
    [2014-07-03 15:40:44] NOTICE[20451]: res_odbc.c:1537 odbc_obj_connect: Connecting asteriskcdrdb
    [2014-07-03 15:40:44] NOTICE[20451]: res_odbc.c:1569 odbc_obj_connect: res_odbc:Connected to asteriskcdrdb [MySQL-asteriskcdrdb]
    -- Got SIP response 500 "Internal Server Error" back from 212.27.52.5:5060
    > Channel SIP/freephonie-00000010 was never answered.
    [2014-07-03 15:40:54] NOTICE[966]: pbx_spool.c:389 attempt_thread: Call failed to go through, reason (8) Congestion (circuits busy)
    [2014-07-03 15:40:54] WARNING[966]: pbx_spool.c:309 safe_append: Unable to setutime on /var/spool/asterisk/outgoing/test_v3.call: Operation not permitted

    En enlevant freephonie on a :

    PRI debug output will be sent to '[test_v4.call]'
    [2014-07-03 15:45:35] WARNING[20486]: pbx_spool.c:309 safe_append: Unable to set utime on /var/spool/asterisk/outgoing/test_v4.call: Operation not permitted
    -- Attempting call on SIP/00240160144 for s@test:1 (Retry 1)
    [2014-07-03 15:45:35] WARNING[974][C-0000000f]: chan_sip.c:6163 create_addr: Purely numeric hostname (00240160144), and not a peer--rejecting!
    [2014-07-03 15:45:35] NOTICE[974][C-0000000f]: channel.c:5661 __ast_request_and_dial: Unable to request channel SIP/00240160144
    [2014-07-03 15:45:35] NOTICE[974]: pbx_spool.c:389 attempt_thread: Call failed to go through, reason (0) Call Failure (not BUSY, and not NO_ANSWER, maybe Circuit busy or down?)
    [2014-07-03 15:45:35] WARNING[974]: pbx_spool.c:309 safe_append: Unable to set utime on /var/spool/asterisk/outgoing/test_v4.call: Operation not permitted

    et mon test_v4.call ne se supprime pas

    en mettant @192... on a :

    PRI debug output will be sent to '[test_v5.call]'
    [2014-07-03 15:51:47] WARNING[20486]: pbx_spool.c:309 safe_append: Unable to set utime on /var/spool/asterisk/outgoing/test_v5.call: Operation not permitted
    -- Attempting call on SIP/00240160144@192.168.1.80 for s@test:1 (Retry 1)
    == Using SIP RTP TOS bits 184
    == Using SIP RTP CoS mark 5
    == Using SIP RTP TOS bits 184
    == Using SIP RTP CoS mark 5
    -- Executing [00240160144@from-sip-external:1] NoOp("SIP/192.168.1.80-00000014", "Received incoming SIP connection from unknown peer to 00240160144") in new stack
    -- Executing [00240160144@from-sip-external:2] Set("SIP/192.168.1.80-00000014", "DID=00240160144") in new stack
    -- Executing [00240160144@from-sip-external:3] Goto("SIP/192.168.1.80-00000014", "s,1") in new stack
    -- Goto (from-sip-external,s,1)
    -- Executing [s@from-sip-external:1] GotoIf("SIP/192.168.1.80-00000014", "0?checklang:noanonymous") in new stack
    -- Goto (from-sip-external,s,5)
    -- Executing [s@from-sip-external:5] Set("SIP/192.168.1.80-00000014", "TIMEOUT(absolute)=15") in new stack
    -- Channel will hangup at 2014-07-03 15:52:02.941 CEST.
    -- Executing [s@from-sip-external:6] Answer("SIP/192.168.1.80-00000014", "") in new stack
    > Channel SIP/192.168.1.80-00000013 was answered
    [2014-07-03 15:51:47] WARNING[989][C-00000012]: pbx.c:6640 __ast_pbx_run: Channel 'SIP/192.168.1.80-00000013' sent to invalid extension but no invalid handler: context,exten,priority=test,s,1
    == Spawn extension (from-sip-external, s, 6) exited non-zero on 'SIP/192.168.1.80-00000014'
    -- Executing [h@from-sip-external:1] Hangup("SIP/192.168.1.80-00000014", "") in new stack
    == Spawn extension (from-sip-external, h, 1) exited non-zero on 'SIP/192.168.1.80-00000014'
    [2014-07-03 15:51:47] NOTICE[989]: pbx_spool.c:402 attempt_thread: Call completed to SIP/00240160144@192.168.1.80

    je suis largué ^^'

Les tags pour cette discussion

Règles de messages

  • Vous ne pouvez pas créer de nouvelles discussions
  • Vous ne pouvez pas envoyer des réponses
  • Vous ne pouvez pas envoyer des pièces jointes
  • Vous ne pouvez pas modifier vos messages
  •