<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">se voce marcou o remove interprefix
      sim, mas nao sei se ele pega 00 ou 011 , nunca usei este recurso,
      por&eacute;m, se voc&ecirc; marcou no tronco pra ele remover ent&atilde;o &eacute; s&oacute; depois
      que ja processou.<br>
      <br>
      Em 10/09/13 22:10, Danilo Almeida escreveu:<br>
    </div>
    <blockquote
cite="mid:CA+hW1b2Rdm53biFddq32WVWZh=k7_Sw82S-gopgRL474NrHY+A@mail.gmail.com"
      type="cite">
      <div dir="ltr">Boa noite Rogger,
        <div>pois ent&atilde;o, minha discagem sai 005543XXXXXXXX, pela
          configura&ccedil;&atilde;o, ele remove o "00" no callplan e procura uma rate
          "5543."</div>
        <div><br>
        </div>
        <div>N&atilde;o seria essa a l&oacute;gica ou entendi errado?</div>
        <div><br>
        </div>
        <div>Obrigado</div>
      </div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">Em 10 de setembro de 2013 21:48, Rogger
          Faioli <span dir="ltr">&lt;<a moz-do-not-send="true"
              href="mailto:rogger.faioli@gmail.com" target="_blank">rogger.faioli@gmail.com</a>&gt;</span>
          escreveu:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div dir="ltr">
              <div>
                <div>Danilo,<br>
                  <br>
                </div>
                Ele sempre olha o ratecard da esquerda para direita
                sendo assim n&atilde;o vai funcionar pois ele vai procurar por
                algo que comece com 0.<br>
                <br>
              </div>
              Rogger<br>
            </div>
            <div class="gmail_extra">
              <br>
              <br>
              <div class="gmail_quote">Em 10 de setembro de 2013 20:41,
                Danilo Almeida <span dir="ltr">&lt;<a
                    moz-do-not-send="true"
                    href="mailto:daniloricalmeida@gmail.com"
                    target="_blank">daniloricalmeida@gmail.com</a>&gt;</span>
                escreveu:
                <div>
                  <div class="h5">
                    <br>
                    <blockquote class="gmail_quote" style="margin:0 0 0
                      .8ex;border-left:1px #ccc solid;padding-left:1ex">
                      <div dir="ltr">Aproveitando o t&oacute;pico...
                        <div>Estou tentando testar o a2billing aqui
                          tamb&eacute;m... fiz a instala&ccedil;&atilde;o e esta tudo ok,
                          por&eacute;m, no log do agi me mostra que tem alguma
                          coisa errada com minha rate:</div>
                        <div><br>
                        </div>
                        <div>
                          <pre style="margin-top:0px;margin-bottom:0px;padding:0px;background-color:rgb(252,252,252)"><font color="#666666">[CREDIT : 5.00000][CREDIT MIN_CREDIT_2CALL : 0]]
