# Time of day incoming call routing

**URL:** <https://community.asterisk.org/t/time-of-day-incoming-call-routing/16537>\
**Category:** Asterisk Support\
**Created:** [September 1, 2007, 6:21pm UTC](https://community.asterisk.org/t/time-of-day-incoming-call-routing/16537 "2007-09-01T18:21:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Davemo](https://avatars.discourse-cdn.com/v4/letter/d/a587f6/32.png) [@Davemo](https://community.asterisk.org/u/Davemo)\
**Post date:** [September 1, 2007, 6:21pm UTC](https://community.asterisk.org/t/time-of-day-incoming-call-routing/16537/1 "2007-09-01T18:21:16Z")

</div>

Hello Everyone  
Does anyone know how and where to place context information  
for time of day call routing?

I need to be able route calls to a manned extension from 08:00 until 17:00 Monday through Friday. After 17:00 I need to be able to go to either voice mail or a voice menu where an incoming caller can be directed to leave voice mail. Any assistance would be appreciated. I have 10 extensions working correctly. Just need to be able to make them time dependent. I am using Asterisk Now Beta 6.

extensions.conf

[default]  
exten = s,1,dial(sip/5000,30,r)  
exten = s,1,dial(sip/5001,30,r)  
exten = s,1,dial(sip/5002,30,r)  
exten = s,1,dial(sip/5003,30,r)  
exten = s,1,dial(sip/5004,30,r)  
exten = s,1,dial(sip/5005,30,r)  
exten = s,1,dial(sip/5006,30,r)  
exten = s,1,dial(sip/5007,30,r)  
exten = s,1,dial(sip/5008,30,r)  
exten = s,1,dial(sip/5009,30,r)  
include = ring-all

[ring-all]  
exten = s,1,dial(sip/5000&sip/5001&sip/5002 etc etc,etc.)

I have no voice mail defined for these extensions as  
customer wants all extensions to ring at the same time.  
I have this accomplished. and all sets ring as requested.

Any help would be appreciated…  
davemo

---

<div class="post-metadata">

**Author:** ![georgy](https://avatars.discourse-cdn.com/v4/letter/g/8edcca/32.png) [@georgy](https://community.asterisk.org/u/georgy)\
**Post date:** [September 1, 2007, 8:10pm UTC](https://community.asterisk.org/t/time-of-day-incoming-call-routing/16537/2 "2007-09-01T20:10:22Z")

</div>

Davemo  
[voip-info.org/wiki/view/Asterisk+func+iftime](http://www.voip-info.org/wiki/view/Asterisk+func+iftime)  
[voip-info.org/wiki/view/Aste … GotoIfTime](http://www.voip-info.org/wiki/view/Asterisk+cmd+GotoIfTime)

---

<div class="post-metadata">

**Author:** ![Davemo](https://avatars.discourse-cdn.com/v4/letter/d/a587f6/32.png) [@Davemo](https://community.asterisk.org/u/Davemo)\
**Post date:** [September 2, 2007, 8:38pm UTC](https://community.asterisk.org/t/time-of-day-incoming-call-routing/16537/3 "2007-09-02T20:38:40Z")

</div>

Thanks Georgy,  
I will study the documents.  
I appreciate your assistance in this matter.  
Davemo

---

<div class="post-metadata">

**Author:** ![Davemo](https://avatars.discourse-cdn.com/v4/letter/d/a587f6/32.png) [@Davemo](https://community.asterisk.org/u/Davemo)\
**Post date:** [September 5, 2007, 12:48am UTC](https://community.asterisk.org/t/time-of-day-incoming-call-routing/16537/4 "2007-09-05T00:48:24Z")

</div>

Hello Georgy,  
Thanks for the resources.  
I added the following to my dial plan.

[hours-of-business]  
exten =\> s,1,GotoIfTime(08:00-17:00|mon-fri|_|_?default,s,1)  
exten = \> s,1,GotoIfTime(17:01-07:59|Mon-fri|_|_?closed,s,1)  
Tested and works correctly.  
Thanks again,  
Davemo[Problem is solved]
