<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hudson,<br>
    <br>
    Farei uns testes com sua sugest&atilde;o.<br>
    <br>
    J&aacute; Sylvio realmente n&atilde;o entendi a sua coloca&ccedil;&atilde;o. Por exemplo eu
    gravo o uniqueid da liga&ccedil;&atilde;o sainte, at&eacute; aqui beleza. Depois que &eacute;
    aberto outro canal e feita a transfer&ecirc;ncia onde eu pego que esse
    uniqueid foi "transferido" para o outro?<br>
    <br>
    Valeu,<br>
    Patrick<br>
    <br>
    <div class="moz-cite-prefix">Em 26-10-2012 22:58, Hudson Cardoso
      escreveu:<br>
    </div>
    <blockquote cite="mid:SNT142-W2814A9B1647F2C30FD6D3FA37D0@phx.gbl"
      type="cite">
      <style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
      <div dir="ltr">
        <font style="font-size:12pt;" size="3" face="Arial">&nbsp; &nbsp;Existem
          dois campos chamados userfield, onde voce determina o que
          quiser, e uniqueid, que</font>
        <div><font style="font-size:12pt;" size="3" face="Arial">&eacute; uma
            identificacao de cada chamada.</font></div>
        <div><font style="font-size:12pt;" size="3" face="Arial">existe
            tambem a possibilidade de se usar a opcao "L" e "l", no
            parametro de cdr, mas ainda n&atilde;o</font></div>
        <div><font style="font-size:12pt;" size="3" face="Arial">descobri
            direito como funciona .</font></div>
        <div><font style="font-size:12pt;" size="3" face="Arial">tente
            fazer da seguinte maneira :</font></div>
        <div><font style="font-size:12pt;" size="3" face="Arial"><br>
          </font></div>
        <div><font style="font-size:12pt;" size="3" face="Arial"><br>
          </font></div>
        <div><font style="font-size:12pt;" size="3" face="Arial">{</font></div>
        <div><font style="font-size:12pt;" size="3" face="Arial">X.
            =&gt; CDR(</font><span style="font-family: Arial; font-size:
            16px; ">userfield,{$[callerid[NUM]-$EXTEN]}</span><span
            style="font-size: 12pt; font-family: Arial; ">);</span></div>
        <div><span style="font-size: 12pt; font-family: Arial; ">}</span></div>
        <div><span style="font-size: 12pt; font-family: Arial; ">dessa
            forma, voce pode usar o&nbsp;</span><span style="font-family:
            Arial; font-size: 16px; ">userfield como se fosse o numero
            de calculo para</span></div>
        <div><span style="font-family: Arial; font-size: 16px; ">origem-destino,
            somando o tempo da ligacao.</span></div>
        <div><span style="font-family: Arial; font-size: 16px; ">ou</span></div>
        <div>
          <div><font style="font-size: 12pt; " size="3" face="Arial">{</font></div>
          <div><font style="font-size: 12pt; " size="3" face="Arial">X.
              =&gt; CDR(</font><span style="font-family: Arial;
              font-size: 16px; ">userfield,{$[c&oacute;digo de conta do
              usuario]}</span><span style="font-size: 12pt; font-family:
              Arial; ">);</span></div>
          <div><span style="font-size: 12pt; font-family: Arial; ">}</span></div>
        </div>
        <div><span style="font-size: 12pt; font-family: Arial; ">Dessa
            forma, o codigo seria seu ponto de partida da soma final.</span></div>
        <div><br>
          <br>
          <pre style="line-height:17px;white-space:normal;color:rgb(42, 42, 42);background-color:rgb(255, 255, 255)">Hudson&nbsp;
