[Asterisk-Users] GotoIfTime help

Osvaldo Mundim osvaldo at ilinksolutions.com
Fri Dec 19 13:29:39 MST 2003


All right...

Its working now.

thank you very much!
regards
Oz


On Dec 19, 2003, at 3:02 PM, Philipp von Klitzing wrote:

> Hi!
>
> gotoif usually takes a priority as label, not an extension! See below.
> Never tried if you can also use the notation 
> "context,extension,priority"
> instead of just "priority", but it might work. Just try it.
>
>> I need to forward an extension to an other depending on the current
>> time but I could not get it done with GotoIfTime.
>>
>> What I'm trying to do is ring on the extension 1 if time is between
>> 8:00AM and 2:00PM and on extension 2 if is between
>> 2:01PM 11:00PM.
>>
>> exten => 111,1,GotoIfTime(8:00-14:00|*|*|1-12?333)
>> exten => 111,2,Dial(${Person1})
>> exten => 111,3,Dial(Hangup)
>>
>> exten => 333,1,Dial(${Person2})
>> exten => 333,2,Dial(Hangup)
>
>
>
> exten => 111,1,GotoIfTime(8:00-14:00|*|*|1-12?4:2)
> exten => 111,2,Dial(${Person1})
> exten => 111,3,Dial(Hangup)
> exten => 111,4,Goto(default,333,1)
>
> exten => 333,1,Dial(${Person2})
> exten => 333,2,Dial(Hangup)
>
> Note: If you use goto() or gotoif() with just one label then you'll 
> see a
> warning in /var/log/asterisk/messages about the 2nd label missing. 
> That's
> why I prefer to always specify both labels.
>
> Cheers, Philipp
>
>
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users




More information about the asterisk-users mailing list