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!