<p>Salve Messias.</p><p>Deu certo, a diferença estava na hora de testar que havia me embaraçado um pouco.</p><p> </p><p>A ultima coisa que me deixou curioso a saber e ja desculpando minha igonorancia se a pergunta for obvia, é se DB é armazenada em algum arquivo e qual seria? </p><p> </p><p>Obg </p><p> </p><p>Em 18:29, <strong><span>José Carlos Messias </span></strong> escreveu:</p><blockquote style="border-left: 2px solid #6868cc; margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex"><br />[cadeado]<br />;cadastrar senha cadeado<br />exten => _0110XXXX,1,NoCDR()<br />exten => _0110XXXX,2,Set(senha=${DB(cadepwd/${CALLERID(num)})});<br />exten => _0110XXXX,3,GoToIf($["${senha}" = ""]?5:4)<br />exten => _0110XXXX,4,Hangup<br />exten => _0110XXXX,5,Set(DB(cadepwd/${CALLERID(num)})=${EXTEN:4})<br />exten => _0110XXXX,6,Wait(2)<br />exten => _0110XXXX,7,Playback(beep)<br />exten => _0110XXXX,8,Playback(beep)<br />exten =&g
t; _0110XXXX,9,Playback(beep)<br />exten => _0110XXXX,10,Hangup<br /><br />;trocar senha cadeado<br />exten => _0120XXXXXXXX,1,NoCDR()<br />exten => _0120XXXXXXXX,2,Set(cadp=${DB(cadepwd/${CALLERID(num)})});<br />exten => _0120XXXXXXXX,3,GoToIf($["${cadp}" = "${EXTEN:4:4}"]?4:9)<br />exten => _0120XXXXXXXX,4,Set(DB(cadepwd/${CALLERID(num)})=${EXTEN:8})<br />exten => _0120XXXXXXXX,5,Wait(2)<br />exten => _0120XXXXXXXX,6,Playback(beep)<br />exten => _0120XXXXXXXX,7,Playback(beep)<br />exten => _0120XXXXXXXX,8,Playback(beep)<br />exten => _0120XXXXXXXX,9,Hangup<br />exten => _0120XXXXXXXX,10,Hangup<br /><br />;colocar cadeado<br />exten => _0130XXXX,1,NoCDR()<br />exten => _0130XXXX,2,Set(cadp=${DB(cadepwd/${CALLERID(num)})});<br />exten => _0130XXXX,3,GoToIf($["${cadp}" = "${EXTEN:4}"]?4:9)<br />exten => _0130XXXX,4,Set(DB(cadeado/${CALLERID(num)})=y<br />exten => _0130XXXX,5,Wait(2)<br />e
xten => _0130XXXX,6,Playback(beep)<br />exten => _0130XXXX,7,Playback(beep)<br />exten => _0130XXXX,8,Playback(beep)<br />exten => _0130XXXX,9,Hangup<br />exten => _0130XXXX,10,Hangup<br /><br />;retirar cadeado<br />exten => _0140XXXX,1,NoCDR()<br />exten => _0140XXXX,2,Set(cad=${DB(cadepwd/${CALLERID(num)})});<br />exten => _0140XXXX,3,GoToIf($["${cad}" = "${EXTEN:4}"]?4:10)<br />exten => _0140XXXX,4,DBdel(cadeado/${CALLERID(num)})<br />;exten => _0140XXXX,4,Set(DB(cadeado/${CALLERID(num)})=n<br />exten => _0140XXXX,5,Wait(2)<br />exten => _0140XXXX,6,Playback(beep)<br />exten => _0140XXXX,7,Playback(beep)<br />exten => _0140XXXX,8,Playback(beep)<br />exten => _0140XXXX,9,Hangup<br />exten => _0140XXXX,10,Hangup<br /><br />na macro<br />exten=>s,n,Set(CAD=${DB(cadeado/${CALLERID(num)}):0:1}) ;checa cadeado/trava<br />exten=>s, n,GotoIf($["${CAD}" = "y"]?end) ;se estiver com cadead
o faz<br />hangup, desliga<br />exten=>s, n(end),Hangup()<br />_______________________________________________<br />Compre uma camiseta da AsteriskBrasil.org!<br />http://www.voipmania.com.br<br /><br />Acesse o canal IRC de discussão sobre Asterisk em Português Brasileiro na rede Freenode.net: #asterisk-br<br />_______________________________________________<br />Lista de discussões AsteriskBrasil.org<br />AsteriskBrasil@listas.asteriskbrasil.org<br />http://listas.asteriskbrasil.org/mailman/listinfo/asteriskbrasil<br /><br /></blockquote>