[10/09/2013 20:31:15]:[<a class="moz-txt-link-freetext" href="file:a2billing.php">file:a2billing.php</a> - line:396 - uniqueid:1378855875.25]:[CallerID:3938529637]:[CN:3938529637]:[TARIFF ID -&gt; 1]
[10/09/2013 20:31:15]:[<a class="moz-txt-link-freetext" href="file:Class.A2Billing.php">file:Class.A2Billing.php</a> - line:881 - uniqueid:1378855875.25]:[CallerID:3938529637]:[CN:3938529637]:[[CALL 2 DID]]
[10/09/2013 20:31:15]:[<a class="moz-txt-link-freetext" href="file:Class.A2Billing.php">file:Class.A2Billing.php</a> - line:896 - uniqueid:1378855875.25]:[CallerID:3938529637]:[CN:3938529637]:[DESTINATION ::&gt; 00554391539806]
[10/09/2013 20:31:15]:[<a class="moz-txt-link-freetext" href="file:Class.A2Billing.php">file:Class.A2Billing.php</a> - line:1017 - uniqueid:13788</font><b><font color="#ff0000">55875.25]:[CallerID:3938529637]:[CN:3938529637]:[ERROR ::&gt; RateEngine didnt succeed to match the dialed number over the ratecard (Please check : id the ratecard is well create ; if the removeInter_Prefix is set according to your prefix in the ratecard ; if you hooked the ratecard to the Call Plan)]</font></b><font color="#666666">
[10/09/2013 20:31:15]:[<a class="moz-txt-link-freetext" href="file:a2billing.php">file:a2billing.php</a> - line:193 - uniqueid:1378855875.25]:[CallerID:3938529637]:[CN:3938529637]:[[CHANNEL STATUS : 6 = Line is up]
[CREDIT : 5.00000][CREDIT MIN_CREDIT_2CALL : 0]]</font></pre>
                        </div>
                        <div class="gmail_extra"><br>
                        </div>
                        <div class="gmail_extra">S&oacute; que j&aacute; fiz e refiz
                          as confs de cria&ccedil;&atilde;o de Rates.</div>
                        <div class="gmail_extra"><br>
                        </div>
                        <div class="gmail_extra">
                          Criei um call plan</div>
                        <div class="gmail_extra">Criei uma ratecard</div>
                        <div class="gmail_extra">Criei uma rate com
                          prefixo 5543</div>
                        <div class="gmail_extra">editei o call plan e
                          inseri a ratecard como manda o figurino e
                          deixei a op&ccedil;&atilde;o de remove inter prefix "yes"...</div>
                        <div class="gmail_extra"><br>
                        </div>
                        <div class="gmail_extra">Bom, vi v&aacute;rios tuto na
                          interent e todos da mesma forma que fiz,
                          por&eacute;m, a bendita chamada n&atilde;o sai e me retorna
                          o erro acima.</div>
                        <div class="gmail_extra"><br>
                        </div>
                        <div class="gmail_extra">disco 005543XXXXXXXX
                          para realizar uma chamada e nada.</div>
                        <div class="gmail_extra"><br>
                        </div>
                        <div class="gmail_extra">Algu&eacute;m ai poderia me
                          dar uma dica no que fiz de errado?</div>
                        <div class="gmail_extra">
                          <br>
                        </div>
                        <div class="gmail_extra">Obrigado</div>
                        <div class="gmail_extra"><br>
                        </div>
                        <div class="gmail_extra"><br>
                          <br>
                          <div class="gmail_quote">Em 10 de setembro de
                            2013 11:44, Mike Tesliuk <span dir="ltr">&lt;<a
                                moz-do-not-send="true"
                                href="mailto:mike@tesliuk.com"
                                target="_blank">mike@tesliuk.com</a>&gt;</span>
                            escreveu:
                            <div>
                              <div><br>
                                <blockquote class="gmail_quote"
                                  style="margin:0 0 0
                                  .8ex;border-left:1px #ccc
                                  solid;padding-left:1ex">
                                  <div bgcolor="#FFFFFF" text="#000000">
                                    <div>&eacute; isso ai, agora ele ta pedindo
                                      pin number porque nao esta
                                      identificando o usu&aacute;rio, dai pra
                                      frente &eacute; ajustes que voce faz para
                                      funcionar<br>
                                      <br>
                                      Em 10/09/13 10:39, Guilherme
                                      Rezende escreveu:<br>
                                    </div>
                                    <div>
                                      <div>
                                        <blockquote type="cite"> &nbsp;&nbsp;&nbsp;
                                          Mike, fiz a instala&ccedil;&atilde;o do meu
                                          a2billing no dir
                                          /home/a2billing.&nbsp; Ali dentro
                                          descompactei tudo e fiz as
                                          conf do Apache p/ ler o
                                          diret&oacute;rio.&nbsp; Bom, apontei
                                          dentro de
                                          /var/lib/asterisk/agi-bin a
                                          lib /home/a2billing/AGI/lib.<br>
                                          &nbsp;&nbsp;&nbsp; Sobrescrevi meu
                                          a2billing.php e parou de
                                          apresentar esse erro.&nbsp; Na
                                          verdade meu a2billing.php
                                          estava errado e n&atilde;o sei de
                                          onde tirei isso&nbsp; e&nbsp; pe&ccedil;o at&eacute;
                                          desculpas pela falta de
                                          aten&ccedil;&atilde;o em gerar uma duvida
                                          como essa.&nbsp; <br>
                                          <br>
                                          Portanto ficou assim:<br>
                                          [a2billing]<br>
                                          ; CallingCard application<br>
                                          exten =&gt;
                                          _X.,1,NoOp(A2Billing Start)<br>
                                          exten =&gt;
                                          _X.,n,Agi(/var/lib/asterisk/agi-bin/a2billing.php)<br>
                                          exten =&gt; _X.,n,Hangup<br>
                                          <br>
                                          Criei uma conta sip dentro do
                                          a2billing e inseri essa conta
                                          dentro do meu sip.conf<br>
                                          [8461737813]<br>
                                          type=friend<br>
                                          secret=123mudar<br>
                                          host=dynamic<br>
                                          nat=yes<br>
                                          dtmfmode=auto<br>
                                          qualify=yes<br>
                                          insecure=port,invite<br>
                                          allow=ulaw<br>
                                          callgroup=1<br>
                                          pickupgroup=1<br>
                                          canreinvite=no<br>
                                          context=a2billing<br>
                                          <br>
                                          Me logo e na hora que tento
                                          fazer uma chamada, recebo o
                                          seguinte:<br>
                                          <br>
                                          [Sep 10 11:39:36]&nbsp;&nbsp;&nbsp;&nbsp; --
                                          Executing
                                          [36932367@a2billing:1]
                                          NoOp("SIP/8461737813-00002540",
                                          "A2Billing Start") in new
                                          stack<br>
                                          [Sep 10 11:39:36]&nbsp;&nbsp;&nbsp;&nbsp; --
                                          Executing
                                          [36932367@a2billing:2]
                                          AGI("SIP/8461737813-00002540",
                                          "/var/lib/asterisk/agi-bin/a2billing.php")
                                          in new stack<br>
                                          [Sep 10 11:39:36]&nbsp;&nbsp;&nbsp;&nbsp; --
                                          Launched AGI Script
                                          /var/lib/asterisk/agi-bin/a2billing.php<br>
                                          [Sep 10 11:39:36] AGI Tx
                                          &gt;&gt; agi_request:
                                          /var/lib/asterisk/agi-bin/a2billing.php<br>
                                          [Sep 10 11:39:36] AGI Tx
                                          &gt;&gt; agi_channel:
                                          SIP/8461737813-00002540<br>
                                          [Sep 10 11:39:36] AGI Tx
                                          &gt;&gt; agi_language: en<br>
                                          [Sep 10 11:39:36] AGI Tx
                                          &gt;&gt; agi_type: SIP<br>
                                          [Sep 10 11:39:36] AGI Tx
                                          &gt;&gt; agi_uniqueid:
                                          1378823976.15266<br>
                                          [Sep 10 11:39:36] AGI Tx
                                          &gt;&gt; agi_callerid:
                                          8461737813<br>
                                          [Sep 10 11:39:36] AGI Tx
                                          &gt;&gt; agi_calleridname:
                                          8461737813<br>
                                          [Sep 10 11:39:36] AGI Tx
                                          &gt;&gt; agi_callingpres: 0<br>
                                          [Sep 10 11:39:36] AGI Tx
                                          &gt;&gt; agi_callingani2: 0<br>
                                          [Sep 10 11:39:36] AGI Tx
                                          &gt;&gt; agi_callington: 0<br>
                                          [Sep 10 11:39:36] AGI Tx
                                          &gt;&gt; agi_callingtns: 0<br>
                                          [Sep 10 11:39:36] AGI Tx
                                          &gt;&gt; agi_dnid: 36932367<br>
                                          [Sep 10 11:39:36] AGI Tx
                                          &gt;&gt; agi_rdnis: unknown<br>
                                          [Sep 10 11:39:36] AGI Tx
                                          &gt;&gt; agi_context:
                                          a2billing<br>
                                          [Sep 10 11:39:36] AGI Tx
                                          &gt;&gt; agi_extension:
                                          36932367<br>
                                          [Sep 10 11:39:36] AGI Tx
                                          &gt;&gt; agi_priority: 2<br>
                                          [Sep 10 11:39:36] AGI Tx
                                          &gt;&gt; agi_enhanced: 0.0<br>
                                          [Sep 10 11:39:36] AGI Tx
                                          &gt;&gt; agi_accountcode:<br>
                                          [Sep 10 11:39:36] AGI Tx
                                          &gt;&gt;<br>
                                          [Sep 10 11:39:36] AGI Rx
                                          &lt;&lt; GET VARIABLE IDCONF<br>
                                          [Sep 10 11:39:36] AGI Tx
                                          &gt;&gt; 200 result=0<br>
                                          [Sep 10 11:39:36] AGI Rx
                                          &lt;&lt; ANSWER<br>
                                          [Sep 10 11:39:36] AGI Tx
                                          &gt;&gt; 200 result=0<br>
                                          [Sep 10 11:39:36] AGI Rx
                                          &lt;&lt; SET VARIABLE
                                          CHANNEL(language) "br"<br>
                                          [Sep 10 11:39:36] AGI Tx
                                          &gt;&gt; 200 result=1<br>
                                          [Sep 10 11:39:36] AGI Rx
                                          &lt;&lt; GET DATA
                                          prepaid-enter-pin-number 6000
                                          15<br>
                                          [Sep 10 11:39:36] AGI Tx
                                          &gt;&gt; 200 result=-1<br>
                                          [Sep 10 11:39:36] AGI Rx
                                          &lt;&lt; GET DATA
                                          prepaid-enter-pin-number 6000
                                          15<br>
                                          [Sep 10 11:39:36] AGI Tx
                                          &gt;&gt; 200 result=-1<br>
                                          [Sep 10 11:39:36] AGI Rx
                                          &lt;&lt; GET DATA
                                          prepaid-enter-pin-number 6000
                                          15<br>
                                          [Sep 10 11:39:36] AGI Tx
                                          &gt;&gt; 200 result=-1<br>
                                          [Sep 10 11:39:36] AGI Rx
                                          &lt;&lt; HANGUP<br>
                                          [Sep 10 11:39:36] AGI Tx
                                          &gt;&gt; 200 result=1<br>
                                          [Sep 10 11:39:36]&nbsp;&nbsp; == Spawn
                                          extension (a2billing,
                                          36932367, 2) exited non-zero
                                          on 'SIP/8461737813-00002540'<br>
                                          <br>
                                          <br>
                                          &nbsp;&nbsp;&nbsp; Vou dar mais uma estuda
                                          agora dentro front-end do
                                          A2billing e verificar o porque
                                          da liga&ccedil;&atilde;o n&atilde;o est&aacute; sendo
                                          completada.<br>
                                          <br>
                                          <br>
                                          Abs e vlw pela ajuda.<br>
                                          <br>
                                          &nbsp;&nbsp;&nbsp; <br>
                                          <br>
                                          <br>
                                          <br>
                                          <br>
                                          Em 10/09/2013 10:41, Mike
                                          Tesliuk escreveu:
                                          <blockquote type="cite">
                                            <div>Complementando, no
                                              arquivo que voce baixou do
                                              a2billing voce deve ter
                                              varios diretorios, no
                                              diretorio AGI voce tem o
                                              arquivo que voce precisa
                                              (a2billing.php) , o link
                                              lib que voce tem que ter &eacute;
                                              para o diretorio
                                              common/lib&nbsp; , nao sei se
                                              funciona mas tem um
                                              arquivo com instru&ccedil;&otilde;es de
                                              instala&ccedil;&atilde;o la, talvez voce
                                              devesse seguir como &eacute;
                                              mostrado, e n&atilde;o tentar
                                              adaptar ja que voc&ecirc; nao
                                              entende perfeitamente oque
                                              esta sendo executado.<br>
                                              <br>
                                              PS: Digo seguir exatamente
                                              porque voce jogou o link
                                              para o lib num diretorio
                                              no teu /home e isso &eacute;
                                              completamente fora de
                                              padr&atilde;o<br>
                                              <br>
                                              <br>
                                              Em 10/09/13 09:29, Mike
                                              Tesliuk escreveu:<br>
                                            </div>
                                            <blockquote type="cite">
                                              <div>foi mal, ta nao :)<br>
                                                <br>
                                                a pergunta &eacute; , o
                                                asterisk esta executando
                                                com root ou com usuario
                                                asterisk ? se tiver
                                                executando com usu&aacute;rio
                                                asterisk entao
                                                provavelmente ele nao
                                                consegue entrar no seu
                                                /home para acessar a lib<br>
                                                <br>
                                                no mais, oque ocorre se
                                                voce digitar php
                                                a2billing.php la
                                                /var/lib/asterisk/agi-bin/
                                                ?<br>
                                                <br>
                                                <br>
                                                <br>
                                                Em 10/09/13 09:25, Mike
                                                Tesliuk escreveu:<br>
                                              </div>
                                              <blockquote type="cite">
                                                <div>pelo que vi o
                                                  script a2billing.php
                                                  nao tem permissao de
                                                  execu&ccedil;&atilde;o, de um chmod
                                                  +x nele<br>
                                                  <br>
                                                  Em 10/09/13 09:16,
                                                  Guilherme Rezende
                                                  escreveu:<br>
                                                </div>
                                                <blockquote type="cite">
                                                  Pessoal, executei o
                                                  debug do AGI e ele me
                                                  pede a instala&ccedil;&atilde;o do
                                                  wordpress.&nbsp; Bom, fiz a
                                                  instala&ccedil;&atilde;o e o erro
                                                  persiste:<br>
                                                  <br>
                                                  [Sep 10 10:12:19]&nbsp;&nbsp;&nbsp;&nbsp;
                                                  -- Executing
                                                  [02136932367@a2billing:1]
                                                  NoOp("SIP/7383848570-000000ff",

                                                  "A2Billing Start") in
                                                  new stack<br>
                                                  [Sep 10 10:12:19]&nbsp;&nbsp;&nbsp;&nbsp;
                                                  -- Executing
                                                  [02136932367@a2billing:2]
                                                  AGI("SIP/7383848570-000000ff",

                                                  "/var/lib/asterisk/agi-bin/a2billing.php,1")
                                                  in new stack<br>
                                                  [Sep 10 10:12:19]&nbsp;&nbsp;&nbsp;&nbsp;
                                                  -- Launched AGI Script
