Sorted, thank you Mike :)

On 10 Aug 2016, at 14:55, Michael Jerris <mike@jerris.com> wrote:

check out the inline attribute 

On Wednesday, August 10, 2016, Rick Jarvis <rick@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@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@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org