To what extent is GotoIfTime() not working?

Can someone tell me?

It’s impossible to declare independent weekdays like this:
exten => s,n,GotoIfTime(|mon,wed||aug?rule0)

Does this impossibility apply to other parameters as well?

Thanks.

what’s wrong with this instead?

exten => s,n,GotoIfTime(*|mon|*|aug?rule0) exten => s,n,GotoIfTime(*|wed|*|aug?rule0)

believe it or not, i actually prefer to keep each day separate, that way, if i need to close our phones early or we have a holiday, i can just change one line.

iin other words, while you have found a possible bug, the workaround is so simple that i wouldn’t even worry about it…

but that’s me.

Yes, that works, bit the trouble is the bug also affects other parameters; i’ve tried something like the macro:

exten => s,1,GotoIfTime(||*|aug,oct?rule0)
exten => s,n,Playback(/var/lib/asterisk/sounds/goodbye)
exten => s,n,Hangup()
exten => s,n(rule0),Dial(SIP/atcom1)
exten => s,n(rule0),Hangup()

when i change my system date to august everyhting works as expected and the calls hits the atcom1 phone; however, if i call during september OR october I get the “goodbye” message.

I we can therefore state that the month syntax is also buggy.

If we have, say… 3 dayweeks per month (3) that we want to match (exten => s,1,GotoIfTime(|1,2,3||aug,oct,nov?rule0)), and according to your advice, we should redesign the macro like this:

exten => s,1,GotoIfTime(|1||aug?rule0)
exten => s,1,GotoIfTime(|1||oct?rule0)
exten => s,1,GotoIfTime(|1||nov?rule0)
exten => s,1,GotoIfTime(|2||aug?rule0)
exten => s,1,GotoIfTime(|2||oct?rule0)
exten => s,1,GotoIfTime(|2||nov?rule0)
exten => s,1,GotoIfTime(|3||aug?rule0)
exten => s,1,GotoIfTime(|3||oct?rule0)
exten => s,1,GotoIfTime(|3||nov?rule0)
exten => s,n,Playback(/var/lib/asterisk/sounds/goodbye)
exten => s,n,Hangup()
exten => s,n(rule0),Dial(SIP/atcom1)
exten => s,n(rule0),Hangup()

which is a bit impraticable.

You are right of course, but it was about time the bug got corrected…i’m sure i’m not the only one complaining.

Thanks anyway :smile:

this would work just fine

exten => s,n,GotoIfTime(|1-3||oct?rule0)
exten => s,n,GotoIfTime(|1-3||nov?rule0)
exten => s,n,GotoIfTime(|1-3||aug?rule0)

i agree with you that it’s annoying, but instead of focusing on something that can be worked around easily (and how often would you be changing the script you had written, honestly - once every few months at most, methinks) they’re focusing on getting 1.4 out the door, and i don’t blame them.

file a bug report, if you like, but just don’t expect it to be resolved anytime soon - in the meantime, you have a workaround.

Are you sure GotoIfTime can take comma seperated days and months? I didn’t think it could and it would have to be sepearted out like what Wes is saying.

No, it doesn’t take that kind of syntax. But the books and articles I read said otherwise or did not present examples/discussed at all these situations…

It would simplify/clarify a lot the automatic generation of extension.conf files if the declaration was as natural as i assumed :smile: