[asterisk-users] RE: By week extension dialing
John Williams
williams at tni.com
Mon Aug 7 11:38:41 MST 2006
One possibility is to use STRFTIME to get the week (of year) number, and
GotoIf based on that. Untested code, but something like:
Set(WeekOfYear=${STRFTIME(,,%W)})
GotoIf($[${WeekOfYear}%4=0]?x)
~ John Williams
On Mon, 7 Aug 2006, Dan Brummer wrote:
> Brent, thank you for the reply. I think I asked my question
> incorrectly. I'm looking to setup a single extension that changes the
> number it goes to each week. If this extension was called on week 1, it
> would go to number 1, if called on week 2 then dial number 2, week 3
> dial number 1 and so forth.
>
> So for any miscommunications.
>
> Thank you,
> Dan
>
> -----Original Message-----
> From: asterisk-users-bounces at lists.digium.com
> [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Brent
> Torrenga
> Sent: Monday, August 07, 2006 10:07 AM
> To: asterisk-users at lists.digium.com
> Subject: [asterisk-users] RE: By week extension dialing
>
> Dan,
>
> Try a cron job to place a call file into /var/spool/asterisk/outgoing (I
> think, sorry, don't have access to that machine right now).
>
> I do a similar thing with wakeup calls - a cron job puts a call file
> into the above dir that rings my phone each weekday morning. There's no
> reason you couldn't have a cron job put unique call files based on what
> week it is to call a specific number.
>
>
> ---SNIP---
> >I found the function GotoIfTime but I'm not sure how to apply it to
> >weekly (instead of mapping out the actual days, 1-7, 8-15, etc).
> >
> >Any ideas?
> >
> >Thank you,
> >Dan
> ---SNIP---
>
> Sincerely,
>
> Brent A. Torrenga
>
> Torrenga Engineering, Inc.
> 907 Ridge Road
> Munster, Indiana 46321-1771
>
> tel:+1 219 836 8918 x325
> fax:+1 219 836 1138
> email:brent.torrenga at torrenga.com
> web:www.torrenga.com
>
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
More information about the asterisk-users
mailing list