<div dir="ltr"><div>Tranquilo. Conseguindo obter sucesso eu aviso.<br><br></div>Att,<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">Em 17 de dezembro de 2013 15:40, jefaokpta <span dir="ltr">&lt;<a href="mailto:jefaokpta@hotmail.com" target="_blank">jefaokpta@hotmail.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 text="#000000" bgcolor="#FFFFFF">
    <div>Desculpe amigo, não conheço o asternic.<br>
      <br>
      Boa sorte ae.<br>
      <br>
      Flws<br>
      <br>
      Em 17-12-2013 15:19, Alex Sander escreveu:<br>
    </div><div><div class="h5">
    <blockquote type="cite">
      <div dir="ltr">
        <div>Jefao<br>
          <br>
          Acho que não é isso ou eu entendi errado, até porque estou
          apagando a referência no AstDB pela própria action do AMI.
          Quero apenas recuperar, no momento que a chamada é atendida, o
          CallID, tal como aparece no display do aparelho.<br>
          <br>
          Abri o código do Asternic, mas percebi que os dados na aba
          realtime são recuperados do banco. Vou continuar estudando uma
          forma sem precisar jogar em realtime, se tiver alguma outra
          idéia.<br>
          <br>
        </div>
        Te agradeço muita a ajuda que tem me dado.<br>
        <br>
        Att,<br>
      </div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">Em 17 de dezembro de 2013 14:09,
          jefaokpta <span dir="ltr">&lt;<a href="mailto:jefaokpta@hotmail.com" target="_blank">jefaokpta@hotmail.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 text="#000000" bgcolor="#FFFFFF">
              <div>Ok, acho q agora ficou mais fácil, pq vc pode
                executar uma macro qnd o agente atender, seguinte:<br>
                <br>
                Se vc estiver usando ast* 1.6 em diante, vc tem uma
                opção na app queue de executar uma macro qnd algum
                agente atender. Daí vc passa como parâmetro o CALLERID p
                macro.<br>
                <br>
                Ex:<br>
                crie a macro q pegue o dado do astDB<br>
                [macro-getAstDB]<br>
                exten=&gt; s,1,Set(BLA=${DB_DELETE(CANAL/${ARG1})})<br>
                <br>
                na hora d jogar a ligação p fila...<br>
                exten=&gt; ...<br>
                exten =&gt;
                ...,Queue(nome-fila,,,,60,,getAstDB^${CALLERID(num)}) <br>
                <br>
                qnd algum agente atender, antes de estender a ligação,
                esta macro será executada.<br>
                <br>
                Obs. Verifique direitinho a posição do parametro macro
                na app queue.<br>
                <br>
                Flws<br>
                <br>
                <br>
                Em 17-12-2013 13:32, Alex Sander escreveu:<br>
              </div>
              <div>
                <div>
                  <blockquote type="cite">
                    <div dir="ltr">
                      <div>
                        <div>Jefao,<br>
                          <br>
                        </div>
                        Beleza, criei uma familia com o nome de Canal e
                        uma chave com o Callerid que armazena o canal.
                        Tá funcionando bem e consigo recuperar o ID do
                        canal e as variaveis dele. Mas tem outro
                        problema que não estou conseguindo solucionar.
                        Tenho uma agente num ramal logado numa fila.
                        Como recupero via AMI o Callerid(num) quando o
                        agente ou o ramal atende a chamada? Pois quando
                        uso o dbGet, preciso do CallerID(num) para
                        recuperar as informações do AstDB.<br>
                        <br>
                      </div>
                      Att,<br>
                    </div>
                    <div class="gmail_extra"><br>
                      <br>
                      <div class="gmail_quote">Em 13 de dezembro de 2013
                        14:32, Alex Sander <span dir="ltr">&lt;<a href="mailto:sanderdabio@globo.com" target="_blank">sanderdabio@globo.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">Valeu Jefao...<br>
                            <div><br>
                              Vou testar aqui e falo.<br>
                              <br>
                            </div>
                            <div>Vlw<br>
                            </div>
                          </div>
                          <div class="gmail_extra"> <br>
                            <br>
                            <div class="gmail_quote">Em 13 de dezembro
                              de 2013 13:21, jefaokpta <span dir="ltr">&lt;<a href="mailto:jefaokpta@hotmail.com" target="_blank">jefaokpta@hotmail.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 text="#000000" bgcolor="#FFFFFF">
                                      <div>Vamos lá então.<br>
                                        <br>
                                        Qnd vc manda a ligação p fila vc
                                        tem um unico dado q remete a
                                        ligação q passou pela URA, o
                                        CALLERID(num). (Estou falando do
                                        canal local q a app queue cria p
                                        chamar o operador).<br>
                                        <br>
                                        Podemos usar esse callerid como
                                        identificador.<br>
                                        <br>
                                        Vc pode ao criar o ID, deixa-lo
                                        no AstDB<br>
                                        <br>
                                        Na hora de chamar o operador vc
                                        resgata e apaga a info do AstDB.<br>
                                        <br>
                                        Entendeu?<br>
                                        <br>
                                        Obs. vc estava certo ao dizer
                                        &quot;Mas pode ser que eu tenha me
                                        expressado mal&quot; <br>
                                        <br>
                                        Flws<br>
                                        <br>
                                        <br>
                                        <br>
                                        Em 13-12-2013 12:04, Alex Sander
                                        escreveu:<br>
                                      </div>
                                      <blockquote type="cite">
                                        <div>
                                          <div>
                                            <div dir="ltr">
                                              <div>
                                                <div>
                                                  <div>Pessoal, boa
                                                    tarde!<br>
                                                    <br>
                                                    Sei que quando
                                                    ninguém responde é
                                                    porque provavelmente
                                                    não passaram por um
                                                    problema parecido.<br>
                                                    <br>
                                                  </div>
                                                  Mas pode ser que eu
                                                  tenha me expressado
                                                  mal. Por isso gostaria
                                                  de reforçar o pedido.
                                                  Quero apenas recuperar
                                                  as variáveis do canal
                                                  que for atendido por
                                                  um ramal. Como o ID do
                                                  canal varia
                                                  dinâmicamente, não
                                                  consigo recuperar
                                                  automaticamente.<br>
                                                  <br>
                                                </div>
                                                Por exemplo, quero popar
                                                na tela do operador o
                                                ANI e o Protocolo que
                                                defini antes na URA.<br>
                                                <br>
                                              </div>
                                              Me ajudem nessa aí.<br>
                                              <br>
                                              Att,<br>
                                            </div>
                                            <div class="gmail_extra"><br>
                                              <br>
                                              <div class="gmail_quote">Em
                                                12 de dezembro de 2013
                                                11:57, Alex Sander <span dir="ltr">&lt;<a href="mailto:sanderdabio@globo.com" target="_blank">sanderdabio@globo.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>
                                                        <div>
                                                          <div>
                                                          <div>
                                                          <div>Pessoal,<br>
                                                          <br>
                                                          Desenvolvi uma
                                                          URA em AGI que
                                                          vocaliza um
                                                          número de
                                                          protocolo. Daí
                                                          eu defini uma
                                                          variavel de
                                                          Canal para
                                                          armazenar o
                                                          valor desta
                                                          variável.<br>
                                                          <br>
                                                          </div>
                                                          Só que na
                                                          integração com
                                                          a aplicação
                                                          utilizando AMI
                                                          não consigo
                                                          recuperar o
                                                          canal que o
                                                          ramal
                                                          respondeu a
                                                          chamada, não
                                                          estou sabendo
                                                          como fazer
                                                          isso.<br>
                                                          <br>
                                                          </div>
                                                          No ambiente de
                                                          testes o
                                                          chamador é
                                                          SIP/2001 e o
                                                          chamado na
                                                          fila é
                                                          SIP/2000. Num
                                                          dos testes os
                                                          dois canais
                                                          abertos foram:<br>
                                                          <br>
                                                          SIP/2001-0000001d:
                                                          Onde estão as
                                                          variáveis do
                                                          chamador que
                                                          quero
                                                          recuperar<br>
                                                          <br>
                                                          SIP/2001-0000001e:
                                                          Ramal onde
                                                          quero
                                                          monitorar os
                                                          eventos<br>
                                                          <br>
                                                          </div>
                                                          Utilizo o
                                                          PHPAGI. Quando
                                                          copio o canal
                                                          para o método,
                                                          consigo
                                                          recuperar as
                                                          variáveis
                                                          corretamente.
                                                          EX: $Protocolo
                                                          =
                                                          $ami-&gt;GetVar(&quot;SIP/2001-0000001d&quot;,&quot;protocolo&quot;);<br>
                                                          <br>
                                                        </div>
                                                        Mas o que eu
                                                        quero é
                                                        recuperar o
                                                        canal de forma
                                                        automática
                                                        dentro da
                                                        aplicação.<br>
                                                        <br>
                                                      </div>
                                                      Alguém poderia me
                                                      ajudar?<br>
                                                      <br>
                                                    </div>
                                                    Att,<br>
                                                    <br>
                                                    Alex <br>
                                                  </div>
                                                </blockquote>
                                              </div>
                                              <br>
                                            </div>
                                            <br>
                                            <fieldset></fieldset>
                                            <br>
                                          </div>
                                        </div>
                                        <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 e telefones IP
