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?
[default]
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
[hotline-office]
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()
[hotline-closed]
exten => +41615996666,1,NoOp(Hotline Closed)
exten => +41615996666,n,Playback(we-are-closed)
exten => +41615996666,n,Busy(5)
exten => +41615996666,n,Hangup()
-Benoît-