[asterisk-users] Feature Request: GotoIfTimeWithOffset

Tzafrir Cohen tzafrir.cohen at xorcom.com
Fri Dec 18 04:11:36 CST 2009


On Thu, Dec 17, 2009 at 07:19:49PM -0600, Tilghman Lesher wrote:
> 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.

Looks nice. Just one point:

This is a "global" (or rather: channel-specific, but still common to all
in thecontext of that channel) setting. Suppose I have ( and suppose
Asterisk even accepts this syntax) :

  $(TESTTIME(...)}
  GotoIfTime(test1,...)
  GotoIfTime(test2,...)

Both test1 and test2 would be evaluated with the same offset as set in
the TESTTIME() above. Is that what you want?

-- 
               Tzafrir Cohen
icq#16849755              jabber:tzafrir.cohen at xorcom.com
+972-50-7952406           mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir



More information about the asterisk-users mailing list