/var/lib/asterisk/agi-bin/a2billing.php<br>
                                                  [Sep 10 10:12:19]
                                                  &lt;SIP/7383848570-000000ff&gt;AGI
                                                  Tx &gt;&gt;
                                                  agi_request:
                                                  /var/lib/asterisk/agi-bin/a2billing.php<br>
                                                  [Sep 10 10:12:19]
                                                  &lt;SIP/7383848570-000000ff&gt;AGI
                                                  Tx &gt;&gt;
                                                  agi_channel:
                                                  SIP/7383848570-000000ff<br>
                                                  [Sep 10 10:12:19]
                                                  &lt;SIP/7383848570-000000ff&gt;AGI
                                                  Tx &gt;&gt;
                                                  agi_language: en<br>
                                                  [Sep 10 10:12:19]
                                                  &lt;SIP/7383848570-000000ff&gt;AGI
                                                  Tx &gt;&gt; agi_type:
                                                  SIP<br>
                                                  [Sep 10 10:12:19]
                                                  &lt;SIP/7383848570-000000ff&gt;AGI
                                                  Tx &gt;&gt;
                                                  agi_uniqueid:
                                                  1378818739.386<br>
                                                  [Sep 10 10:12:19]
                                                  &lt;SIP/7383848570-000000ff&gt;AGI
                                                  Tx &gt;&gt;
                                                  agi_version: 1.8.10.1<br>
                                                  [Sep 10 10:12:19]
                                                  &lt;SIP/7383848570-000000ff&gt;AGI
                                                  Tx &gt;&gt;
                                                  agi_callerid:
                                                  7383848570<br>
                                                  [Sep 10 10:12:19]
                                                  &lt;SIP/7383848570-000000ff&gt;AGI
                                                  Tx &gt;&gt;
                                                  agi_calleridname:
                                                  7383848570<br>
                                                  [Sep 10 10:12:19]
                                                  &lt;SIP/7383848570-000000ff&gt;AGI
                                                  Tx &gt;&gt;
                                                  agi_callingpres: 0<br>
                                                  [Sep 10 10:12:19]
                                                  &lt;SIP/7383848570-000000ff&gt;AGI
                                                  Tx &gt;&gt;
                                                  agi_callingani2: 0<br>
                                                  [Sep 10 10:12:19]
                                                  &lt;SIP/7383848570-000000ff&gt;AGI
                                                  Tx &gt;&gt;
                                                  agi_callington: 0<br>
                                                  [Sep 10 10:12:19]
                                                  &lt;SIP/7383848570-000000ff&gt;AGI
                                                  Tx &gt;&gt;
                                                  agi_callingtns: 0<br>
                                                  [Sep 10 10:12:19]
                                                  &lt;SIP/7383848570-000000ff&gt;AGI
                                                  Tx &gt;&gt; agi_dnid:
                                                  02136932367<br>
                                                  [Sep 10 10:12:19]
                                                  &lt;SIP/7383848570-000000ff&gt;AGI
                                                  Tx &gt;&gt; agi_rdnis:
                                                  unknown<br>
                                                  [Sep 10 10:12:19]
                                                  &lt;SIP/7383848570-000000ff&gt;AGI
                                                  Tx &gt;&gt;
                                                  agi_context: a2billing<br>
                                                  [Sep 10 10:12:19]
                                                  &lt;SIP/7383848570-000000ff&gt;AGI
                                                  Tx &gt;&gt;
                                                  agi_extension:
                                                  02136932367<br>
                                                  [Sep 10 10:12:19]
                                                  &lt;SIP/7383848570-000000ff&gt;AGI
                                                  Tx &gt;&gt;
                                                  agi_priority: 2<br>
                                                  [Sep 10 10:12:19]
                                                  &lt;SIP/7383848570-000000ff&gt;AGI
                                                  Tx &gt;&gt;
                                                  agi_enhanced: 0.0<br>
                                                  [Sep 10 10:12:19]
                                                  &lt;SIP/7383848570-000000ff&gt;AGI
                                                  Tx &gt;&gt;
                                                  agi_accountcode:<br>
                                                  [Sep 10 10:12:19]
                                                  &lt;SIP/7383848570-000000ff&gt;AGI
                                                  Tx &gt;&gt;
                                                  agi_threadid:
                                                  140415406225152<br>
                                                  [Sep 10 10:12:19]
                                                  &lt;SIP/7383848570-000000ff&gt;AGI
                                                  Tx &gt;&gt; agi_arg_1:
                                                  1<br>
                                                  [Sep 10 10:12:19]
                                                  &lt;SIP/7383848570-000000ff&gt;AGI
                                                  Tx &gt;&gt;<br>
                                                  <b>[Sep 10 10:12:19]
                                                    &lt;SIP/7383848570-000000ff&gt;AGI
                                                    Rx &lt;&lt;
                                                    A2Billing requires
                                                    WordPress 2.3 or
                                                    newer. &lt;a href=<a