(048) 8413-7000
Para quem nao cre, nenhuma prova converte,Para aquele que cre, nenhuma prova precisa.&nbsp;</pre>
          <br>
          <br>
          <div>
            <hr id="stopSpelling">From: <a class="moz-txt-link-abbreviated" href="mailto:rodrigo@sertori.com.br">rodrigo@sertori.com.br</a><br>
            Date: Fri, 26 Oct 2012 22:24:57 -0200<br>
            To: <a class="moz-txt-link-abbreviated" href="mailto:asteriskbrasil@listas.asteriskbrasil.org">asteriskbrasil@listas.asteriskbrasil.org</a><br>
            Subject: Re: [AsteriskBrasil] cdr - ajuda<br>
            <br>
            O que o pessoal disse seria uma forma interessante.... eu s&oacute;
            n&atilde;o usaria o UPDATE para isso...&nbsp;
            <div>Criaria uma tabela com chave dupla e usaria INSERT.
              Depois vc calcula o valor usando SUM e GROUP BY.... Por&eacute;m
              n&atilde;o me lembro como fazer isso certinho no *.. faz tempo q
              n&atilde;o mexo... mas o principio &eacute; esse mesmo..</div>
            <div><br>
              <br>
              Att,<br>
              <br>
              Rodrigo Sertori<br>
              <b><span style="font-size:x-small">Consultor Oracle
                  Weblogic</span></b><br>
              <br>
              <br>
              <div class="ecxgmail_quote">2012/10/26 Sylvio Jollenbeck <span
                  dir="ltr">&lt;<a moz-do-not-send="true"
                    href="mailto:sylvio.jollenbeck@gmail.com">sylvio.jollenbeck@gmail.com</a>&gt;</span><br>
                <blockquote class="ecxgmail_quote"
                  style="border-left:1px #ccc solid;padding-left:1ex">
                  Correto!<br>
                  Por&eacute;m no momento da transfer&ecirc;ncia a perna da chamada
                  ainda cont&iacute;nua a mesma, certo!<br>
                  Ou seja o uid da chamada cont&iacute;nua o mesmo at&eacute; q ocorra
                  a transfer&ecirc;ncia, sabendo disso qual &eacute; o medo?<br>
                  Marcando a primeira perna e o momento da transfer&ecirc;ncia
                  vcs tem tdo o q precisa,<br>
                  Good Lucky <br>
                  <br>
                  <div class="ecxgmail_quote">Em 26/10/2012 18:16,
                    "Patrick EL Youssef" &lt;<a moz-do-not-send="true"
                      href="mailto:wushumasters@gmail.com">wushumasters@gmail.com</a>&gt;
                    escreveu:
                    <div>
                      <div class="h5"><br>
                        <blockquote class="ecxgmail_quote"
                          style="border-left:1px #ccc
                          solid;padding-left:1ex">
                          <div> Realmente n&atilde;o entendi.<br>
                            <br>
                            Eu registro a liga&ccedil;&atilde;o sainte no banco, mas
                            quando o cliente aperta FLASH &eacute; aberto outro
                            canal e gerado outro uniqueid e fico sem
                            saber que foi uma transfer&ecirc;ncia<br>
                            <br>
                            Posso estar seguindo uma linha errada.<br>
                            <br>
                            Patrick<br>
                            <br>
                            <div>Em 26-10-2012 14:05, Rodrigo Lang
                              escreveu:<br>
                            </div>
                            <blockquote>Como o Sylvio sugeriu, voc&ecirc; pode
                              adicionar uma gatilho e gerar um novo
                              registro somando os dois da transfer&ecirc;ncia,
                              que podem ser identificado com uma flag
                              atrav&eacute;s do pr&oacute;prio dialplan.
                              <div><br>
                              </div>
                              <div><br>
                              </div>
                              <div>At,</div>
                              <div>Rodrigo Lang.<br>
                                <br>
                                <div class="ecxgmail_quote">Em 26 de
                                  outubro de 2012 13:59, Sylvio
                                  Jollenbeck <span dir="ltr">&lt;<a
                                      moz-do-not-send="true"
                                      href="mailto:sylvio.jollenbeck@gmail.com">sylvio.jollenbeck@gmail.com</a>&gt;</span>
                                  escreveu:<br>
                                  <blockquote class="ecxgmail_quote"
                                    style="border-left:1px #ccc
                                    solid;padding-left:1ex">Patrick,<br>
                                    Uma forma &eacute; voce registrar a chamada
                                    sainte em uma tabela no banco de
                                    dados e quando houver a
                                    transferencia, voce faz o update
                                    nesse tabela. Dessa forma voc&ecirc;
                                    consegue resolver seu problema.<br>
                                    Abs<br>
                                    Sylvio Jollenbeck<br>
                                    <br>
                                    <br>
                                    <div class="ecxgmail_quote">Em 26 de
                                      outubro de 2012 12:08, Patrick EL
                                      Youssef <span dir="ltr">&lt;<a
                                          moz-do-not-send="true"
                                          href="mailto:wushumasters@gmail.com">wushumasters@gmail.com</a>&gt;</span>
                                      escreveu:
                                      <div>
                                        <div> <br>
                                          <blockquote
                                            class="ecxgmail_quote"
                                            style="border-left:1px #ccc
                                            solid;padding-left:1ex">
                                            Pessoal,<br>
                                            <br>
                                            Estou com o seguinte
                                            problema e gostaria de saber
                                            se algu&eacute;m j&aacute; conseguiu<br>
                                            resolver<br>
                                            <br>
                                            Quando fa&ccedil;o uma chamada
                                            sainte &eacute; gerado um registro
                                            no cdr com X segundos<br>
                                            Ap&oacute;s transferir esta chamada
                                            &eacute; gerado outro bilhete com Y
                                            segundos<br>
                                            <br>
                                            O problema &eacute; que eu
                                            precisava do tempo total X +
                                            Y e at&eacute; agora n&atilde;o<br>
                                            consegui entender como fa&ccedil;o
                                            isso.<br>
                                            <br>
                                            Lembrando que no caso eu
                                            fa&ccedil;o a transfer&ecirc;ncia
                                            assistida do pr&oacute;prio ata<br>
                                            ou ip phone .<br>
                                            <br>
                                            Grato,<br>
                                            Patrick<br>
