Jump to content

Different way to program automatic service flage


ahennis@voicespring.net
 Share

Recommended Posts

In a previous job I deployed a lot of Asterisk based systems. One thing I miss from Asterisk is the way that you could specify date and time conditions for use when making call routing decisions. This would make programming more complex logic using service flags a lot easier.

 

You can reference the following link for a more detailed description on using the time conditions.

 

http://www.voip-info.org/wiki/view/Asterisk+cmd+GotoIfTime

 

Asterisk used the following format for date/time conditions which is very similar to what one would use in a Unix cron job.

 

<times>,<weekdays>,<mdays>,<months>,[timezone]

 

An example would be as follows. The statement below would evaluate to true if the time were between 9:00 AM and 5:00 PM Monday thru Friday.

 

9:00-17:00,mon-fri,*,*

 

Setting holidays is easy. The list below covers all US holidays. For example "Thanksgiving *,thu,22-28,nov" would cover every possible day that Thanksgiving day fell on. This works because Thanksgiving day is always on Thursday and the only day of the week that it could possibly fall on are between the 22nd to 28th of November.

 

 

Here are a bunch of US holidays as examples.

 

Independence Day: *,*,4,jul
Christmas: *,*,25,dec
NewYear: *,*,1,jan
MartinLutherKing: *,mon,15-21,jan
Valentines: *,*,14,feb
StPatDay *,*,17,mar
Halloween *,*,31,oct
Thanksgiving *,thu,22-28,nov
MemorialDay *,mon,25-31,may
LaborDay *,mon,1-7,sep
Pres/WashBday *,mon,15-21,feb
MothersDay *,sun,8-14,may
FathersDay *,sun,15-21,jun

 

Link to comment
Share on other sites

You can use service flags in the dial plan. That should make it easy to specify routes (e.g. expensive international routes) e.g. only during office hours.

 

As for the service flags, we have recently added a possibility to add holiday ranges, e.g. for school holidays when you don't want to specify each and every day. It will be part of the next release.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...