moz-do-not-send="true"
                                                      href="http://codex.wordpress.org/Upgrading_WordPress"
                                                      target="_blank">"http://codex.wordpress.org/Upgrading_WordPress"</a>&gt;Please






                                                    update!&lt;/a&gt;<br>
                                                    [Sep 10 10:12:19]
                                                    &lt;SIP/7383848570-000000ff&gt;AGI
                                                    Tx &gt;&gt; 510
                                                    Invalid or unknown
                                                    command</b><br>
                                                  [Sep 10 10:12:19]&nbsp;&nbsp;&nbsp;&nbsp;
                                                  --
                                                  &lt;SIP/7383848570-000000ff&gt;AGI
                                                  Script
                                                  /var/lib/asterisk/agi-bin/a2billing.php
                                                  completed, returning 0<br>
                                                  [Sep 10 10:12:19]&nbsp;&nbsp;&nbsp;&nbsp;
                                                  -- Executing
                                                  [02136932367@a2billing:3]
                                                  Hangup("SIP/7383848570-000000ff",
                                                  "") in new stack<br>
                                                  [Sep 10 10:12:19]&nbsp;&nbsp; ==
                                                  Spawn extension
                                                  (a2billing,
                                                  02136932367, 3) exited
                                                  non-zero on
                                                  'SIP/7383848570-000000ff'<br>
                                                  <br>
                                                  <br>
                                                  Em 10/09/2013 09:25,
                                                  Guilherme Rezende
                                                  escreveu:
                                                  <blockquote
                                                    type="cite"> &nbsp;&nbsp;&nbsp;
                                                    Pessoal, estou
                                                    enfrentando um
                                                    problema ao iniciar
                                                    meu script
                                                    a2billing.php.&nbsp; Ja
                                                    segui o passo a
                                                    passo da instala&ccedil;&atilde;o
                                                    pela documenta&ccedil;&atilde;o
                                                    oficial.&nbsp; Ja fiz:<br>
                                                    <br>
                                                    1 - Instalei a
                                                    interface do
                                                    A2billing e est&aacute;
                                                    funcionando
                                                    perfeitamente, ja
                                                    criei as tarifas,
                                                    troncos, gerei
                                                    contas SIP e IAX e
                                                    tudo certo junto ao
                                                    banco de dados.<br>
                                                    <br>
                                                    2 - Ja coloquei a
                                                    lib do que vem junto
                                                    ao a2billing no
                                                    diret&oacute;rio
                                                    /var/lib/asterisk/agi-bin/&nbsp;&nbsp;
                                                    conforme listado
                                                    abaixo e indica&ccedil;&atilde;o
                                                    da documenta&ccedil;&atilde;o. Tbm
                                                    coloquei manualmente
                                                    a classe phpagi
                                                    dentro da raiz do
                                                    diret&oacute;rio p/ ver se
                                                    funcionaria e n&atilde;o
                                                    foi.<br>
                                                    &nbsp;&nbsp;&nbsp; -rwxr-xr-x 1
                                                    root root&nbsp;&nbsp;&nbsp; 4480
                                                    Sep 10 09:01
                                                    a2billing.php<br>
                                                    &nbsp;&nbsp; -rwxr-xr-x 1 root
                                                    root&nbsp;&nbsp;&nbsp; 1742 Sep&nbsp; 5&nbsp;
                                                    2012 agi-test.agi<br>
                                                    &nbsp;&nbsp; -rwxr-xr-x 1 root
                                                    root&nbsp;&nbsp;&nbsp;&nbsp; 594 Mar 29
                                                    16:00
                                                    blacklist_entrante.php<br>
                                                    &nbsp;&nbsp; -rwxr-xr-x 1 root
                                                    root&nbsp;&nbsp;&nbsp;&nbsp; 505 Mar 30
                                                    18:22 discador.php<br>
                                                    &nbsp;&nbsp; <b>lrwxrwxrwx 1
                                                      root root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 24
                                                      Sep 10 00:00 lib
                                                      -&gt;
                                                      /home/a2billing/AGI/lib/
                                                    </b><br>
                                                    &nbsp;&nbsp; drwxrwxr-x 4&nbsp;
                                                    538&nbsp; 542&nbsp;&nbsp;&nbsp; 4096 Sep
                                                    30&nbsp; 2010 phpagi-2.20<br>
                                                    &nbsp; -rwxr--r-- 1 root
                                                    root&nbsp;&nbsp; 67615 Mar 29
                                                    18:49 phpagi.php<br>
                                                    &nbsp; -rwxr-xr-x 1 root
                                                    root&nbsp;&nbsp;&nbsp;&nbsp; 200 Mar 29
                                                    19:28 teste1.php<br>
                                                    &nbsp; -rwxr-xr-x 1 root
                                                    root&nbsp;&nbsp;&nbsp; 1159 Mar 29
                                                    18:08 teste.php<br>
                                                    <br>
                                                    3 - Ja coloquei o
                                                    seguinte conte&uacute;do no
                                                    manager.conf<br>
                                                    &nbsp; &nbsp; [myasterisk]<br>
                                                    &nbsp;&nbsp;&nbsp; secret=mycode<br>
                                                    &nbsp;&nbsp;&nbsp; deny=<a
                                                      moz-do-not-send="true"
