[Freeswitch-users] Conditions / time of day

Michael Jerris mike at jerris.com
Wed Aug 10 17:55:39 MSD 2016


check out the inline attribute

On Wednesday, August 10, 2016, Rick Jarvis <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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20160810/c90ca60d/attachment.html 


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