FreeSWITCH及VOIP,Openser,电话机器人等产品中文技术资讯、交流、沟通、培训、咨询、服务一体化网络。QQ群:293697898
一、 相关变量
Available variables
year Calendar year, 0-9999
yday Day of year, 1-366
mon Month, 1-12 (Jan = 1, etc.)
mday Day of month, 1-31
week Week of year, 1-53
mweek Week of month, 1-6
wday Day of week, 1-7 (Sun = 1, Mon = 2, etc.) or "sun", "mon", "tue", etc.
hour Hour, 0-23
minute Minute (of the hour), 0-59
minute-of-day Minute of the day, (1-1440) (midnight = 1, 1am = 60, noon = 720, etc.)
time-of-day Time range formatted: hh:mm[:ss]-hh:mm[:ss] (seconds optional) Example: "08:00-17:00"
date-time Date/time range formatted: YYYY-MM-DD hh:mm[:ss]~YYYY-MM-DD hh:mm[:ss] (seconds optional, note tilde between dates) Example: 2010-10-01 00:00:01~2010-10-15 23:59:59
例子,这里的周6应是周日为0排起:
如周六的8点到12点
xml
<condition wday="6" hour="8-12">
周2-6的9:00到17:00
```xml
<condition wday="2-6"/>
<condition minute-of-day="540-1020">
<action application="set" data="billing_open=true"/>
<action application="transfer" data="billing"/>
</condition>
```
特定的日期时间段
```xml
< extension name="2012_memorial_day_weekend_routing">
< condition date-time="2012-05-25 17:00:01~2012-05-29 08:00:00"/>
< condition field="destination_number" expression="^1(2135551212)$">
<action application="bridge" data="sofia/external/18185551212@1.2.3.4"/>
< /condition>
< / extension> ```