href="http://0.0.0.0/0.0.0.0" target="_blank">0.0.0.0/0.0.0.0</a><br>
                                                    &nbsp;&nbsp;&nbsp; permit=<a
                                                      moz-do-not-send="true"
href="http://127.0.0.1/255.255.255.0" target="_blank">127.0.0.1/255.255.255.0</a><br>
                                                    &nbsp;&nbsp;&nbsp;
                                                    read=system,call,log,verbose,command,agent,user,originate,all<br>
                                                    &nbsp;&nbsp;&nbsp;
                                                    write=system,call,log,verbose,command,agent,user,originate,all<br>
                                                    <br>
                                                    4 - Chamo o agi
                                                    dentro do contexto
                                                    a2billing conforme
                                                    exemplo de oriundo
                                                    da documenta&ccedil;&atilde;o
                                                    oficial.<br>
                                                    &nbsp;&nbsp;&nbsp; [a2billing]<br>
                                                    &nbsp;&nbsp;&nbsp; exten =&gt;
                                                    _X.,1,NoOp(A2Billing
                                                    Start)<br>
                                                    &nbsp;&nbsp;&nbsp; exten =&gt;
                                                    _X.,n,Agi(/var/lib/asterisk/agi-bin/a2billing.php)<br>
                                                    &nbsp;&nbsp;&nbsp; exten =&gt;
                                                    _X.,n,Hangup<br>
                                                    <br>
                                                    5 - Vers&otilde;es:&nbsp;
                                                    Asterisk-1.4.37 e
                                                    A2billing-1.7.1.&nbsp;&nbsp;&nbsp;
                                                    Na hora de chamar o
                                                    agi, acontece o
                                                    seguinte erro:<br>
                                                    &nbsp;&nbsp;&nbsp; [Sep 10
                                                    09:18:44]&nbsp;&nbsp;&nbsp;&nbsp; --
                                                    Executing
                                                    [36932367@a2billing:1]
                                                    NoOp("SIP/8461737813-000023f6",

                                                    "A2Billing Start")
                                                    in new stack<br>
                                                    &nbsp;&nbsp;&nbsp; [Sep 10
                                                    09:18:44]&nbsp;&nbsp;&nbsp;&nbsp; --
                                                    Executing
                                                    [36932367@a2billing:2]
                                                    AGI("SIP/8461737813-000023f6",

                                                    "/var/lib/asterisk/agi-bin/a2billing.php")
                                                    in new stack<br>
                                                    &nbsp;&nbsp;&nbsp; [Sep 10
                                                    09:18:44]&nbsp;&nbsp;&nbsp;&nbsp; --
                                                    Launched AGI Script