Conheça todo o portfólio em <a href="http://www.Khomp.com" target="_blank">www.Khomp.com</a>
_______________________________________________
Para remover seu email desta lista, basta enviar um email em branco para <a href="mailto:asteriskbrasil-unsubscribe@listas.asteriskbrasil.org" target="_blank">asteriskbrasil-unsubscribe@listas.asteriskbrasil.org</a></pre>

                                      </blockquote>
                                      <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 e telefones IP<br>
                                    Conheça todo o portfólio em <a href="http://www.Khomp.com" target="_blank">www.Khomp.com</a><br>
_______________________________________________<br>
                                    Para remover seu email desta lista,
                                    basta enviar um email em branco para
                                    <a href="mailto:asteriskbrasil-unsubscribe@listas.asteriskbrasil.org" target="_blank">asteriskbrasil-unsubscribe@listas.asteriskbrasil.org</a><br>
                                  </blockquote>
                                </div>
                              </div>
                            </div>
                            <br>
                          </div>
                        </blockquote>
                      </div>
                      <br>
                    </div>
                    <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 e telefones IP
Conheça todo o portfólio em <a href="http://www.Khomp.com" target="_blank">www.Khomp.com</a>
_______________________________________________
Para remover seu email desta lista, basta enviar um email em branco para <a 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 e
            telefones IP<br>
            Conheça todo o portfólio em <a href="http://www.Khomp.com" target="_blank">www.Khomp.com</a><br>
            _______________________________________________<br>
            Para remover seu email desta lista, basta enviar um email em
            branco para <a href="mailto:asteriskbrasil-unsubscribe@listas.asteriskbrasil.org" target="_blank">asteriskbrasil-unsubscribe@listas.asteriskbrasil.org</a><br>
          </blockquote>
        </div>
        <br>
      </div>
      <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 e telefones IP
Conheça todo o portfólio em <a href="http://www.Khomp.com" target="_blank">www.Khomp.com</a>
_______________________________________________
Para remover seu email desta lista, basta enviar um email em branco para <a 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 e telefones IP<br>
Conheça todo o portfólio em <a href="http://www.Khomp.com" target="_blank">www.Khomp.com</a><br>
_______________________________________________<br>
Para remover seu email desta lista, basta enviar um email em branco para <a href="mailto:asteriskbrasil-unsubscribe@listas.asteriskbrasil.org">asteriskbrasil-unsubscribe@listas.asteriskbrasil.org</a><br></blockquote></div>
<br></div>