<br><br><div class="gmail_quote">On Wed, Apr 22, 2009 at 5:20 PM, Chris Fowler <span dir="ltr"><chris@fowler.cc></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Brian, Michael,<br>
<br>
Thanks for the help - I had read that but not fully comprehended it until you spun it the way you did.<br>
<br>
Here's what I ended up with - if there's optimization that could be done let me know. Happy to update the wiki if this is a common request.</blockquote><div><br>That looks pretty good. It is clean and readable and most importantly it sounds like it does what you need! :)<br>
-MC<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
<br>
<!-- Provide an internal ext # for Sales --><br>
<extension name="RS-Sales-x2002"><br>
<condition field="destination_number" expression="^2002$"><br>
<action application="transfer" data="RS-Sales"/><br>
</condition><br>
</extension><br>
<br>
<!-- Setup variables prior to transfering to call handler for sales --><br>
<extension name="RS-Sales" continue="true"><br>
<!-- man strftime - M-F, 9AM to 5PM --><br>
<condition field="destination_number" expression="^RS-Sales$"/><br>
<condition field="${strftime(%w)}" expression="^([1-5])$"/><br>
<condition field="${strftime(%H%M)}" expression="^((09|1[0-6])[0-5][0-9]|1700)$"><br>
<action application="set" data="RS-Sales_open=true"/><br>
<action application="transfer" data="xfer-to-sales"/><br>
<anti-action application="set" data="RS-Sales_open=false"/><br>
<anti-action application="transfer" data="xfer-to-sales"/><br>
</condition><br>
</extension><br>
<br>
<!-- Handle Sales Call --><br>
<!-- If Sales is open then route to extension first then vMail; else direct to vMail --><br>
<extension name="xfer-to-sales"><br>
<condition field="destination_number" expression="^xfer-to-sales$"/><br>
<condition field="${RS-Sales_open}" expression="^true$"><br>
<action application="bridge" data="user/1001@${domain_name}"/><br>
<action application="answer"/><br>
<action application="sleep" data="2000"/><br>
<action application="voicemail" data="default ${domain_name} 2001"/><br>
<anti-action application="voicemail" data="default ${domain_name} 2001"/><br>
</condition><br>
</extension><br>
<br>
Thx, Chris.<br>
<br>
</blockquote><br></div><br>