/var/lib/asterisk/agi-bin/a2billing.php<br>
                                                    &nbsp;&nbsp;&nbsp;<b> [Sep 10
                                                      09:18:44]
                                                      ERROR[6384]:
                                                      utils.c:968
                                                      ast_carefulwrite:
                                                      write() returned
                                                      error: Broken pipe<br>
                                                    </b>&nbsp;&nbsp;&nbsp; [Sep 10
                                                    09:18:44]&nbsp;&nbsp;&nbsp;&nbsp; -- AGI
                                                    Script
                                                    /var/lib/asterisk/agi-bin/a2billing.php
                                                    completed, returning
                                                    0<br>
                                                    &nbsp;&nbsp;&nbsp; [Sep 10
                                                    09:18:44]&nbsp;&nbsp;&nbsp;&nbsp; --
                                                    Executing
                                                    [36932367@a2billing:3]
                                                    Hangup("SIP/8461737813-000023f6",

                                                    "") in new stack<br>
                                                    &nbsp;&nbsp;&nbsp; [Sep 10
                                                    09:18:44]&nbsp;&nbsp; == Spawn
                                                    extension
                                                    (a2billing,
                                                    36932367, 3) exited
                                                    non-zero on
                                                    'SIP/8461737813-000023f6'<br>
                                                    &nbsp;<br>
                                                    Meu servidor em
                                                    produ&ccedil;&atilde;o roda
                                                    asterisk-1.8.10 e
                                                    A2billing-2.0.5 e a
                                                    mesmo erro
                                                    acontece.&nbsp;&nbsp; Eu fiz
                                                    downgrade p/ vers&atilde;o
                                                    do asterisk-1.4.37
                                                    c/ a2billing-1.7.1
                                                    em uma m&aacute;quina de
                                                    teste justamente por
                                                    algum tempo atr&aacute;s ja
                                                    ter configurado
                                                    corretamente o
                                                    a2billing e deixei
                                                    funcionando c/ essas
                                                    vers&otilde;es.&nbsp; Por isso
                                                    fiz downgrade p/ ver
                                                    se era
                                                    incompatibilidade de
                                                    vers&otilde;es de
                                                    asterisk/a2billing.<br>
                                                    Outra coisa &eacute; que ja
                                                    possuo alguns
                                                    scripts em php/agi
                                                    rodando nesse
                                                    servidor (1.8.10)
                                                    que &eacute; o em produ&ccedil;&atilde;o
                                                    sem problemas algum.<br>
                                                    <br>
                                                    Ja pesquisei
                                                    diversas
                                                    documenta&ccedil;&otilde;es e
                                                    quase todas apontam
                                                    p/ o mesmo caminho
                                                    de configura&ccedil;&atilde;o.<br>
                                                    <br>
                                                    Abs e obrigado por
                                                    qualquer ajuda.<br>
                                                    <br>
                                                    <br>
                                                    <br>
                                                    <br>
                                                    <br>
                                                    <br>
                                                    <br>
                                                    &nbsp;&nbsp;&nbsp; <br>
                                                    <br>
                                                    <br>
                                                    <br>
                                                    <fieldset></fieldset>
                                                    <br>
                                                    <pre>_______________________________________________
KHOMP: completa linha de placas externas FXO, FXS, GSM e E1;
Media Gateways de 1 a 64 E1s para SIP com R2, ISDN e SS7;
Intercomunicadores para acesso remoto via rede IP. Conhe&ccedil;a em <a moz-do-not-send="true" href="http://www.Khomp.com" target="_blank">www.Khomp.com</a>.
_______________________________________________
ALIGERA &#8211; Fabricante nacional de Gateways SIP-E1 para R2, ISDN e SS7.
Placas de 1E1, 2E1, 4E1 e 8E1 para PCI ou PCI Express.
Channel Bank &#8211; Appliance Asterisk - Acesse <a moz-do-not-send="true" href="http://www.aligera.com.br" target="_blank">www.aligera.com.br</a>.
_______________________________________________
Para remover seu email desta lista, basta enviar um email em branco para <a moz-do-not-send="true" href="mailto:asteriskbrasil-unsubscribe@listas.asteriskbrasil.org" target="_blank">asteriskbrasil-unsubscribe@listas.asteriskbrasil.org</a></pre>
                                                  </blockquote>
                                                  <br>
                                                  <br>
                                                  <fieldset></fieldset>
                                                  <br>
                                                  <pre>_______________________________________________
