Include with time-condition does not work

Hello,

I’m just starting with asterisk 1.6 on my ubuntu 9.10 host and I have a problem using time-controlled includes in the dialplan.
I’m using the following simple code:

[my-phones]

include => daytime|09:00-17:00|mon-fri|*|*
include => voicemail       

[daytime]
exten => 2001,1,Answer()
exten => 2001,2,NoOp(daytime)
exten => 2001,3,Playback(hello-world)
exten => 2001,4,Hangup()

[voicemail]
exten => 2001,1,VoiceMail(2001,u)

When doing a “dialplan reload” I get the following error message:

[Feb  4 22:38:32] WARNING[25830]: pbx.c:9499 ast_context_verify_includes: Context 'my-phones' tries to include nonexistent context 'daytime|09:00-17:00|mon-fri|*|*'

Without the time-condition " |09:00-23:40|mon-fri|| " there is no problem.

Can anybody help?
Guido

As I know the time condition work with gotoiftime() command. So you need to create a rule with the exten => and then jump to the context. I repeat… As I actually know.

Hello navaismo,
yes, that works! thank you very much!
It seems that time-controlled includes does not work anymore in asterisk 1.6 as discribed in my book.

As , has replaced | in most cases, have you tried using commas?