Time based includes + wildcard matching?

In the default dial-plan I have this code, which I believe was from an older asterisk version and did work as expected.

This is our main voicemail server, it uses a catch-all entry to direct calls to voicemail and a ‘more specific’ include for a special hotline number which is handled by an IVR implemented as AGI script.

In a previous version of Asterisk (sorry I don’t know which one) this worked as expected, the more specific entry corresponding to the matching time was selected even if it was included.

With 16.22 this has stopped working. Calls to +41615996666 are being matched by the less specific entry in the default section and not sent to the hotline AGI.

If I comment out the default catch-all, this works as expected, so the time conditions work.

Is there some config option to make the asterisk hunt for a matching extension in all includes?

exten => _+41xxxxxxxxx,1,Verbose(1,Catch-All and send to Voicemail)
exten => _+41xxxxxxxxx,n,GoTo(+41860${EXTEN:3},1)

include => hotline-office,08:30-12:00,mon-fri,,
include => hotline-office,13:30-19:00,mon-fri,,
include => hotline-closed

exten => +41615996666,1,NoOp(Hotline office hours)
exten => +41615996666,n,Playback(greet-english)
exten => +41615996666,n,Playback(greet-german)
exten => +41615996666,n,Playback(greet-french)
exten => +41615996666,n,AGI(hotline.agi)
exten => +41615996666,n,Hangup()

exten => +41615996666,1,NoOp(Hotline Closed)
exten => +41615996666,n,Playback(we-are-closed)
exten => +41615996666,n,Busy(5)
exten => +41615996666,n,Hangup()


Please retry on a supported version of Asterisk. Asterisk 16 hasn’t had support for this sort of issue for about 14 months, and hasn’t had any support at all for over 2 months.

I don’t think it has ever used includes if the including context matches.

It can indeed use lines from includes, as well as those from the including context, according to the docs. But I can see no specification of any additional arguments beyond the name of the context being included; if you want to do conditional includes, you would have to do them some other way.

huu, have newer heard about time based includes
where have you found documentation for that ???

1 Like

thanks david551, only been working with asterisk since 1.2 and newer noticed this funktion :-/

Lots of stuff lurking in those sample config files that don’t seem to be mentioned anywhere else!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.