KHOMP: completa linha de placas externas FXO, FXS, GSM e E1;
Media Gateways de 1 a 64 E1s para SIP com R2, ISDN e SS7;
Intercomunicadores para acesso remoto via rede IP. Conhe&ccedil;a em <a moz-do-not-send="true" href="http://www.Khomp.com" target="_blank">www.Khomp.com</a>.
_______________________________________________
ALIGERA &#8211; Fabricante nacional de Gateways SIP-E1 para R2, ISDN e SS7.
Placas de 1E1, 2E1, 4E1 e 8E1 para PCI ou PCI Express.
Channel Bank &#8211; Appliance Asterisk - Acesse <a moz-do-not-send="true" href="http://www.aligera.com.br" target="_blank">www.aligera.com.br</a>.
_______________________________________________
Para remover seu email desta lista, basta enviar um email em branco para <a moz-do-not-send="true" href="mailto:asteriskbrasil-unsubscribe@listas.asteriskbrasil.org" target="_blank">asteriskbrasil-unsubscribe@listas.asteriskbrasil.org</a></pre>
                                                </blockquote>
                                                <br>
                                                <br>
                                                <fieldset></fieldset>
                                                <br>
                                                <pre>_______________________________________________
KHOMP: completa linha de placas externas FXO, FXS, GSM e E1;
Media Gateways de 1 a 64 E1s para SIP com R2, ISDN e SS7;
Intercomunicadores para acesso remoto via rede IP. Conhe&ccedil;a em <a moz-do-not-send="true" href="http://www.Khomp.com" target="_blank">www.Khomp.com</a>.
_______________________________________________
ALIGERA &#8211; Fabricante nacional de Gateways SIP-E1 para R2, ISDN e SS7.
Placas de 1E1, 2E1, 4E1 e 8E1 para PCI ou PCI Express.
Channel Bank &#8211; Appliance Asterisk - Acesse <a moz-do-not-send="true" href="http://www.aligera.com.br" target="_blank">www.aligera.com.br</a>.
_______________________________________________
Para remover seu email desta lista, basta enviar um email em branco para <a moz-do-not-send="true" href="mailto:asteriskbrasil-unsubscribe@listas.asteriskbrasil.org" target="_blank">asteriskbrasil-unsubscribe@listas.asteriskbrasil.org</a></pre>
                                              </blockquote>
                                              <br>
                                              <br>
                                              <fieldset></fieldset>
                                              <br>
                                              <pre>_______________________________________________
KHOMP: completa linha de placas externas FXO, FXS, GSM e E1;
Media Gateways de 1 a 64 E1s para SIP com R2, ISDN e SS7;
Intercomunicadores para acesso remoto via rede IP. Conhe&ccedil;a em <a moz-do-not-send="true" href="http://www.Khomp.com" target="_blank">www.Khomp.com</a>.
_______________________________________________
ALIGERA &#8211; Fabricante nacional de Gateways SIP-E1 para R2, ISDN e SS7.
Placas de 1E1, 2E1, 4E1 e 8E1 para PCI ou PCI Express.
Channel Bank &#8211; Appliance Asterisk - Acesse <a moz-do-not-send="true" href="http://www.aligera.com.br" target="_blank">www.aligera.com.br</a>.
_______________________________________________
Para remover seu email desta lista, basta enviar um email em branco para <a moz-do-not-send="true" href="mailto:asteriskbrasil-unsubscribe@listas.asteriskbrasil.org" target="_blank">asteriskbrasil-unsubscribe@listas.asteriskbrasil.org</a></pre>
                                            </blockquote>
                                            <br>
                                            <br>
                                            <fieldset></fieldset>
                                            <br>
                                            <pre>_______________________________________________
KHOMP: completa linha de placas externas FXO, FXS, GSM e E1;
Media Gateways de 1 a 64 E1s para SIP com R2, ISDN e SS7;
Intercomunicadores para acesso remoto via rede IP. Conhe&ccedil;a em <a moz-do-not-send="true" href="http://www.Khomp.com" target="_blank">www.Khomp.com</a>.
_______________________________________________
ALIGERA &#8211; Fabricante nacional de Gateways SIP-E1 para R2, ISDN e SS7.
Placas de 1E1, 2E1, 4E1 e 8E1 para PCI ou PCI Express.
Channel Bank &#8211; Appliance Asterisk - Acesse <a moz-do-not-send="true" href="http://www.aligera.com.br" target="_blank">www.aligera.com.br</a>.
_______________________________________________
Para remover seu email desta lista, basta enviar um email em branco para <a moz-do-not-send="true" href="mailto:asteriskbrasil-unsubscribe@listas.asteriskbrasil.org" target="_blank">asteriskbrasil-unsubscribe@listas.asteriskbrasil.org</a></pre>
                                          </blockquote>
                                          <br>
                                          <br>
                                          <fieldset></fieldset>
                                          <br>
                                          <pre>_______________________________________________
KHOMP: completa linha de placas externas FXO, FXS, GSM e E1;
Media Gateways de 1 a 64 E1s para SIP com R2, ISDN e SS7;
Intercomunicadores para acesso remoto via rede IP. Conhe&ccedil;a em <a moz-do-not-send="true" href="http://www.Khomp.com" target="_blank">www.Khomp.com</a>.
_______________________________________________
ALIGERA &#8211; Fabricante nacional de Gateways SIP-E1 para R2, ISDN e SS7.
Placas de 1E1, 2E1, 4E1 e 8E1 para PCI ou PCI Express.
Channel Bank &#8211; Appliance Asterisk - Acesse <a moz-do-not-send="true" href="http://www.aligera.com.br" target="_blank">www.aligera.com.br</a>.
_______________________________________________
Para remover seu email desta lista, basta enviar um email em branco para <a moz-do-not-send="true" href="mailto:asteriskbrasil-unsubscribe@listas.asteriskbrasil.org" target="_blank">asteriskbrasil-unsubscribe@listas.asteriskbrasil.org</a></pre>
                                        </blockquote>
                                        <br>
                                      </div>
                                    </div>
                                  </div>
                                  <br>
