[Freeswitch-users] Conditions / time of day

Rick Jarvis rick at magicmail.mooo.com
Wed Aug 10 18:57:18 MSD 2016


Sorted, thank you Mike :)

> On 10 Aug 2016, at 14:55, Michael Jerris <mike at jerris.com> wrote:
> 
> check out the inline attribute 
> 
> On Wednesday, August 10, 2016, Rick Jarvis <rick at magicmail.mooo.com <mailto:rick at magicmail.mooo.com>> wrote:
> I have to admit, I’ve always struggled with conditions. 
> 
> Here I’m trying to have a different close time on a Friday to the rest of the week. Ignore the resulting actions, that’s just for testing. It appears the issue is matching the variable. I’ve tried export instead of set as well. Can anyone tell me where I’m going wrong, or if this should work?
> 
> <include>
> 
>   <extension name="Time-of-day" continue="true">
>     <condition wday="6" time-of-day="09:00-16:30" break="never">
>         <action application="set" data="officestatus=open"/>
>         <anti-action application="set" data="officestatus=closed"/>
>     </condition>
>     <condition wday="2-5" time-of-day="09:00-17:00">
>         <action application="set" data="officestatus=open"/>
>     </condition>
>   </extension>
> 
>   <extension name="mainin">
>     <condition field="${officestatus}" expression="^open$">
>       <action application="answer"/>
>       <action application="playback" data="ivr/ivr-in_line.wav"/>
>     </condition>
>   </extension>
> 
>   <extension name="vmin">
>     <condition field="${officestatus}" expression="^closed$">
>       <action application="answer"/>
>       <action application="playback" data="ivr/ivr-im_sorry.wav"/>
>     </condition>
>   </extension>
> 
> </include>
> 
> R
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services: 
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
> 
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> http://www.cluecon.com
> 
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20160810/f793ce9d/attachment.html 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list