Page 1 sur 2 12 DernièreDernière
Affichage des résultats 1 à 10 sur 15

Discussion: Limité le nombre d'appel different

  1. #1
    Membre
    Date d'inscription
    février 2011
    Messages
    34
    Downloads
    0
    Uploads
    0

    Limité le nombre d'appel different

    Bonjour, Je cherche une solution pour limité le nombre d'appel different par trunks , je m'explique

    J'ai 3 ligne OVh , qui on chaqu'une 99 Numéro Different /appel , se qui fais 297 numéro différent par appel

    Je cherche un moyen de mettre en place cette restriction si le trunk 1 a 99 num Différent on passe au trunks 2 , ainsi de suite , avec une réinitialisation tout les mois .

    J'ai essayé avec A2Billing mais il me marque une erreur ...
    The requested URL /A2Billing_UI was not found on this server.


    Merci
    Dernière modification par xana01 ; 19/03/2012 à 21h35.

  2. #2
    Membre Association Avatar de cedricscha
    Date d'inscription
    août 2010
    Localisation
    Geneve/Suisse
    Messages
    578
    Downloads
    1
    Uploads
    0
    Tu peux faire quelques ligne de dialplan avec la database asterisk.

    Cela conviendra a ton utilisation et tu n'auras pas besoin de monter une usine a gaz pour cela.
    Cédric
    ---------------------------------------------------------------
    Rejoignez l'Association Asterisk France : http://www.asterisk-france.org

    Envie de mettre des étoiles dans les yeux de vos clients : EasyPyro.ch

    On a pas inventé l'électricité en cherchant à améliorer la bougie...
    ---------------------------------------------------------------

  3. #3
    Membre Association
    Date d'inscription
    septembre 2010
    Localisation
    Isle sur la Sorgue 84800
    Messages
    369
    Downloads
    0
    Uploads
    0
    Un petit job pour une agi + une dB et un cron mensuel pas trop compliqué à faire
    en tout cas il n'y a rien de tout fait pour ce job

  4. #4
    Membre
    Date d'inscription
    février 2011
    Messages
    34
    Downloads
    0
    Uploads
    0
    J'utilise PBX in flash Avec proxmox , + l'inteface Freepbx

    Es-que avec Freepbx il y a un moyen simple de mettre sa en place .

    Sinon avez vous des exemples a me montré

    Merci

  5. #5
    Asterisk Fan Avatar de fastm3
    Date d'inscription
    août 2010
    Localisation
    Corbeil Essonnes (91)
    Messages
    1 302
    Downloads
    1
    Uploads
    1
    J'avais fait un tuto simple de rotation de trunk
    http://www.asterisk-france.org/conte...s-avec-freepbx

    Pour l'instant, je desire pas publier le script tout fait pour ovh qui lui reutiliserait le meme trunk pour le meme numero. Mais le principe d'integration avec freepbx est expliqué dans le tuto et l'exemple fourni peut suffire deja.
    Fastm3.

  6. #6
    Membre
    Date d'inscription
    février 2011
    Messages
    34
    Downloads
    0
    Uploads
    0
    Merci , c'est vraiment pas mal

    par contre je ne comprend pas un truc dans le code

    Code:
    [distribution-trunks]
    ;trunks are number 1 and 2
    exten => _0X..,1,Set(COUNT=${DB(test/count)})
    ;increment
    exten => _0X.,n,SetVar(COUNT=$[${COUNT} + 1])
    exten => _0X.,n,SetVar(COUNT=${IF($[ ${COUNT} = 3]?1:${COUNT})})
    exten => _0X.,n,Set(DB(test/count)=${COUNT})
    exten => _0X.,n,NoOp(Number dialed is ${EXTEN} by trunk pstn ${COUNT})
    exten => _0X.,n,Macro(dialout-trunk,${COUNT},${EXTEN},,)
    exten => _0X.,n,Macro(outisbusy,)
    Peut tu détaillé chaque ligne, je ne comprend pas certaine fonction du code
    J'ai fais une outbound qui sort sur se le trunk custom qui s'appel test qui lui a le paramètre

    Code:
    local/$OUTNUM$@distribution-trunks
    Par contre cela ne fonctionne pas ,


    Code:
     -- Executing [0633000001@from-internal:1] Set("SIP/222-0000000d", "TIMEOUT(absolute)=3300") in new stack
    Channel will hangup at 2012-03-20 18:32:43.273 GMT.
        -- Executing [0633000001@from-internal:2] NoOp("SIP/222-0000000d", "Calling Out Route: tt") in new stack
        -- Executing [0633000001@from-internal:3] Set("SIP/222-0000000d", "MOHCLASS=default") in new stack
        -- Executing [0633000001@from-internal:4] Set("SIP/222-0000000d", "_NODEST=") in new stack
        -- Executing [0633000001@from-internal:5] Macro("SIP/222-0000000d", "record-enable,,OUT,") in new stack
        -- Executing [s@macro-record-enable:1] GotoIf("SIP/222-0000000d", "1?check") in new stack
        -- Goto (macro-record-enable,s,4)
        -- Executing [s@macro-record-enable:4] ExecIf("SIP/222-0000000d", "1?MacroExit()") in new stack
        -- Executing [0633000001@from-internal:6] Macro("SIP/222-0000000d", "dialout-trunk,4,0633000001,") in new stack
        -- Executing [s@macro-dialout-trunk:1] Set("SIP/222-0000000d", "DIAL_TRUNK=4") in new stack
        -- Executing [s@macro-dialout-trunk:2] GosubIf("SIP/222-0000000d", "0?sub-pincheck,s,1") in new stack
        -- Executing [s@macro-dialout-trunk:3] GotoIf("SIP/222-0000000d", "0?disabletrunk,1") in new stack
        -- Executing [s@macro-dialout-trunk:4] Set("SIP/222-0000000d", "DIAL_NUMBER=0633000001") in new stack
        -- Executing [s@macro-dialout-trunk:5] Set("SIP/222-0000000d", "DIAL_TRUNK_OPTIONS=tr") in new stack
        -- Executing [s@macro-dialout-trunk:6] Set("SIP/222-0000000d", "OUTBOUND_GROUP=OUT_4") in new stack
        -- Executing [s@macro-dialout-trunk:7] GotoIf("SIP/222-0000000d", "1?nomax") in new stack
        -- Goto (macro-dialout-trunk,s,9)
        -- Executing [s@macro-dialout-trunk:9] GotoIf("SIP/222-0000000d", "0?skipoutcid") in new stack
        -- Executing [s@macro-dialout-trunk:10] Set("SIP/222-0000000d", "DIAL_TRUNK_OPTIONS=T") in new stack
        -- Executing [s@macro-dialout-trunk:11] Macro("SIP/222-0000000d", "outbound-callerid,4") in new stack
        -- Executing [s@macro-outbound-callerid:1] ExecIf("SIP/222-0000000d", "0?Set(CALLERPRES()=)") in new stack
        -- Executing [s@macro-outbound-callerid:2] ExecIf("SIP/222-0000000d", "1?Set(REALCALLERIDNUM=222)") in new stack
        -- Executing [s@macro-outbound-callerid:3] GotoIf("SIP/222-0000000d", "1?normcid") in new stack
        -- Goto (macro-outbound-callerid,s,6)
        -- Executing [s@macro-outbound-callerid:6] Set("SIP/222-0000000d", "USEROUTCID=") in new stack
        -- Executing [s@macro-outbound-callerid:7] Set("SIP/222-0000000d", "EMERGENCYCID=") in new stack
        -- Executing [s@macro-outbound-callerid:8] Set("SIP/222-0000000d", "TRUNKOUTCID=hidden") in new stack
        -- Executing [s@macro-outbound-callerid:9] GotoIf("SIP/222-0000000d", "1?trunkcid") in new stack
        -- Goto (macro-outbound-callerid,s,12)
        -- Executing [s@macro-outbound-callerid:12] ExecIf("SIP/222-0000000d", "1?Set(CALLERID(all)=hidden)") in new stack
        -- Executing [s@macro-outbound-callerid:13] ExecIf("SIP/222-0000000d", "0?Set(CALLERID(all)=)") in new stack
        -- Executing [s@macro-outbound-callerid:14] ExecIf("SIP/222-0000000d", "1?Set(CALLERID(all)=hidden)") in new stack
        -- Executing [s@macro-outbound-callerid:15] ExecIf("SIP/222-0000000d", "1?Set(CALLERPRES()=prohib_passed_screen)") in new stack
        -- Executing [s@macro-dialout-trunk:12] GosubIf("SIP/222-0000000d", "1?sub-flp-4,s,1") in new stack
        -- Executing [s@sub-flp-4:1] ExecIf("SIP/222-0000000d", "1?Return()") in new stack
        -- Executing [s@macro-dialout-trunk:13] Set("SIP/222-0000000d", "OUTNUM=0633000001") in new stack
        -- Executing [s@macro-dialout-trunk:14] Set("SIP/222-0000000d", "custom=AMP") in new stack
        -- Executing [s@macro-dialout-trunk:15] ExecIf("SIP/222-0000000d", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)T)") in new stack
        -- Executing [s@macro-dialout-trunk:16] Macro("SIP/222-0000000d", "dialout-trunk-predial-hook,") in new stack
        -- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("SIP/222-0000000d", "") in new stack
        -- Executing [s@macro-dialout-trunk:17] GotoIf("SIP/222-0000000d", "0?bypass,1") in new stack
        -- Executing [s@macro-dialout-trunk:18] GotoIf("SIP/222-0000000d", "1?customtrunk") in new stack
        -- Goto (macro-dialout-trunk,s,22)
        -- Executing [s@macro-dialout-trunk:22] Set("SIP/222-0000000d", "pre_num=AMP:local/") in new stack
        -- Executing [s@macro-dialout-trunk:23] Set("SIP/222-0000000d", "the_num=OUTNUM") in new stack
        -- Executing [s@macro-dialout-trunk:24] Set("SIP/222-0000000d", "post_num=@distribution-trunks") in new stack
        -- Executing [s@macro-dialout-trunk:25] GotoIf("SIP/222-0000000d", "1?outnum:skipoutnum") in new stack
        -- Goto (macro-dialout-trunk,s,26)
        -- Executing [s@macro-dialout-trunk:26] Set("SIP/222-0000000d", "the_num=0633000001") in new stack
        -- Executing [s@macro-dialout-trunk:27] Dial("SIP/222-0000000d", "local/0633000001@distribution-trunks,300,T") in new stack
        -- Called local/0633000001@distribution-trunks
        -- Executing [0633000001@distribution-trunks:1] Set("Local/0633000001@distribution-trunks-07b6;2", "COUNT=") in new stack
      == Spawn extension (distribution-trunks, 0633000001, 2) exited non-zero on 'Local/0633000001@distribution-trunks-07b6;2'
      == Everyone is busy/congested at this time (1:0/0/1)
        -- Executing [s@macro-dialout-trunk:28] NoOp("SIP/222-0000000d", "Dial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 0") in new stack
        -- Executing [s@macro-dialout-trunk:29] Goto("SIP/222-0000000d", "s-CHANUNAVAIL,1") in new stack
        -- Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)
        -- Executing [s-CHANUNAVAIL@macro-dialout-trunk:1] Set("SIP/222-0000000d", "RC=0") in new stack
        -- Executing [s-CHANUNAVAIL@macro-dialout-trunk:2] Goto("SIP/222-0000000d", "0,1") in new stack
        -- Goto (macro-dialout-trunk,0,1)
        -- Executing [0@macro-dialout-trunk:1] Goto("SIP/222-0000000d", "continue,1") in new stack
        -- Goto (macro-dialout-trunk,continue,1)
        -- Executing [continue@macro-dialout-trunk:1] GotoIf("SIP/222-0000000d", "1?noreport") in new stack
        -- Goto (macro-dialout-trunk,continue,3)
        -- Executing [continue@macro-dialout-trunk:3] NoOp("SIP/222-0000000d", "TRUNK Dial failed due to CHANUNAVAIL HANGUPCAUSE: 0 - failing through to other trunks") in new stack
        -- Executing [continue@macro-dialout-trunk:4] Set("SIP/222-0000000d", "CALLERID(number)=") in new stack
        -- Executing [0633000001@from-internal:7] Wait("SIP/222-0000000d", "1") in new stack
        -- Executing [0633000001@from-internal:8] Congestion("SIP/222-0000000d", "20") in new stack
      == Spawn extension (from-internal, 0633000001, 8) exited non-zero on 'SIP/222-0000000d'
        -- Executing [h@from-internal:1] Macro("SIP/222-0000000d", "hangupcall") in new stack
        -- Executing [s@macro-hangupcall:1] GotoIf("SIP/222-0000000d", "1?skiprg") in new stack
        -- Goto (macro-hangupcall,s,4)
        -- Executing [s@macro-hangupcall:4] GotoIf("SIP/222-0000000d", "1?skipblkvm") in new stack
        -- Goto (macro-hangupcall,s,7)
        -- Executing [s@macro-hangupcall:7] GotoIf("SIP/222-0000000d", "1?theend") in new stack
        -- Goto (macro-hangupcall,s,9)
        -- Executing [s@macro-hangupcall:9] Hangup("SIP/222-0000000d", "") in new stack
      == Spawn extension (macro-hangupcall, s, 9) exited non-zero on 'SIP/222-0000000d' in macro 'hangupcall'
      == Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/222-0000000d'


    Merci

  7. #7
    Asterisk Fan Avatar de fastm3
    Date d'inscription
    août 2010
    Localisation
    Corbeil Essonnes (91)
    Messages
    1 302
    Downloads
    1
    Uploads
    1
    fait un "database put test count 1" sous cli pour "amorcer"

    Code:
    [distribution-trunks] 
    ;trunks are number 1 and 2
    ; on recupere le dernier trunk qui a été utilisé ( on suppose le trunk numero 1 mais ca pourrait etre 5)
    ; C'est pour cela qu'il faut faire le database set 1 fois en init.
    exten => _0X..,1,Set(COUNT=${DB(test/count)}) 
    ;increment, donc si c'etait le trunk 1, COUNT contient maintenant 2 
    exten => _0X.,n,SetVar(COUNT=$[${COUNT} + 1])
    ; si le trunk est egal à 3 , on repart à 1 sinon on ne fait rien. ( cela est en fait une boucle entre une valeur min et max)
    exten => _0X.,n,SetVar(COUNT=${IF($[ ${COUNT} = 3]?1:${COUNT})}) 
    ;on sauve le dernier trunk qu'on va utiliser pour qu'il soit persistent.
    exten => _0X.,n,Set(DB(test/count)=${COUNT})
    ; on ajoute une trace 
    exten => _0X.,n,NoOp(Number dialed is ${EXTEN} by trunk pstn ${COUNT}) 
    ; on dial le numero avec le trunk qu'on a selectionné.
    exten => _0X.,n,Macro(dialout-trunk,${COUNT},${EXTEN},,) 
    exten => _0X.,n,Macro(outisbusy,)
    C'est un exemple. Il faut adapter avec le numero des trunks dans freepbx que tu veux alterner. Ca ne marchera pas sans cela.

    Fastm3

  8. #8
    Membre
    Date d'inscription
    février 2011
    Messages
    34
    Downloads
    0
    Uploads
    0
    Citation Envoyé par fastm3 Voir le message
    C'est un exemple. Il faut adapter avec le numero des trunks dans freepbx que tu veux alterner. Ca ne marchera pas sans cela.

    Fastm3
    Excusez moi, j'essaye vraiment de comprendre se code , mais je vois pas ou je dois définir la COUNT , car mes trunk commence a partir de 2

    Merci

  9. #9
    Membre
    Date d'inscription
    février 2011
    Messages
    34
    Downloads
    0
    Uploads
    0
    Âpres avoir essayé a plusieurs reprise je vois vraiment pas se qui cloche .

    Je voudrais savoir fastm3 dans ton tuto tu serais pas trompé dans la ligne

    "Ici le numero de trunk est le numero 2. On pourrais vérifier cela dans /etc/asterisk/sip_additionnal.conf"

    Car pour vérifier chez moi c'est le fichier extensions_additional.conf
    Avec les lignes
    OUT_1 = SIP/MAISONSIP
    OUTCID_1 = 0900000059

    Ah moins que sa soit moi qui comprend vraiment rien de rien

    Sinon je tiens vraiment à UP se poste car la après avoir lu plusieurs livre j'ai toujours rien qui se passe, J'ai bien mon COUNT=1 , mais rien numérote c'est sa que je comprend pas , J'ai une erreur
    Code:
    NoOp("SIP/222-00000040", "Dial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 0")
    Je la comprend pas cette erreur

  10. #10
    Asterisk Fan Avatar de fastm3
    Date d'inscription
    août 2010
    Localisation
    Corbeil Essonnes (91)
    Messages
    1 302
    Downloads
    1
    Uploads
    1
    oui , c'est extensions_additionnal.conf ( il y en a un qui suit au moins. ) ou tout simplement dans l'url affichée dans ton navigateur quand tu édites le trunk avec freepbx.
    Affiche les traces complètes avant avec le dial et au debut de l'entree dans le contexte,
    mais ton trunk sip marche t'il deja tout seul ?

    Cree une outbound route avec juste ce trunk 1 et mets la au debut pour tester, et il faut que ca marche deja comme cela juste pour verifier que ton trunk est ok.

    Aussi, pour alterner , il faut au moins 2 trunks. Donc donne les numeros de trunks et montre ton contexte adapté aussi.

    Il faut les logs et le dialplan pour esperer voir ce qui ne va pas.
    Fastm3.

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
  •