<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Voc&ecirc; pode usar um arquivo de texto com uma senha por linha<br>
    <br>
    e coloca a op&ccedil;&atilde;o "a" (se nao me engano) no autenticate e informar o
    arquivo.<br>
    <br>
    S&oacute; confirmar isso<br>
    <br>
    Patrick<br>
    <div class="moz-cite-prefix">Em 09-01-2013 16:34, <a class="moz-txt-link-abbreviated" href="mailto:joao@oxman.com.br">joao@oxman.com.br</a>
      escreveu:<br>
    </div>
    <blockquote cite="mid:53606422$3d7d68d9$4a6a37f4$@com" type="cite"><span
        style="font-family: Arial, Helvetica, sans-serif; font-size:
        10pt">Rodrigo, Boa Tarde,<br>
        <br>
        <br>
        <span class="Apple-tab-span" style="white-space: pre;"> </span>De
        certa forma funcionou, ,ais me da uma dica como cadastro uma
        maneira de ele ir verificar a senha sem setar n autenticate, vc
        conseguiu<br>
        <br>
        <br>
        qro cadastrar varias senha tem uma dica pra me ajudar por favor
        desde j&aacute; agrade&ccedil;o a sua dica&nbsp;<br>
        <br>
        <br>
        segue meu extensions como ficou setei com a senha 1234<br>
        <br>
        <br>
        [cadeado]<br>
        ;;;Ativa cadeado<br>
        exten =&gt; _*55,1,Answer()<br>
        exten =&gt; _*55,2,Wait(1)<br>
        exten =&gt; _*55,3,Set(Pass=${DB(Senha/${CALLERID(num)})})<br>
        exten =&gt; _*55,4,Authenticate(1234,d)<br>
        exten =&gt; _*55,5,Set(DB(Cadeado/${CALLERID(num)})=1)<br>
        exten =&gt; _*55,6,Playback(cadeado-ativo)<br>
        exten =&gt; _*55,7,Hangup()<br>
        ;;;Desativa cadeado<br>
        exten =&gt; _*56,1,Answer()<br>
        exten =&gt; _*56,2,Wait(1)<br>
        exten =&gt; _*56,3,Set(Pass=${DB(Senha/${CALLERID(num)})})<br>
        exten =&gt; _*56,4,Authenticate(1234,d)<br>
        exten =&gt; _*56,5,Set(DB(Cadeado/${CALLERID(num)})=0)<br>
        exten =&gt; _*56,6,Playback(cadeado-desativo)<br>
        exten =&gt; _*56,7,Hangup()<br>
        <div><br>
        </div>
        <br>
        <br>
        att,,<br>
        <br>
        <br>
        <br>
        <span style="font-size: 10pt; font-family: tahoma, arial,
          sans-serif;">
          <hr size="2" width="100%" align="center">
          <strong>De</strong>: "Rodrigo Lang"
          <a class="moz-txt-link-rfc2396E" href="mailto:rodrigoferreiralang@gmail.com">&lt;rodrigoferreiralang@gmail.com&gt;</a><br>
          <strong>Enviado</strong>: quarta-feira, 9 de janeiro de 2013
          15:50<br>
          <strong>Para</strong>:
          <a class="moz-txt-link-abbreviated" href="mailto:asteriskbrasil@listas.asteriskbrasil.org">asteriskbrasil@listas.asteriskbrasil.org</a><br>
          <strong>Assunto</strong>: Re: [AsteriskBrasil] Cadeado
          Eletronico</span><br>
        <br>
        <div dir="ltr">Cara, eu j&aacute; fiz um modelo bem mais simples
          utilizando a aplica&ccedil;&atilde;o authenticate(). Se quiser est&aacute; neste
          link [1]. O &eacute; bem simples, s&oacute; ativa no AstDB uma vari&aacute;vel
          bloqueando o ramal de fazer liga&ccedil;&otilde;es, n&atilde;o precisa de conex&atilde;o
          com banco nem nada...
          <div>
            <br>
          </div>
          <div>Se quiser usar eu posso tirar quaisquer d&uacute;vidas.<br>
            <div><br>
            </div>
            <div><br>
            </div>
            <div>[1]&nbsp;<a moz-do-not-send="true"
                href="https://gist.github.com/4495156">https://gist.github.com/4495156</a></div>
            <div><br>
            </div>
          </div>
        </div>
        <div class="gmail_extra">
          <br>
          <br>
          <div class="gmail_quote">Em 9 de janeiro de 2013 15:26, Rafael
            dos Santos Saraiva <span dir="ltr">&lt;<a
                moz-do-not-send="true"
                href="mailto:rafaelsnsa@gmail.com" target="_blank">rafaelsnsa@gmail.com</a>&gt;</span>
            escreveu:<br>
            <blockquote class="gmail_quote" style="margin: 0px 0px 0px
              0.8ex; border-left-width: 1px; border-left-color: #cccccc;
              border-left-style: solid; padding-left: 1ex;">
              Voc&ecirc; instalou o Mysql e o Asterisk est&aacute; com suporte para o
              Mysql?
              <div><br clear="all">
                <div>Att,
                  <div>Rafael Saraiva</div>
                  <div>
                    <div><a moz-do-not-send="true"
                        href="http://br.linkedin.com/pub/rafael-saraiva/52/aab/230"
                        target="_blank"><img moz-do-not-send="true"
                          alt=""></a><br>
                    </div>
                  </div>
                </div>
                <br>
                <br>
                <div class="gmail_quote">Em 9 de janeiro de 2013 15:18,
                  <a moz-do-not-send="true"
                    href="mailto:joao@oxman.com.br" target="_blank">joao@oxman.com.br</a>
                  <span dir="ltr">&lt;<a moz-do-not-send="true"
                      href="mailto:joao@oxman.com.br" target="_blank">joao@oxman.com.br</a>&gt;</span>
                  escreveu:<br>
                  <blockquote class="gmail_quote" style="margin: 0px 0px
                    0px 0.8ex; border-left-width: 1px;
                    border-left-color: #cccccc; border-left-style:
                    solid; padding-left: 1ex;">
                    <div>
                      <div class="h5"><span style="font-size: 10pt;
                          font-family: arial, helvetica, sans-serif;"><br>
                          <span style="font-family: arial, helvetica,
                            sans-serif;"><span style="font-size: 13px;">Boa
                              Tarde, aos Amigos&nbsp;</span>algu&eacute;m<span
                              style="font-size: 13px;">&nbsp;pode me ajudar
                              em um problema, estou tentando colocar
                              senha de bloqueio em um ramal e achei esse
                              link:</span><br>
                            <br>
                            <span style="font-size: 13px;">
                              <a moz-do-not-send="true"