_______________________________________________<br>
                                            KHOMP Inova&ccedil;&atilde;o: External
                                            Board Series<br>
                                            M&oacute;dulos de 1/2 rack e 1U
                                            para todas as interfaces e
                                            solu&ccedil;&otilde;es Asterisk e
                                            FreeSWITCH.<br>
                                            Tenha a External Series
                                            Experience na sua aplica&ccedil;&atilde;o.
                                            Visite <a
                                              moz-do-not-send="true"
                                              href="http://www.khomp.com"
                                              target="_blank">www.khomp.com</a><br>
_______________________________________________<br>
                                            DIGIVOICE &nbsp;Fabricante de
                                            Placas de Voz e Channel Bank<br>
                                            20 anos de experi&ecirc;ncia com
                                            E1(R2/ISDN), FXS, FXO e GSM<br>
                                            Centro Treinamento - Curso
                                            de PABX IP - &nbsp;Asterisk &nbsp;-
                                            Site &nbsp;<a
                                              moz-do-not-send="true"
                                              href="http://www.digivoice.com.br"
                                              target="_blank">www.digivoice.com.br</a><br>
                                            ________<br>
                                            YEALINK: Telefones IP e
                                            V&iacute;deoPhones IP com o melhor
                                            custo/benef&iacute;cio do mercado.<br>
                                            email: <a
                                              moz-do-not-send="true"
                                              href="mailto:yealink@commlogik.com.br">yealink@commlogik.com.br</a>
                                            | <a moz-do-not-send="true"
href="http://www.commlogik.com.br" target="_blank">www.commlogik.com.br</a>
                                            | (11) 5503-1011<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>
                                      </div>
                                    </div>
                                    <br>
                                    <br>
_______________________________________________<br>
                                    KHOMP Inova&ccedil;&atilde;o: External Board
                                    Series<br>
                                    M&oacute;dulos de 1/2 rack e 1U para todas
                                    as interfaces e solu&ccedil;&otilde;es Asterisk e
                                    FreeSWITCH.<br>
                                    Tenha a External Series Experience
                                    na sua aplica&ccedil;&atilde;o. Visite <a
                                      moz-do-not-send="true"
                                      href="http://www.khomp.com"
                                      target="_blank">www.khomp.com</a><br>
