Creating time based ivr

I want to play different greetings based on time . after then a common ivr (mainivr) will be played. problem is when its 7.00 am all three ivr is being played. when its 15.00 afternoon and evening is played. seems it cannot skip the next priority. please help

exten => 1234,1,Answer()

same => n,GotoIfTime(06:01-13:59,*,*,*?time1)
same => n,GoToIfTime(14:00-18:00,*,*,*?time2)
same => n,GoToIfTime(18:01-06:00,*,*,*?time3)
same => n(time1),Background(mysounds/morning)
same => n(time2),Bakcground(mysounds/afternoon)
same => n(time3),Background(mysounds/evening)
same => n,Wait(2)
same => n,Background(mainivr)

Hello.
Try GoTo application.
Though I don’t remember if it can jump to priority labels, but I hope/sure it can:

exten => 1234,1,Answer()

same => n,GotoIfTime(06:01-13:59,*,*,*?time1)
same => n,GoToIfTime(14:00-18:00,*,*,*?time2)
same => n,GoToIfTime(18:01-06:00,*,*,*?time3)
same => n(time1),Background(mysounds/morning)
same => n,Goto(mainivr)
same => n(time2),Bakcground(mysounds/afternoon)
same => n,Goto(mainivr)
same => n(time3),Background(mysounds/evening)
same => n,Goto(mainivr)
same => n(mainivr),Wait(2)
same => n,Background(mainivr)

cool ! its working … thanks a lot :smile: