<div dir="ltr">Solved!!<div><br></div><div><br></div><div><div>Set(time_01=06:00-12:00,*,*,*);</div><div>Set(time_02=12:00-18:00,*,*,*);</div><div>Set(time_03=18:00-06:00,*,*,*);</div><div><br></div><div>if(${IFTIME(${time_01}?1:0)} == 1) {</div><div><span class="" style="white-space:pre"> </span>NoOp("Bom dia");</div><div><span class="" style="white-space:pre"> </span>Playback(beep);</div><div>} else if(${IFTIME(${time_02}?1:0)} == 1) {</div><div><span class="" style="white-space:pre"> </span>NoOp("Boa tarde");</div><div><span class="" style="white-space:pre"> </span>Playback(beep);</div><div>} else if(${IFTIME(${time_03}?1:0)} == 1) {</div><div><span class="" style="white-space:pre"> </span>NoOp("Boa noite");</div><div><span class="" style="white-space:pre"> </span>Playback(beep);</div><div>}</div></div><div><br></div><div><br></div><div>Thank's</div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><br><div><table style="font-family:'Times New Roman'"><tbody><tr><td rowspan="3"><a href="mailto:rafaelsnsa@gmail.com" title="Enviar um e-mail para mim" target="_blank"><img alt="Sua Foto" src="https://lh5.googleusercontent.com/-4_Ww7w9G_BM/AAAAAAAAAAI/AAAAAAAAD40/IgVDbZCLz5w/s120-c/photo.jpg" width="70" height="70" style="clear:left;float:left;margin-bottom:5px;margin-right:5px"></a></td><td><span style="font-family:'Trebuchet MS',Trebuchet,sans-serif;font-size:22px;font-weight:bold">Rafael S. Saraiva</span></td></tr><tr><td><span style="font-family:'Trebuchet MS',Trebuchet,sans-serif">Porto Alegre - RS | Mobile: <a><img src="http://www.sidneyrezende.com/srzd/7ano/imagens/bandeira-brasil.png" title="Brazil +55" border="0"></a> (51) 8174-7956</span></td></tr><tr><td><a href="http://br.linkedin.com/pub/rafael-saraiva/52/aab/230" target="_blank"><img src="https://static.licdn.com/scds/common/u/img/webpromo/btn_viewmy_160x25.png" border="0" width="160" height="25" title="View Rafael Saraiva's profile on LinkedIn"></a> <a href="https://plus.google.com/u/0/+RafaelSaraivaRS" target="_blank"><img src="https://ssl.gstatic.com/s2/oz/images/faviconr2.ico" border="0" width="25" height="25" title="View Rafael Saraiva's profile on Google+"></a></td></tr></tbody></table></div></div></div></div>
<br><div class="gmail_quote">2015-05-12 14:39 GMT-03:00 Rafael dos Santos Saraiva <span dir="ltr"><<a href="mailto:rafaelsnsa@gmail.com" target="_blank">rafaelsnsa@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Sorry, I forget to tell I tried, but not works.<div><br></div><div><u>Context:</u></div><div><div>context ivr_temp2 {</div><div> s => {</div><div> Proceeding();</div><div> str_time_01 = '06:00-12:00|*|*|*'; // Manhã</div><div> ifTime (${str_time_01}) {</div><div><span style="white-space:pre-wrap"> </span>Playback(ura/bom_dia);</div><div> }</div><div> }</div><div>}</div></div><div><br></div><div>The error is showed on "ael reload".</div><div><br></div><div><u>Console errors:</u></div><div><div>rs0000sr304*CLI> ael reload</div><div>Command 'ael reload' failed.</div><div>[May 12 14:31:52] NOTICE[20773]: pbx_ael.c:164 pbx_load_module: Starting AEL load process.</div><div>[May 12 14:31:52] ERROR[20773]: ael.y:840 ael_yyerror: ==== File: /etc/asterisk/extensions.ael, Line 315, Cols: 32-32: Error: syntax error, unexpected ')', expecting '|'</div><div>[May 12 14:31:52] NOTICE[20773]: pbx_ael.c:177 pbx_load_module: AEL load process: parsed config file name '/etc/asterisk/extensions.ael'.</div><div>[May 12 14:31:52] ERROR[20773]: pbx_ael.c:197 pbx_load_module: Sorry, but 1 syntax errors and 0 semantic errors were detected. It doesn't make sense to compile.</div></div><div><br></div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div><div dir="ltr"><br><div><table style="font-family:'Times New Roman'"><tbody><tr><td rowspan="3"><a href="mailto:rafaelsnsa@gmail.com" title="Enviar um e-mail para mim" target="_blank"><img alt="Sua Foto" src="https://lh5.googleusercontent.com/-4_Ww7w9G_BM/AAAAAAAAAAI/AAAAAAAAD40/IgVDbZCLz5w/s120-c/photo.jpg" width="70" height="70" style="clear:left;float:left;margin-bottom:5px;margin-right:5px"></a></td><td><span style="font-family:'Trebuchet MS',Trebuchet,sans-serif;font-size:22px;font-weight:bold">Rafael S. Saraiva</span></td></tr><tr><td><span style="font-family:'Trebuchet MS',Trebuchet,sans-serif">Porto Alegre - RS | Mobile: <a><img src="http://www.sidneyrezende.com/srzd/7ano/imagens/bandeira-brasil.png" title="Brazil +55" border="0"></a> (51) 8174-7956</span></td></tr><tr><td><a href="http://br.linkedin.com/pub/rafael-saraiva/52/aab/230" target="_blank"><img src="https://static.licdn.com/scds/common/u/img/webpromo/btn_viewmy_160x25.png" border="0" width="160" height="25" title="View Rafael Saraiva's profile on LinkedIn"></a> <a href="https://plus.google.com/u/0/+RafaelSaraivaRS" target="_blank"><img src="https://ssl.gstatic.com/s2/oz/images/faviconr2.ico" border="0" width="25" height="25" title="View Rafael Saraiva's profile on Google+"></a></td></tr></tbody></table></div></div></div></div>
<br><div class="gmail_quote">2015-05-12 13:51 GMT-03:00 Tech Support <span dir="ltr"><<a href="mailto:asterisk@voipbusiness.us" target="_blank">asterisk@voipbusiness.us</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">You should try it and find out if it works. If it does, let us know.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Regards;<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">John<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in"><p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> <a href="mailto:asterisk-users-bounces@lists.digium.com" target="_blank">asterisk-users-bounces@lists.digium.com</a> [mailto:<a href="mailto:asterisk-users-bounces@lists.digium.com" target="_blank">asterisk-users-bounces@lists.digium.com</a>] <b>On Behalf Of </b>Rafael dos Santos Saraiva<br><b>Sent:</b> Tuesday, May 12, 2015 11:58 AM<br><b>To:</b> Asterisk Users Mailing List - Non-Commercial Discussion<br><b>Subject:</b> [asterisk-users] AEL keyword IfTime with variable on time range<u></u><u></u></span></p></div><p class="MsoNormal"><u></u> <u></u></p><div><p class="MsoNormal" style="text-align:justify">Hi<u></u><u></u></p><div><p class="MsoNormal" style="text-align:justify"><u></u> <u></u></p></div><div><p class="MsoNormal" style="text-align:justify">It's possible using a variable in the iftime keyword argument?<u></u><u></u></p></div><div><p class="MsoNormal" style="text-align:justify"><u></u> <u></u></p></div><div><p class="MsoNormal" style="text-align:justify">E.g:<u></u><u></u></p></div><div><p class="MsoNormal" style="text-align:justify"><u></u> <u></u></p></div><div><p class="MsoNormal" style="text-align:justify">context text {<u></u><u></u></p></div><div><p class="MsoNormal" style="text-align:justify"> s => {<u></u><u></u></p></div><div><p class="MsoNormal" style="text-align:justify"> timerange = '06:00-12:00|*|*|*';<u></u><u></u></p></div><div><p class="MsoNormal" style="text-align:justify"> ifTime(${timerange} {<u></u><u></u></p></div><div><p class="MsoNormal" style="text-align:justify"> Playback(ivr/goodbye);<u></u><u></u></p></div><div><p class="MsoNormal" style="text-align:justify"> }<u></u><u></u></p></div><div><p class="MsoNormal" style="text-align:justify"> }<u></u><u></u></p></div><div><p class="MsoNormal" style="text-align:justify">}<u></u><u></u></p></div><div><p class="MsoNormal" style="text-align:justify"><u></u> <u></u></p></div><div><p class="MsoNormal" style="text-align:justify"><u></u> <u></u></p></div><div><p class="MsoNormal" style="text-align:justify">thanks<u></u><u></u></p></div><div><p class="MsoNormal" style="text-align:justify"><br clear="all"><u></u><u></u></p><div><div><div><p class="MsoNormal" style="text-align:justify"><u></u> <u></u></p><div><table border="0" cellpadding="0"><tbody><tr><td rowspan="3" style="padding:.75pt .75pt .75pt .75pt"><p class="MsoNormal" style="text-align:justify"><a href="mailto:rafaelsnsa@gmail.com" title="Enviar um e-mail para mim" target="_blank"><span style="border:solid windowtext 1.0pt;padding:0in;text-decoration:none"><img border="0" width="70" height="70" src="cid:image001.jpg@01D08CB2.5193C350" alt="Image removed by sender. Sua Foto"></span></a><u></u><u></u></p></td><td style="padding:.75pt .75pt .75pt .75pt"><p class="MsoNormal" style="text-align:justify"><b><span style="font-size:16.5pt;font-family:"Trebuchet MS","sans-serif"">Rafael S. Saraiva</span></b><u></u><u></u></p></td></tr><tr><td style="padding:.75pt .75pt .75pt .75pt"><p class="MsoNormal" style="text-align:justify"><span style="font-family:"Trebuchet MS","sans-serif"">Porto Alegre - RS | Mobile: <span style="border:solid windowtext 1.0pt;padding:0in"><img border="0" width="100" height="100" src="cid:~WRD000.jpg" alt="Image removed by sender."></span> (51) 8174-7956</span><u></u><u></u></p></td></tr><tr><td style="padding:.75pt .75pt .75pt .75pt"><p class="MsoNormal" style="text-align:justify"><a href="http://br.linkedin.com/pub/rafael-saraiva/52/aab/230" target="_blank"><span style="border:solid windowtext 1.0pt;padding:0in;text-decoration:none"><img border="0" width="160" height="25" src="cid:image002.jpg@01D08CB2.5193C350" alt="Image removed by sender."></span></a> <a href="https://plus.google.com/u/0/+RafaelSaraivaRS" target="_blank"><span style="border:solid windowtext 1.0pt;padding:0in;text-decoration:none"><img border="0" width="25" height="25" src="cid:image003.jpg@01D08CB2.5193C350" alt="Image removed by sender."></span></a><u></u><u></u></p></td></tr></tbody></table><p class="MsoNormal" style="text-align:justify"><u></u> <u></u></p></div></div></div></div></div></div></div></div><br><span class="HOEnZb"><font color="#888888">--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></font></span></blockquote></div><br></div>
</blockquote></div><br></div>