_______________________________________________<br>
                                    DIGIVOICE &nbsp;Fabricante de Placas de
                                    Voz e Channel Bank<br>
                                    20 anos de experi&ecirc;ncia com
                                    E1(R2/ISDN), FXS, FXO e GSM<br>
                                    Centro Treinamento - Curso de PABX
                                    IP - &nbsp;Asterisk &nbsp;- Site &nbsp;<a
                                      moz-do-not-send="true"
                                      href="http://www.digivoice.com.br"
                                      target="_blank">www.digivoice.com.br</a><br>
                                    ________<br>
                                    YEALINK: Telefones IP e V&iacute;deoPhones
                                    IP com o melhor custo/benef&iacute;cio do
                                    mercado.<br>
                                    email: <a moz-do-not-send="true"
                                      href="mailto:yealink@commlogik.com.br">yealink@commlogik.com.br</a>
                                    | <a moz-do-not-send="true"
                                      href="http://www.commlogik.com.br"
                                      target="_blank">www.commlogik.com.br</a>
                                    | (11) 5503-1011<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>
                                Rodrigo Lang<br>
                                <br>
                              </div>
                              <br>
                              <fieldset></fieldset>
                              <br>
                              <pre>_______________________________________________
KHOMP Inova&ccedil;&atilde;o: External Board Series
M&oacute;dulos de 1/2 rack e 1U para todas as interfaces e solu&ccedil;&otilde;es Asterisk e FreeSWITCH.
Tenha a External Series Experience na sua aplica&ccedil;&atilde;o. Visite <a moz-do-not-send="true" href="http://www.khomp.com" target="_blank">www.khomp.com</a>
_______________________________________________
DIGIVOICE  Fabricante de Placas de Voz e Channel Bank
20 anos de experi&ecirc;ncia com E1(R2/ISDN), FXS, FXO e GSM
Centro Treinamento - Curso de PABX IP -  Asterisk  - Site  <a moz-do-not-send="true" href="http://www.digivoice.com.br" target="_blank">www.digivoice.com.br</a>
________
YEALINK: Telefones IP e V&iacute;deoPhones IP com o melhor custo/benef&iacute;cio do mercado.
email: <a moz-do-not-send="true" href="mailto:yealink@commlogik.com.br">yealink@commlogik.com.br</a> | <a moz-do-not-send="true" href="http://www.commlogik.com.br" target="_blank">www.commlogik.com.br</a> | (11) 5503-1011
______________________________________________
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></pre>
                            </blockquote>
                            <br>
                          </div>
                          <br>
_______________________________________________<br>
                          KHOMP Inova&ccedil;&atilde;o: External Board Series<br>
                          M&oacute;dulos de 1/2 rack e 1U para todas as
                          interfaces e solu&ccedil;&otilde;es Asterisk e FreeSWITCH.<br>
                          Tenha a External Series Experience na sua
                          aplica&ccedil;&atilde;o. Visite <a moz-do-not-send="true"
                            href="http://www.khomp.com" target="_blank">www.khomp.com</a><br>
