[asterisk-users] Feature Request: GotoIfTimeWithOffset

Tilghman Lesher tlesher at digium.com
Thu Dec 17 19:19:49 CST 2009


On Thursday 17 December 2009 17:23:22 Olivier wrote:
> When I was testing an IVR, I realized I miss a function I would call
> GotoIfTimeWithOffset.
>
> Today, this IVR is using function AEL GotoIfTime in several places.
> The problem is if it's 11pm at the moment I'm testing this IVR, I can't
> nicely test the 9am or 2pm branch.
>
> GotoIfTimeWithOffset would get 2 incoming arguments :
> - the first is a time range (just like GotoIfTime),
> - the second is a duration offset which you could delay or "rewind" time.
>
> After testing, you would just have to set this offset to 0, to get a
> production-ready dialplan, without changing a line.

https://issues.asterisk.org/view.php?id=16464

I've made some important changes to your idea.  The method for invoking
this is setting a function to a particular date and time.  The reason for this
is to permit testing of a live system, without changing the actual dialplan.
You could set up a test with a particular extension that sets this function
before jumping to the incoming context, or you could use conditional
evaluation, such as checking callerid for the administrator's cellphone
number, in the incoming context to evaluate whether to set this function
or not.

-- 
Tilghman Lesher
Digium, Inc. | Senior Software Developer
twitter: Corydon76 | IRC: Corydon76-dig (Freenode)
Check us out at: www.digium.com & www.asterisk.org



More information about the asterisk-users mailing list