+ Responder ao Tópico



  1. #1

    Padrão Asteirsk + a2billing Não faz chamadas

    Boa tarde galera.
    Estou tentando implementar o a2billing como tarifador na minha empresa, principalmente
    para poder utilizar o sistema pré-pago.
    Segui vários tutoriais, o meu Asterisk funciona direitinho, cadastro ramais,
    faço e recebo chamadas, perfeito.
    Porém não consigo fazer o a2billing tarifar.

    Eu configurei os troncos no sip.conf no a2billing, configurei o tronco no gerenciador web também,
    criei o customer, e ele criou tudo certinho no asterisk também.
    Criei o call plan, criei a tarifa... mas a chamada não sai.

    O trunk que tá configurado no A2billing, não tem nenhuma rota no FreePBX que fale a respeito dele.
    se eu crio a seguinte rota de saida no FreePBX:
    Custom Trunk Name - a2billing
    Custom dial string - A2B/1
    e aponto as chamadas pra ela, eu recebo a seguinte mensagem no CLI:



    -- Executing [s@macro-dialout-trunk:3] GotoIf("SIP/4942566411-00000045", "0?disabletrunk,1") in new stack
    -- Executing [s@macro-dialout-trunk:4] Set("SIP/4942566411-00000045", "DIAL_NUMBER=551532481176") in new stack
    -- Executing [s@macro-dialout-trunk:5] Set("SIP/4942566411-00000045", "DIAL_TRUNK_OPTIONS=tr") in new stack
    -- Executing [s@macro-dialout-trunk:6] Set("SIP/4942566411-00000045", "OUTBOUND_GROUP=OUT_5") in new stack
    -- Executing [s@macro-dialout-trunk:7] GotoIf("SIP/4942566411-00000045", "1?nomax") in new stack
    -- Goto (macro-dialout-trunk,s,9)
    -- Executing [s@macro-dialout-trunk:9] GotoIf("SIP/4942566411-00000045", "0?skipoutcid") in new stack
    -- Executing [s@macro-dialout-trunk:10] Set("SIP/4942566411-00000045", "DIAL_TRUNK_OPTIONS=") in new stack
    -- Executing [s@macro-dialout-trunk:11] Macro("SIP/4942566411-00000045", "outbound-callerid,5") in new stack
    -- Executing [s@macro-outbound-callerid:1] ExecIf("SIP/4942566411-00000045", "0?Set(CALLERPRES()=)") in new stack
    -- Executing [s@macro-outbound-callerid:2] ExecIf("SIP/4942566411-00000045", "0?Set(REALCALLERIDNUM=4942566411)") in new stack
    -- Executing [s@macro-outbound-callerid:3] GotoIf("SIP/4942566411-00000045", "1?normcid") in new stack
    -- Goto (macro-outbound-callerid,s,6)
    -- Executing [s@macro-outbound-callerid:6] Set("SIP/4942566411-00000045", "USEROUTCID=") in new stack
    -- Executing [s@macro-outbound-callerid:7] Set("SIP/4942566411-00000045", "EMERGENCYCID=") in new stack
    -- Executing [s@macro-outbound-callerid:8] Set("SIP/4942566411-00000045", "TRUNKOUTCID=") in new stack
    -- Executing [s@macro-outbound-callerid:9] GotoIf("SIP/4942566411-00000045", "1?trunkcid") in new stack
    -- Goto (macro-outbound-callerid,s,12)
    -- Executing [s@macro-outbound-callerid:12] ExecIf("SIP/4942566411-00000045", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [s@macro-outbound-callerid:13] ExecIf("SIP/4942566411-00000045", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [s@macro-outbound-callerid:14] ExecIf("SIP/4942566411-00000045", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [s@macro-outbound-callerid:15] ExecIf("SIP/4942566411-00000045", "0?Set(CALLERPRES()=prohib_passed_screen)") in new stack
    -- Executing [s@macro-dialout-trunk:12] GosubIf("SIP/4942566411-00000045", "0?sub-flp-5,s,1") in new stack
    -- Executing [s@macro-dialout-trunk:13] Set("SIP/4942566411-00000045", "OUTNUM=551532481176") in new stack
    -- Executing [s@macro-dialout-trunk:14] Set("SIP/4942566411-00000045", "custom=AMP") in new stack
    -- Executing [s@macro-dialout-trunk:15] ExecIf("SIP/4942566411-00000045", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default))") in new stack
    -- Executing [s@macro-dialout-trunk:16] Macro("SIP/4942566411-00000045", "dialout-trunk-predial-hook,") in new stack
    -- Executing [s@macro-dialout-trunk-predial-hook:1] GotoIf("SIP/4942566411-00000045", "1?custom-freepbx-a2billing,551532481176,1:2") in new stack
    -- Goto (custom-freepbx-a2billing,551532481176,1)
    == Channel 'SIP/4942566411-00000045' jumping out of macro 'dialout-trunk-predial-hook'
    == Channel 'SIP/4942566411-00000045' jumping out of macro 'dialout-trunk'
    -- Executing [551532481176@custom-freepbx-a2billing:1] DeadAGI("SIP/4942566411-00000045", "a2billing.php|1") in new stack
    [Jan 13 16:01:19] WARNING[8332]: pbx.c:1417 pbx_exec: The application delimiter is now the comma, not the pipe. Did you forget to convert your dialplan? (DeadAGI(a2billing.php|1))
    [Jan 13 16:01:19] WARNING[8332]: res_agi.c:3928 deadagi_exec: DeadAGI has been deprecated, please use AGI in all cases!
    [Jan 13 16:01:19] WARNING[8332]: res_agi.c:1622 launch_script: Failed to execute '/var/lib/asterisk/agi-bin/a2billing.php|1': File does not exist.
    -- Executing [551532481176@custom-freepbx-a2billing:2] Hangup("SIP/4942566411-00000045", "") in new stack
    == Spawn extension (custom-freepbx-a2billing, 551532481176, 2) exited non-zero on 'SIP/4942566411-00000045'
    == Manager 'admin' logged on from 127.0.0.1
    == Manager 'admin' logged off from 127.0.0.1
    == Manager 'admin' logged on from 127.0.0.1
    == Manager 'admin' logged off from 127.0.0.1
    [Jan 13 16:02:58] NOTICE[3365]: chan_sip.c:25529 sip_poke_noanswer: Peer '1135004927' is now UNREACHABLE! Last qualify: 46
    == Manager 'admin' logged on from 127.0.0.1
    == Manager 'admin' logged off from 127.0.0.1
    == Manager 'admin' logged on from 127.0.0.1
    == Manager 'admin' logged off from 127.0.0.1
    == Manager 'admin' logged on from 127.0.0.1
    == Manager 'admin' logged off from 127.0.0.1
    == Manager 'admin' logged on from 127.0.0.1
    == Manager 'admin' logged off from 127.0.0.1

    Não entendi direito como funciona essa parte de rotas.. ao que me parece eu não preciso configurar nada no FreePBX, só no a2billing certo?
    Me ajuda ai galera, to batendo cabeça faz 1 semana com isso.
    Agradeço a todos... Abraços!

  2. #2

    Padrão Re: Asteirsk + a2billing Não faz chamadas

    Se você olhar bem a tela acima, vai encontrar o erro.


    [Jan 13 16:01:19] WARNING[8332]: res_agi.c:1622 launch_script: Failed to execute '/var/lib/asterisk/agi-bin/a2billing.php|1': File does not exist.


    Saudações,

  3. #3
    Moderador Avatar de minelli
    Ingresso
    Aug 2006
    Localização
    Pres. Venceslau - SP | Pres. Prudente - SP
    Posts
    1.412
    Posts de Blog
    10

    Padrão Re: Asteirsk + a2billing Não faz chamadas

    Veja que a msg informa que o arquivo não existe.

  4. #4

    Padrão Re: Asteirsk + a2billing Não faz chamadas

    Então pessoal, eu imaginei que por ter tentando VARIAS configurações devia ter feito alguma merda. Resolvi começar denovo.
    Criei um VM no meu pc, instalei o Elastix, configurei o a2billing direitinho... e tudo blz.
    Está criando os ramais direitinho, o tronco logou, porém olha o que eu recebo quando tento efetuar uma chamada.


    -- Remote UNIX connection
    -- Remote UNIX connection disconnected
    == Using SIP RTP TOS bits 184
    == Using SIP RTP CoS mark 5
    -- Executing [1578116320@a2billing:1] Answer("SIP/4009498959-0000000e", "") in new stack
    -- Executing [1578116320@a2billing:2] Wait("SIP/4009498959-0000000e", "1") in new stack
    -- Executing [1578116320@a2billing:3] DeadAGI("SIP/4009498959-0000000e", "a2billing.php,1") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/a2billing.php
    -- Playing 'prepaid-you-have' (escape_digits=#) (sample_offset 0)
    -- <SIP/4009498959-0000000e> Playing 'digits/10.gsm' (language 'en')
    -- Playing 'dollars' (escape_digits=#) (sample_offset 0)
    -- <SIP/4009498959-0000000e> Playing 'prepaid-enter-dest.gsm' (language 'en')
    -- <SIP/4009498959-0000000e>AGI Script a2billing.php completed, returning 4
    == Spawn extension (a2billing, 1578116320, 3) exited non-zero on 'SIP/4009498959-0000000e'
    == Using SIP RTP TOS bits 184
    == Using SIP RTP CoS mark 5
    -- Executing [551578116320@a2billing:1] Answer("SIP/4009498959-0000000f", "") in new stack
    -- Executing [551578116320@a2billing:2] Wait("SIP/4009498959-0000000f", "1") in new stack
    -- Executing [551578116320@a2billing:3] DeadAGI("SIP/4009498959-0000000f", "a2billing.php,1") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/a2billing.php
    -- Playing 'prepaid-you-have' (escape_digits=#) (sample_offset 0)
    -- <SIP/4009498959-0000000f> Playing 'digits/10.gsm' (language 'en')
    -- Playing 'dollars' (escape_digits=#) (sample_offset 0)
    -- <SIP/4009498959-0000000f> Playing 'prepaid-enter-dest.gsm' (language 'en')
    -- <SIP/4009498959-0000000f> Playing 'prepaid-enter-dest.gsm' (language 'en')
    -- <SIP/4009498959-0000000f> Playing 'prepaid-enter-dest.gsm' (language 'en')
    -- <SIP/4009498959-0000000f>AGI Script a2billing.php completed, returning 4
    == Spawn extension (a2billing, 551578116320, 3) exited non-zero on 'SIP/4009498959-0000000f'
    localhost*CLI>

    Criei todo o procedimento, rate card, rates e etc etc...
    to ficando louco com isso já.. hahaha
    por favor, alguem me dá uma luz.
    Obrigado, abraços a todos!

  5. #5

    Padrão Re: Asteirsk + a2billing Não faz chamadas

    nao sei se ainda esta tentando.. mas erro de conf no agi-conf la..

  6. #6

    Padrão

    Boa noite amigo,

    Você por ventura tem um tutorial dos passos que seguiu, estou tentando tbm mas nada de sair do outro lado.

    Abraço