_______________________________________________<br>
                          DIGIVOICE &nbsp;Fabricante de Placas de Voz e
                          Channel Bank<br>
                          20 anos de experi&ecirc;ncia com E1(R2/ISDN), FXS,
                          FXO e GSM<br>
                          Centro Treinamento - Curso de PABX IP -
                          &nbsp;Asterisk &nbsp;- Site &nbsp;<a moz-do-not-send="true"
                            href="http://www.digivoice.com.br"
                            target="_blank">www.digivoice.com.br</a><br>
                          ________<br>
                          YEALINK: Telefones IP e V&iacute;deoPhones IP com o
                          melhor custo/benef&iacute;cio do mercado.<br>
                          email: <a moz-do-not-send="true"
                            href="mailto:yealink@commlogik.com.br">yealink@commlogik.com.br</a>
                          | <a moz-do-not-send="true"
                            href="http://www.commlogik.com.br"
                            target="_blank">www.commlogik.com.br</a> |
                          (11) 5503-1011<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>
                    </div>
                  </div>
                  <br>
                  _______________________________________________<br>
                  KHOMP Inova&ccedil;&atilde;o: External Board Series<br>
                  M&oacute;dulos de 1/2 rack e 1U para todas as interfaces e
                  solu&ccedil;&otilde;es Asterisk e FreeSWITCH.<br>
                  Tenha a External Series Experience na sua aplica&ccedil;&atilde;o.
                  Visite <a moz-do-not-send="true"
                    href="http://www.khomp.com" target="_blank">www.khomp.com</a><br>
                  _______________________________________________<br>
                  DIGIVOICE &nbsp;Fabricante de Placas de Voz e Channel Bank<br>
                  20 anos de experi&ecirc;ncia com E1(R2/ISDN), FXS, FXO e GSM<br>
                  Centro Treinamento - Curso de PABX IP - &nbsp;Asterisk &nbsp;-
                  Site &nbsp;<a moz-do-not-send="true"
                    href="http://www.digivoice.com.br" target="_blank">www.digivoice.com.br</a><br>
                  ________<br>
                  YEALINK: Telefones IP e V&iacute;deoPhones IP com o melhor
                  custo/benef&iacute;cio do mercado.<br>
                  email: <a moz-do-not-send="true"
                    href="mailto:yealink@commlogik.com.br">yealink@commlogik.com.br</a>
                  | <a moz-do-not-send="true"
                    href="http://www.commlogik.com.br" target="_blank">www.commlogik.com.br</a>
                  | (11) 5503-1011<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>
            </div>
            <br>
            _______________________________________________
            KHOMP Inova&#65533;&#65533;o: External Board Series
            M&#65533;dulos de 1/2 rack e 1U para todas as interfaces e solu&#65533;&#65533;es
            Asterisk e FreeSWITCH.
            Tenha a External Series Experience na sua aplica&#65533;&#65533;o. Visite
            <a class="moz-txt-link-abbreviated" href="http://www.khomp.com">www.khomp.com</a>
            _______________________________________________
            DIGIVOICE Fabricante de Placas de Voz e Channel Bank
            20 anos de experi&#65533;ncia com E1(R2/ISDN), FXS, FXO e GSM
            Centro Treinamento - Curso de PABX IP - Asterisk - Site
            <a class="moz-txt-link-abbreviated" href="http://www.digivoice.com.br">www.digivoice.com.br</a>
            ________
            YEALINK: Telefones IP e V&#65533;deoPhones IP com o melhor
            custo/benef&#65533;cio do mercado.
            email: <a class="moz-txt-link-abbreviated" href="mailto:yealink@commlogik.com.br">yealink@commlogik.com.br</a> | <a class="moz-txt-link-abbreviated" href="http://www.commlogik.com.br">www.commlogik.com.br</a> |
            (11) 5503-1011
            ______________________________________________
            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></div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
KHOMP Inova&ccedil;&atilde;o: External Board Series
M&oacute;dulos de 1/2 rack e 1U para todas as interfaces e solu&ccedil;&otilde;es Asterisk e FreeSWITCH.
Tenha a External Series Experience na sua aplica&ccedil;&atilde;o. Visite <a class="moz-txt-link-abbreviated" href="http://www.khomp.com">www.khomp.com</a>
_______________________________________________
DIGIVOICE  Fabricante de Placas de Voz e Channel Bank
20 anos de experi&ecirc;ncia com E1(R2/ISDN), FXS, FXO e GSM
Centro Treinamento - Curso de PABX IP -  Asterisk  - Site  <a class="moz-txt-link-abbreviated" href="http://www.digivoice.com.br">www.digivoice.com.br</a>
________
YEALINK: Telefones IP e V&iacute;deoPhones IP com o melhor custo/benef&iacute;cio do mercado.
email: <a class="moz-txt-link-abbreviated" href="mailto:yealink@commlogik.com.br">yealink@commlogik.com.br</a> | <a class="moz-txt-link-abbreviated" href="http://www.commlogik.com.br">www.commlogik.com.br</a> | (11) 5503-1011
______________________________________________
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>