_______________________________________________<br>
                                  KHOMP: completa linha de placas
                                  externas FXO, FXS, GSM e E1;<br>
                                  Media Gateways de 1 a 64 E1s para SIP
                                  com R2, ISDN e SS7;<br>
                                  Intercomunicadores para acesso remoto
                                  via rede IP. Conhe&ccedil;a em <a
                                    moz-do-not-send="true"
                                    href="http://www.Khomp.com"
                                    target="_blank">www.Khomp.com</a>.<br>
_______________________________________________<br>
                                  ALIGERA &#8211; Fabricante nacional de
                                  Gateways SIP-E1 para R2, ISDN e SS7.<br>
                                  Placas de 1E1, 2E1, 4E1 e 8E1 para PCI
                                  ou PCI Express.<br>
                                  Channel Bank &#8211; Appliance Asterisk -
                                  Acesse <a moz-do-not-send="true"
                                    href="http://www.aligera.com.br"
                                    target="_blank">www.aligera.com.br</a>.<br>
_______________________________________________<br>
                                  Para remover seu email desta lista,
                                  basta enviar um email em branco para <a
                                    moz-do-not-send="true"
                                    href="mailto:asteriskbrasil-unsubscribe@listas.asteriskbrasil.org"
                                    target="_blank">asteriskbrasil-unsubscribe@listas.asteriskbrasil.org</a><br>
                                </blockquote>
                              </div>
                            </div>
                          </div>
                          <span><font color="#888888">
                              <br>
                              <br clear="all">
                              <div><br>
                              </div>
                              -- <br>
                              <div dir="ltr"><b><font color="#0000ff">att</font></b>
                                <div><b><font color="#0000ff">Danilo
                                      Almeida</font></b></div>
                              </div>
                            </font></span></div>
                      </div>
                      <br>
                      _______________________________________________<br>
                      KHOMP: completa linha de placas externas FXO, FXS,
                      GSM e E1;<br>
                      Media Gateways de 1 a 64 E1s para SIP com R2, ISDN
                      e SS7;<br>
                      Intercomunicadores para acesso remoto via rede IP.
                      Conhe&ccedil;a em <a moz-do-not-send="true"
                        href="http://www.Khomp.com" target="_blank">www.Khomp.com</a>.<br>
                      _______________________________________________<br>
                      ALIGERA &#8211; Fabricante nacional de Gateways SIP-E1
                      para R2, ISDN e SS7.<br>
                      Placas de 1E1, 2E1, 4E1 e 8E1 para PCI ou PCI
                      Express.<br>
                      Channel Bank &#8211; Appliance Asterisk - Acesse <a
                        moz-do-not-send="true"
                        href="http://www.aligera.com.br" target="_blank">www.aligera.com.br</a>.<br>
                      _______________________________________________<br>
                      Para remover seu email desta lista, basta enviar
                      um email em branco para <a moz-do-not-send="true"
href="mailto:asteriskbrasil-unsubscribe@listas.asteriskbrasil.org"
                        target="_blank">asteriskbrasil-unsubscribe@listas.asteriskbrasil.org</a><br>
                    </blockquote>
                  </div>
                </div>
              </div>
              <br>
            </div>
            <br>
            _______________________________________________<br>
            KHOMP: completa linha de placas externas FXO, FXS, GSM e E1;<br>
            Media Gateways de 1 a 64 E1s para SIP com R2, ISDN e SS7;<br>
            Intercomunicadores para acesso remoto via rede IP. Conhe&ccedil;a
            em <a moz-do-not-send="true" href="http://www.Khomp.com"
              target="_blank">www.Khomp.com</a>.<br>
            _______________________________________________<br>
            ALIGERA &#8211; Fabricante nacional de Gateways SIP-E1 para R2,
            ISDN e SS7.<br>
            Placas de 1E1, 2E1, 4E1 e 8E1 para PCI ou PCI Express.<br>
            Channel Bank &#8211; Appliance Asterisk - Acesse <a
              moz-do-not-send="true" href="http://www.aligera.com.br"
              target="_blank">www.aligera.com.br</a>.<br>
            _______________________________________________<br>
            Para remover seu email desta lista, basta enviar um email em
            branco para <a moz-do-not-send="true"
              href="mailto:asteriskbrasil-unsubscribe@listas.asteriskbrasil.org">asteriskbrasil-unsubscribe@listas.asteriskbrasil.org</a><br>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <div><br>
        </div>
        -- <br>
        <div dir="ltr"><b style="background-color:rgb(255,255,255)"><font
              color="#0000ff">att</font></b>
          <div><b style="background-color:rgb(255,255,255)"><font
                color="#0000ff">Danilo Almeida</font></b></div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
KHOMP: completa linha de placas externas FXO, FXS, GSM e E1;
Media Gateways de 1 a 64 E1s para SIP com R2, ISDN e SS7;
Intercomunicadores para acesso remoto via rede IP. Conhe&ccedil;a em <a class="moz-txt-link-abbreviated" href="http://www.Khomp.com">www.Khomp.com</a>.
_______________________________________________
ALIGERA &#8211; Fabricante nacional de Gateways SIP-E1 para R2, ISDN e SS7.
Placas de 1E1, 2E1, 4E1 e 8E1 para PCI ou PCI Express.
Channel Bank &#8211; Appliance Asterisk - Acesse <a class="moz-txt-link-abbreviated" href="http://www.aligera.com.br">www.aligera.com.br</a>.
_______________________________________________
Para remover seu email desta lista, basta enviar um email em branco para <a class="moz-txt-link-abbreviated" href="mailto:asteriskbrasil-unsubscribe@listas.asteriskbrasil.org">asteriskbrasil-unsubscribe@listas.asteriskbrasil.org</a></pre>
    </blockquote>
    <br>
  </body>
</html>