<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
<br><font class="Apple-style-span" face="Tahoma" size="2">Ola a todos,</font><div style="font-family: Tahoma; font-size: 10pt; "><br></div><div style="font-family: Tahoma; font-size: 10pt; "> Estou tentando criar uma facilidade no asterisk usando AstDB. Segui um exemplo que vi na net:</div><div><font class="Apple-style-span" face="Tahoma" size="2"><div>exten => *11,1,Answer </div><div>exten => *11,2,Wait(1) </div><div>exten => *11,3,Set(${DB(NP/${CALLERIDNUM})=YES}) </div><div>exten => *11,4,Playback(nao-perturbe) </div><div>exten => *11,5,Playback(ativado) </div><div>exten => *11,6,Hangup() </div><div>exten => *13,1,Answer </div><div>exten => *13,2,Wait(1) </div><div>exten => *13,3,DBdel(NP/${CALLERIDNUM}) </div><div>exten => *13,4,Playback(nao-perturbe) </div><div>exten => *13,5,Playback(desativado) </div><div>exten => *13,6,Hangup()</div><div><br></div><div>Porém, recebo esse erro na CLI:</div></font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> WARNING[3624]: pbx.c:9096 pbx_builtin_setvar: Set requires one variable name/value pair.</font><br><font class="Apple-style-span" face="Tahoma" size="2"><br></font></div><div><font class="Apple-style-span" face="Tahoma" size="2"><br></font></div><div><font class="Apple-style-span" face="Tahoma" size="2">Pelo livro "The future of telephony...." a explicação é assim:</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"><span class="Apple-style-span" style="font-family: serif; font-size: 12pt; "><pre class="programlisting" style="font-family: monospace; font-style: normal; font-weight: normal; font-size: 12px; color: black; margin-top: 1em; margin-right: 0.25in; margin-bottom: 1em; margin-left: 0.25in; padding-top: 0.5em; padding-right: 0.5em; padding-bottom: 0.5em; padding-left: 0.5em; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(240, 240, 240); border-top-color: black; border-top-style: dotted; border-top-width: 1px; border-left-color: black; border-left-style: dotted; border-left-width: 1px; border-right-color: black; border-right-style: solid; border-right-width: 2px; border-bottom-color: black; border-bottom-style: solid; border-bottom-width: 2px; background-position: initial initial; background-repeat: initial initial; ">exten => 456,1,Set(DB(test/count)=1)
<span class="strong"><strong style="font-weight: normal; ">exten => 456,n,Set(COUNT=${DB(test/count)})</strong></span>
exten => 456,n,SayNumber(${COUNT})</pre></span></font></div><div><font class="Apple-style-span" face="Tahoma" size="2">Primeiro coloca o valor na DR,depois associa esse valor a uma variável e por ultimo,usa a variável.</font></div><div><span class="Apple-style-span" style="font-family: Tahoma; font-size: 10pt; "><br></span></div><div><span class="Apple-style-span" style="font-family: Tahoma; font-size: 10pt; ">Estaria o exemplo do "Não me perturbe" faltando a primeira linha? Se sim, como poderia ficar?</span></div><div><span class="Apple-style-span" style="font-family: Tahoma; font-size: 10pt; "><br></span></div><div><span class="Apple-style-span" style="font-family: Tahoma; font-size: 10pt; ">Agradeço qualquer ajuda!</span></div><div><span class="Apple-style-span" style="font-family: Tahoma; font-size: 10pt; "><br></span></div><div><font class="Apple-style-span" face="Tahoma" size="2"><br></font></div><div><font class="Apple-style-span" face="Tahoma" size="2"><br></font></div><div><font class="Apple-style-span" face="Tahoma" size="2">Att,</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"><br>
</font><br><font class="Apple-style-span" face="Tahoma" size="2">
Flavio Roberto Miranda</font><br><font class="Apple-style-span" face="Tahoma" size="2">
MSN:flaviormiranda@hotmail.com</font><br><font class="Apple-style-span" face="Tahoma" size="2">Skype: flaviormiranda</font><br><br></div>                                            </body>
</html>