asterisk go to “holiday” extension but hoiday is not defined

Home » Asterisk Users » asterisk go to “holiday” extension but hoiday is not defined
Asterisk Users 7 Comments

When a call comes in asterisk is forwarding the call to holiday extension, even though the holiday is not defined.

Here is my dial plan

exten => 4,1,GotoIfTime(*,*,1,jan?holiday,s,1) ; new years day
exten => 4,n,GotoIfTime(*,*,6,apr?holiday,s,1) ; easter holiday
exten => 4,n,GotoIfTime(*,*,23,may?holiday,s,1)
exten => 4,n,GotoIfTime(*,*,1,|jul?holiday,s,1) ; canada day
exten => 4,n,GotoIfTime(*,*,1,aug?holiday,s,1) ; long weekend

Today is May 1, so why is it going to “holiday” extension?
Is there another dial plan that holidays are defined?
I’m using asterisk 1.8.10

7 thoughts on - asterisk go to “holiday” extension but hoiday is not defined

  • what is the pipe before jul
    I don’t understand the utility of that “|” from the doc.

  • Not sure about 1.8 but on 10.X I seem to recall that the Gotoiftime might be
    case sensitive?

  • I don’t use gotoiftime for holiday matching, but the COMMA PIPE stands out on your example.

    Doug

  • they say “daynames and monthnames are not case-sensitive.”
    the pipe should be used to concatenate several values,
    it could get the “|jul” as “everything|jul” since an empty value before
    the pipe doesn’t have sense?

  • It should be comma, not pipe. Pipe was used in asterisk 1.4

    exten => 4,n,GotoIfTime(*,*,1,jul?holiday,s,1) ; canada day

    now it is working 🙂