<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Ok, acho q agora ficou mais f&aacute;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&ccedil;&atilde;o na app
      queue de executar uma macro qnd algum agente atender. Da&iacute; vc passa
      como par&acirc;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&ccedil;&atilde;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&ccedil;&atilde;o, esta macro
      ser&aacute; executada.<br>
      <br>
      Obs. Verifique direitinho a posi&ccedil;&atilde;o do parametro macro na app
      queue.<br>
      <br>
      Flws<br>
      <br>
      <br>
      Em 17-12-2013 13:32, Alex Sander escreveu:<br>
    </div>
    <blockquote
cite="mid:CALUZUtTTX0KLtd9ZjUs16+x=mJnV6X0dCqDQz1kFhcdfdTnpsA@mail.gmail.com"
      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&aacute; funcionando bem e consigo
          recuperar o ID do canal e as variaveis dele. Mas tem outro
          problema que n&atilde;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&ccedil;&otilde;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 moz-do-not-send="true"
              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 moz-do-not-send="true"
                    href="mailto:jefaokpta@hotmail.com" target="_blank">jefaokpta@hotmail.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 text="#000000" bgcolor="#FFFFFF">
                        <div>Vamos l&aacute; ent&atilde;o.<br>
                          <br>
                          Qnd vc manda a liga&ccedil;&atilde;o p fila vc tem um unico
                          dado q remete a liga&ccedil;&atilde;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 "Mas pode ser
                          que eu tenha me expressado mal" <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&eacute;m responde &eacute;
                                      porque provavelmente n&atilde;o passaram
                                      por um problema parecido.<br>
                                      <br>
                                    </div>
                                    Mas pode ser que eu tenha me
                                    expressado mal. Por isso gostaria de
                                    refor&ccedil;ar o pedido. Quero apenas
                                    recuperar as vari&aacute;veis do canal que
                                    for atendido por um ramal. Como o ID
                                    do canal varia din&acirc;micamente, n&atilde;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&iacute;.<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
                                      moz-do-not-send="true"
                                      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&uacute;mero de protocolo.
                                                  Da&iacute; eu defini uma
                                                  variavel de Canal para
                                                  armazenar o valor
                                                  desta vari&aacute;vel.<br>
                                                  <br>
                                                </div>
                                                S&oacute; que na integra&ccedil;&atilde;o com
                                                a aplica&ccedil;&atilde;o utilizando
                                                AMI n&atilde;o consigo
                                                recuperar o canal que o
                                                ramal respondeu a
                                                chamada, n&atilde;o estou
                                                sabendo como fazer isso.<br>
                                                <br>
                                              </div>
                                              No ambiente de testes o
                                              chamador &eacute; SIP/2001 e o
                                              chamado na fila &eacute;
                                              SIP/2000. Num dos testes
                                              os dois canais abertos
                                              foram:<br>
                                              <br>
                                              SIP/2001-0000001d: Onde
                                              est&atilde;o as vari&aacute;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&eacute;todo,
                                            consigo recuperar as
                                            vari&aacute;veis corretamente. EX:
                                            $Protocolo =
                                            $ami-&gt;GetVar("SIP/2001-0000001d","protocolo");<br>
                                            <br>
                                          </div>
                                          Mas o que eu quero &eacute; recuperar
                                          o canal de forma autom&aacute;tica
                                          dentro da aplica&ccedil;&atilde;o.<br>
                                          <br>
                                        </div>
                                        Algu&eacute;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&ccedil;a todo o portf&oacute;lio em <a moz-do-not-send="true" 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 moz-do-not-send="true" 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&ccedil;a todo o portf&oacute;lio em <a
                        moz-do-not-send="true"
                        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 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>
          </blockquote>
        </div>
        <br>
      </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 e telefones IP
Conhe&ccedil;a todo o portf&oacute;lio em <a class="moz-txt-link-abbreviated" href="http://www.Khomp.com">www.Khomp.com</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>