href="http://listas.asteriskbrasil.org/pipermail/asteriskbrasil/2010-November/046574.html"
                                target="_blank">http://listas.asteriskbrasil.org/pipermail/asteriskbrasil/2010-November/046574.html</a>&nbsp;</span><br>
                            <br>
                            <span style="font-size: 13px;">
                              que segue o exten abaixo alguem j&aacute;
                              conseguiu fazer isso funcionar, ele pede a
                              senha mais depois entra senha incorreta e
                              desliga a chamada.</span><br>
                            <br>
                            <span style="font-size: 13px;">
                              Com *15 eu coloco a senha para bloquear o
                              ramal e *16 para desbloquear alguem j&aacute;
                              conseguiu algo igual</span><br>
                            <br>
                            <span style="font-size: 13px;">
                              desde j&aacute; agarde&ccedil;o a ajuda e aten&ccedil;&atilde;o</span><br>
                            <br>
                            <span style="font-size: 13px;">
                              segue</span><br>
                            <br>
                            <span style="font-size: 13px;">
                              [cadeado-ele]</span><br>
                            <span style="font-size: 13px;">
                              exten =&gt; _*15,1,Noop(BLOQUEANDO RAMAL:
                              ${CALLERID(num)}) ; APENAS PARA DEBUG</span><br>
                            <span style="font-size: 13px;">
                              exten =&gt; _*15,n,MYSQL(Connect connid
                              localhost asteriskuser password
                              **oxman1234) ; CONECTANDO NA BASE MYSQL</span><br>
                            <span style="font-size: 13px;">
                              exten =&gt; _*15,n,Playback(vm-password) ;
                              PLAYBACK PEDINDO A SENHA</span><br>
                            <span style="font-size: 13px;">
                              exten =&gt; _*15,n,Read(senha||4) ; LENDO
                              SENHA DE 4 DIGITOS</span><br>
                            <span style="font-size: 13px;">
                              exten =&gt; _*15,n,Noop(${senha}) ; APENAS
                              PARA DEBUG</span><br>
                            <span style="font-size: 13px;">
                              exten =&gt;
                              _*15,n,Noop(${DB(AMPUSER/${CALLERID(num)}/password)})
                              ; APENASPARA DEBUG</span><br>
                            <span style="font-size: 13px;">
                              exten =&gt; _*15,n,GotoIF($[${senha}
                              =${DB(AMPUSER/${CALLERID(num)}/password)}]?ok:notok)
                              ; SE A SENHA DE USUARIO AMP FOR IGUAL A
                              SENHA DIGITADA PELO USUARIO, VAI PRA
                              PRIORIDADE OK</span><br>
                            <span style="font-size: 13px;">
                              exten =&gt;
                              _*15,n(notok),Playback(vm-incorrect) ;
                              PLAYBACK INFORMANDO SENHA INCORRETA</span><br>
                            <span style="font-size: 13px;">
                              exten =&gt; _*15,n(notok),Hangup ;
                              DESLIGANDO</span><br>
                            <span style="font-size: 13px;">
                              exten =&gt; _*15,n(ok),MYSQL(Query
                              resultid ${connid} UPDATE sip
                              SETdata="cadeado-bloqueado" WHERE
                              id=${CALLERID(num)} AND keyword="context")
                              ;QUERY ATUALIZANDO TABELA</span><br>
                            <span style="font-size: 13px;">
                              exten =&gt;
                              _*15,n(ok),System(/var/lib/asterisk/bin/module_admin
                              reload) ;REINICIANDO AMP</span><br>
                            <span style="font-size: 13px;">
                              exten =&gt; _*15,n(ok),Playback(vm-saved)
                              ; PLAYBACK INFORMANDO OK</span><br>
                            <span style="font-size: 13px;">
                              exten =&gt; _*15,n(ok),MYSQL(Disconnect
                              ${connid}) ; DESCONECTANDO A SESSAO COM O
                              MYSQL</span><br>
                            <span style="font-size: 13px;">
                              exten =&gt; _*15,n(ok),Hangup ; DESLIGANDO</span><br>
                            <span style="font-size: 13px;">
                              ; NA EXTEN 98 EXECUTAMOS UM UPDATE DENTRO
                              DA TABELA SIP, MUDANDO O CONTEXTOPARA O
                              CONTEXTO ORIGINAL ; USANDO UMA TABELA
                              AUXILIAR</span><br>
                            <span style="font-size: 13px;">
                              &nbsp;exten =&gt; _*16,1,Noop(DESBLOQUEANDO
                              RAMAL: ${CALLERID(num)}) ; APENAS PARA
                              DEBUG</span><br>
                            <span style="font-size: 13px;">
                              &nbsp;exten =&gt; _*16,n,MYSQL(Connect connid
                              localhost asteriskuser password
                              **oxman1234) ; CONECTANDO NA BASE MYSQL</span><br>
                            <span style="font-size: 13px;">
                              &nbsp;exten =&gt; _*16,n,Playback(vm-password)
                              ; PLAYBACK PEDINDO A SENHA</span><br>
                            <span style="font-size: 13px;">
                              &nbsp;exten =&gt; _*16,n,Read(senha||4) ; LENDO
                              SENHA DE 4 DIGITOS</span><br>
                            <span style="font-size: 13px;">
                              &nbsp;exten =&gt; _*16,n,Noop(${senha}) ;
                              APENAS PARA DEBUG</span><br>
                            <span style="font-size: 13px;">
                              &nbsp;exten =&gt;
                              _*16,n,Noop(${DB(AMPUSER/${CALLERID(num)}/password)})
                              ; APENAS PARA DEBUG</span><br>
                            <span style="font-size: 13px;">
                              &nbsp;exten =&gt; _*16,n,GotoIF($[${senha}
                              =${DB(AMPUSER/${CALLERID(num)}/password)}]?ok:notok)
                              ; SE A SENHA DE USUARIO AMP FOR IGUAL A
                              SENHA DIGITADA PELO USUARIO, VAI PRA
                              PRIORIDADE OK</span><br>
                            <span style="font-size: 13px;">
                              &nbsp;exten =&gt;
                              _*16,n(notok),Playback(vm-incorrect) ;
                              PLAYBACK INFORMANDO SENHA INCORRETA</span><br>
                            <span style="font-size: 13px;">
                              &nbsp;exten =&gt; _*16,n(notok),Hangup ;
                              DESLIGANDO</span><br>
                            <span style="font-size: 13px;">
                              &nbsp;exten =&gt; _*16,n(ok),MYSQL(Query
                              resultid ${connid} SELECT contexto FROM
                              context_orig WHERE ramal =
                              ${CALLERID(num)})</span><br>
                            <span style="font-size: 13px;">
                              &nbsp;exten =&gt; _*16,n(ok),MYSQL(Fetch
                              fetchid ${resultid} contexto) ; ASSOCIA O
                              RETORNO DA QUERY PARA A VARIAVEL contexto</span><br>
                            <span style="font-size: 13px;">
                              &nbsp;exten =&gt; _*16,n(ok),MYSQL(Clear
                              ${resultid}) ; LIMPA O ${resultid}</span><br>
                            <span style="font-size: 13px;">
                              &nbsp;exten =&gt; _*16,n(ok),Noop(RESULTID:
                              ${resultid} ----------- VARIAVEL AUXILIAR:
                              ${contexto}) ; APENAS PARA DEBUG</span><br>
                            <span style="font-size: 13px;">
                              &nbsp;exten =&gt; _*16,n(ok),MYSQL(Query
                              resultid ${connid} UPDATE sip SET
                              data="${contexto}" WHERE
                              id=${CALLERID(num)} AND keyword="context")
                              ; QUERY ATUALIZANDO TABELA</span><br>
                            <span style="font-size: 13px;">
                              &nbsp;exten =&gt;
                              _*16,n(ok),System(/var/lib/asterisk/bin/module_admin
                              reload) ;REINICIANDO AMP</span><br>
                            <span style="font-size: 13px;">
                              &nbsp;exten =&gt; _*16,n(ok),Playback(vm-saved)
                              ; PLAYBACK INFORMANDO OK</span><br>
                            <span style="font-size: 13px;">
                              &nbsp;exten =&gt; _*16,n(ok),MYSQL(Disconnect
                              ${connid}) ; DESCONECTANDO A SESSAO COM O
                              MYSQL</span><br>
                            <span style="font-size: 13px;">
                              &nbsp;exten =&gt; _*16,n,Hangup ; DESLIGANDO</span><br>
                            <div style="font-size: 10pt;"><br>
                            </div>
                            <span style="font-size: 13px;">
                              att,,</span></span></span>
                        <br>
                      </div>
                    </div>
                    _______________________________________________<br>
                    EBS MODULAR: 3 slots para combina&ccedil;&atilde;o entre E1, GSM,
                    FXS ou FXO;<br>
                    Linha de PORTEIROS IP, abrem at&eacute; 2 dispositivos com
                    acesso IP remoto;<br>
                    Conhe&ccedil;a esses e outros LAN&Ccedil;AMENTOS KHOMP em <a
                      moz-do-not-send="true" href="http://www.Khomp.com"
                      target="_blank">www.Khomp.com</a>&nbsp;<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>
                    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>
                <br>
              </div>
              <br>
              _______________________________________________<br>
              EBS MODULAR: 3 slots para combina&ccedil;&atilde;o entre E1, GSM, FXS ou
              FXO;<br>
              Linha de PORTEIROS IP, abrem at&eacute; 2 dispositivos com acesso
              IP remoto;<br>
              Conhe&ccedil;a esses e outros LAN&Ccedil;AMENTOS KHOMP em <a
                moz-do-not-send="true" href="http://www.Khomp.com"
                target="_blank">www.Khomp.com</a>&nbsp;<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>
              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>
          Rodrigo Lang
          <div><a moz-do-not-send="true"
              href="http://openingyourmind.wordpress.com/"
              target="_blank">http://openingyourmind.wordpress.com/</a><br>
          </div>
        </div>
      </span>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
EBS MODULAR: 3 slots para combina&ccedil;&atilde;o entre E1, GSM, FXS ou FXO;
Linha de PORTEIROS IP, abrem at&eacute; 2 dispositivos com acesso IP remoto;
Conhe&ccedil;a esses e outros LAN&Ccedil;AMENTOS KHOMP em <a class="moz-txt-link-abbreviated" href="http://www.Khomp.com">www.Khomp.com</a>&nbsp;
_______________________________________________
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>
_______________________________________________
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>