[AsteriskBrasil] Elastix + A2Billing

Andrey Smith andreysmith em gmail.com
Terça Janeiro 11 10:36:50 BRST 2011


Desculpem pelo bom dia direcionado a apenas uma pessoa (Mike).
Ia enviar o e-mail apenas para uma pessoa, e quando terminei de escrever o
e-mail, resolvi enviar para a lista, e esqueci de fazer esta alteração.

2011/1/11 Andrey Smith <andreysmith em gmail.com>

> Bom dia Mike,
>
> Estou com dificuldade para fazer a bilhetagem dos ramais do Elastix.
>
> Fiz as seguintes configurações no Elastix/Asterisk:
>
> *1. Incluí os contextos abaixo no arquivo extensions_custom.conf.*
>
> *[macro-dialout-trunk-predial-hook]
> exten => s,1,GotoIf($["${OUT_${DIAL_TRUNK}:4:4}" =
> "A2B/"]?custom-freepbx-a2billing,${OUTNUM},1:2)
> exten => s,2,MacroExit
>
> [custom-freepbx-a2billing]
> exten => _X.,1,DeadAGI(a2billing.php|${OUT_${DIAL_TRUNK}:8})
> exten => _X.,n,Hangup()*
>
> *2. Fiz os includes abaixo:*
>
> *echo '#include extensions_a2billing.conf' >> extensions_custom.conf
> echo '#include additional_a2billing_iax.conf' >> iax_custom.conf
> echo '#include additional_a2billing_sip.conf' >> sip_custom.conf*
>
> *3. Criei os seguintes trunks:*
>
> SIP Trunk
> *Trunk Description: TELLFREE*
>
> Custom Trunk
> *Trunk Description: A2B
> Custon Dial String: Local/$OUTNUM$@a2billing/n*
>
> *4. Criei uma Outbound Route:*
>
> *Dial Patterns: X.*
> Trunk Sequence: *Local/$OUTNUM$@a2billing/n
>
> *Obs.: Se eu mudar o Trunk Sequence para TELLFREE (SIP TRUNK) as ligações
> são efetuadas normalmente.*
>
> **5. Crieu um ramal, com accountcode igual ao Card Number do Costumer que
> criei no A2Billing.*
>
> Fiz as segunites configurações no A2Billing:
>
> 1. Criei um Trunk;
> 2. Criei um RateCard;
> 3. Criei um Rate;
> 4. Criei um Call Plan;
> 5. Criei um Costumer.
>
> Segue abaixo o log de uma chamada:
>
> mirage*CLI>
>   == Using SIP RTP TOS bits 184
>   == Using SIP RTP CoS mark 5
>     -- Executing [06892093094 em from-internal:1] Macro("SIP/1001-00000002",
> "user-callerid,SKIPTTL,") in new stack
>     -- Executing [s em macro-user-callerid:1] Set("SIP/1001-00000002",
> "AMPUSER=1001") in new stack
>     -- Executing [s em macro-user-callerid:2] GotoIf("SIP/1001-00000002",
> "0?report") in new stack
>     -- Executing [s em macro-user-callerid:3] ExecIf("SIP/1001-00000002",
> "1?Set(REALCALLERIDNUM=1001)") in new stack
>     -- Executing [s em macro-user-callerid:4] Set("SIP/1001-00000002",
> "AMPUSER=1001") in new stack
>     -- Executing [s em macro-user-callerid:5] Set("SIP/1001-00000002",
> "AMPUSERCIDNAME=1001") in new stack
>     -- Executing [s em macro-user-callerid:6] GotoIf("SIP/1001-00000002",
> "0?report") in new stack
>     -- Executing [s em macro-user-callerid:7] Set("SIP/1001-00000002",
> "AMPUSERCID=1001") in new stack
>     -- Executing [s em macro-user-callerid:8] Set("SIP/1001-00000002",
> "CALLERID(all)="1001" <1001>") in new stack
>     -- Executing [s em macro-user-callerid:9] ExecIf("SIP/1001-00000002",
> "0?Set(CHANNEL(language)=)") in new stack
>     -- Executing [s em macro-user-callerid:10] GotoIf("SIP/1001-00000002",
> "1?continue") in new stack
>     -- Goto (macro-user-callerid,s,19)
>     -- Executing [s em macro-user-callerid:19] NoOp("SIP/1001-00000002",
> "Using CallerID "1001" <1001>") in new stack
>     -- Executing [06892093094 em from-internal:2] Set("SIP/1001-00000002",
> "_NODEST=") in new stack
>     -- Executing [06892093094 em from-internal:3] Macro("SIP/1001-00000002",
> "record-enable,1001,OUT,") in new stack
>     -- Executing [s em macro-record-enable:1] GotoIf("SIP/1001-00000002",
> "1?check") in new stack
>     -- Goto (macro-record-enable,s,4)
>     -- Executing [s em macro-record-enable:4] ExecIf("SIP/1001-00000002",
> "0?MacroExit()") in new stack
>     -- Executing [s em macro-record-enable:5] GotoIf("SIP/1001-00000002",
> "0?Group:OUT") in new stack
>     -- Goto (macro-record-enable,s,15)
>     -- Executing [s em macro-record-enable:15] GotoIf("SIP/1001-00000002",
> "0?IN") in new stack
>     -- Executing [s em macro-record-enable:16] ExecIf("SIP/1001-00000002",
> "1?MacroExit()") in new stack
>     -- Executing [06892093094 em from-internal:4] Macro("SIP/1001-00000002",
> "dialout-trunk,3,06892093094,,") in new stack
>     -- Executing [s em macro-dialout-trunk:1] Set("SIP/1001-00000002",
> "DIAL_TRUNK=3") in new stack
>     -- Executing [s em macro-dialout-trunk:2] GosubIf("SIP/1001-00000002",
> "0?sub-pincheck,s,1") in new stack
>     -- Executing [s em macro-dialout-trunk:3] GotoIf("SIP/1001-00000002",
> "0?disabletrunk,1") in new stack
>     -- Executing [s em macro-dialout-trunk:4] Set("SIP/1001-00000002",
> "DIAL_NUMBER=06892093094") in new stack
>     -- Executing [s em macro-dialout-trunk:5] Set("SIP/1001-00000002",
> "DIAL_TRUNK_OPTIONS=tr") in new stack
>     -- Executing [s em macro-dialout-trunk:6] Set("SIP/1001-00000002",
> "OUTBOUND_GROUP=OUT_3") in new stack
>     -- Executing [s em macro-dialout-trunk:7] GotoIf("SIP/1001-00000002",
> "1?nomax") in new stack
>     -- Goto (macro-dialout-trunk,s,9)
>     -- Executing [s em macro-dialout-trunk:9] GotoIf("SIP/1001-00000002",
> "0?skipoutcid") in new stack
>     -- Executing [s em macro-dialout-trunk:10] Set("SIP/1001-00000002",
> "DIAL_TRUNK_OPTIONS=") in new stack
>     -- Executing [s em macro-dialout-trunk:11] Macro("SIP/1001-00000002",
> "outbound-callerid,3") in new stack
>     -- Executing [s em macro-outbound-callerid:1] ExecIf("SIP/1001-00000002",
> "0?Set(CALLERPRES()=)") in new stack
>     -- Executing [s em macro-outbound-callerid:2] ExecIf("SIP/1001-00000002",
> "0?Set(REALCALLERIDNUM=1001)") in new stack
>     -- Executing [s em macro-outbound-callerid:3] GotoIf("SIP/1001-00000002",
> "1?normcid") in new stack
>     -- Goto (macro-outbound-callerid,s,6)
>     -- Executing [s em macro-outbound-callerid:6] Set("SIP/1001-00000002",
> "USEROUTCID=") in new stack
>     -- Executing [s em macro-outbound-callerid:7] Set("SIP/1001-00000002",
> "EMERGENCYCID=") in new stack
>     -- Executing [s em macro-outbound-callerid:8] Set("SIP/1001-00000002",
> "TRUNKOUTCID=") in new stack
>     -- Executing [s em macro-outbound-callerid:9] GotoIf("SIP/1001-00000002",
> "1?trunkcid") in new stack
>     -- Goto (macro-outbound-callerid,s,12)
>     -- Executing [s em macro-outbound-callerid:12]
> ExecIf("SIP/1001-00000002", "0?Set(CALLERID(all)=)") in new stack
>     -- Executing [s em macro-outbound-callerid:13]
> ExecIf("SIP/1001-00000002", "0?Set(CALLERID(all)=)") in new stack
>     -- Executing [s em macro-outbound-callerid:14]
> ExecIf("SIP/1001-00000002", "0?Set(CALLERID(all)=)") in new stack
>     -- Executing [s em macro-outbound-callerid:15]
> ExecIf("SIP/1001-00000002", "0?Set(CALLERPRES()=prohib_passed_screen)") in
> new stack
>     -- Executing [s em macro-dialout-trunk:12] ExecIf("SIP/1001-00000002",
> "0?AGI(fixlocalprefix)") in new stack
>     -- Executing [s em macro-dialout-trunk:13] Set("SIP/1001-00000002",
> "OUTNUM=06892093094") in new stack
>     -- Executing [s em macro-dialout-trunk:14] Set("SIP/1001-00000002",
> "custom=AMP") in new stack
>     -- Executing [s em macro-dialout-trunk:15] ExecIf("SIP/1001-00000002",
> "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^))") in new stack
>     -- Executing [s em macro-dialout-trunk:16] Macro("SIP/1001-00000002",
> "dialout-trunk-predial-hook,") in new stack
>     -- Executing [s em macro-dialout-trunk-predial-hook:1]
> GotoIf("SIP/1001-00000002", "0?custom-freepbx-a2billing,06892093094,1:2") in
> new stack
>     -- Goto (macro-dialout-trunk-predial-hook,s,2)
>     -- Executing [s em macro-dialout-trunk-predial-hook:2]
> MacroExit("SIP/1001-00000002", "") in new stack
>     -- Executing [s em macro-dialout-trunk:17] GotoIf("SIP/1001-00000002",
> "0?bypass,1") in new stack
>     -- Executing [s em macro-dialout-trunk:18] GotoIf("SIP/1001-00000002",
> "1?customtrunk") in new stack
>     -- Goto (macro-dialout-trunk,s,22)
>     -- Executing [s em macro-dialout-trunk:22] Set("SIP/1001-00000002",
> "pre_num=AMP:Local/") in new stack
>     -- Executing [s em macro-dialout-trunk:23] Set("SIP/1001-00000002",
> "the_num=OUTNUM") in new stack
>     -- Executing [s em macro-dialout-trunk:24] Set("SIP/1001-00000002",
> "post_num=@a2billing/n") in new stack
>     -- Executing [s em macro-dialout-trunk:25] GotoIf("SIP/1001-00000002",
> "1?outnum:skipoutnum") in new stack
>     -- Goto (macro-dialout-trunk,s,26)
>     -- Executing [s em macro-dialout-trunk:26] Set("SIP/1001-00000002",
> "the_num=06892093094") in new stack
>     -- Executing [s em macro-dialout-trunk:27] Dial("SIP/1001-00000002",
> "Local/06892093094 em a2billing/n,300,") in new stack
>     -- Couldn't call 06892093094 em a2billing/n
>   == Everyone is busy/congested at this time (0:0/0/0)
>     -- Executing [s em macro-dialout-trunk:28] NoOp("SIP/1001-00000002",
> "Dial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE =
> 0") in new stack
>     -- Executing [s em macro-dialout-trunk:29] Goto("SIP/1001-00000002",
> "s-CHANUNAVAIL,1") in new stack
>     -- Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)
>     -- Executing [s-CHANUNAVAIL em macro-dialout-trunk:1]
> Set("SIP/1001-00000002", "RC=0") in new stack
>     -- Executing [s-CHANUNAVAIL em macro-dialout-trunk:2]
> Goto("SIP/1001-00000002", "0,1") in new stack
>     -- Goto (macro-dialout-trunk,0,1)
>     -- Executing [0 em macro-dialout-trunk:1] Goto("SIP/1001-00000002",
> "continue,1") in new stack
>     -- Goto (macro-dialout-trunk,continue,1)
>     -- Executing [continue em macro-dialout-trunk:1]
> GotoIf("SIP/1001-00000002", "1?noreport") in new stack
>     -- Goto (macro-dialout-trunk,continue,3)
>     -- Executing [continue em macro-dialout-trunk:3]
> NoOp("SIP/1001-00000002", "TRUNK Dial failed due to CHANUNAVAIL HANGUPCAUSE:
> 0 - failing through to other trunks") in new stack
>     -- Executing [continue em macro-dialout-trunk:4] Set("SIP/1001-00000002",
> "CALLERID(number)=1001") in new stack
>     -- Executing [06892093094 em from-internal:5] Macro("SIP/1001-00000002",
> "outisbusy,") in new stack
>     -- Executing [s em macro-outisbusy:1] Progress("SIP/1001-00000002", "")
> in new stack
>     -- Executing [s em macro-outisbusy:2] GotoIf("SIP/1001-00000002",
> "0?emergency,1") in new stack
>     -- Executing [s em macro-outisbusy:3] GotoIf("SIP/1001-00000002",
> "0?intracompany,1") in new stack
>     -- Executing [s em macro-outisbusy:4] Playback("SIP/1001-00000002",
> "all-circuits-busy-now&pls-try-call-later, noanswer") in new stack
>     -- <SIP/1001-00000002> Playing 'all-circuits-busy-now.gsm' (language
> 'en')
>     -- <SIP/1001-00000002> Playing 'pls-try-call-later.gsm' (language 'en')
>     -- Executing [s em macro-outisbusy:5] Congestion("SIP/1001-00000002",
> "20") in new stack
>   == Spawn extension (macro-outisbusy, s, 5) exited non-zero on
> 'SIP/1001-00000002' in macro 'outisbusy'
>   == Spawn extension (from-internal, 06892093094, 5) exited non-zero on
> 'SIP/1001-00000002'
>     -- Executing [h em from-internal:1] Macro("SIP/1001-00000002",
> "hangupcall") in new stack
>     -- Executing [s em macro-hangupcall:1] GotoIf("SIP/1001-00000002",
> "1?noautomon") in new stack
>     -- Goto (macro-hangupcall,s,3)
>     -- Executing [s em macro-hangupcall:3] NoOp("SIP/1001-00000002",
> "TOUCH_MONITOR_OUTPUT=") in new stack
>     -- Executing [s em macro-hangupcall:4] GotoIf("SIP/1001-00000002",
> "1?skiprg") in new stack
>     -- Goto (macro-hangupcall,s,7)
>     -- Executing [s em macro-hangupcall:7] GotoIf("SIP/1001-00000002",
> "1?skipblkvm") in new stack
>     -- Goto (macro-hangupcall,s,10)
>     -- Executing [s em macro-hangupcall:10] GotoIf("SIP/1001-00000002",
> "1?theend") in new stack
>     -- Goto (macro-hangupcall,s,12)
>     -- Executing [s em macro-hangupcall:12] Hangup("SIP/1001-00000002", "")
> in new stack
>   == Spawn extension (macro-hangupcall, s, 12) exited non-zero on
> 'SIP/1001-00000002' in macro 'hangupcall'
>   == Spawn extension (from-internal, h, 1) exited non-zero on
> 'SIP/1001-00000002'
> mirage*CLI>
>
> Desde já agradeço pela ajuda.
>
> Abs,
> Andrey Smith
>



-- 
Andrey Smith
Linux User # 405102
-------------- Próxima Parte ----------
Um anexo em HTML foi limpo...
URL: http://listas.asteriskbrasil.org/pipermail/asteriskbrasil/attachments/20110111/b7b1e599/attachment-0001.htm 


Mais detalhes sobre a lista de discussão AsteriskBrasil