Time based Extension Availability

Is there a way to make specific extensions have time based availability?

For example, from 8am to 11am, the extension should go directly to voicemail, from 11am to 1pm it should ring, then from 1pm to 5pm it should go to voicemail.

not enough info, but you can do this with time conditions/timegroups.
tc1 - if time is between 8 & 11 am, match destination is voicemail, unmatched destination is tc2
tc2 - it time is between 11am and 1PM, match destination is the extension, unmatched destination is voicemail

How can that be done though? I don’t see any options on the extension for applying time conditions.

As for more information, I’m not sure what more there could be.

If the extension is attempted, time conditions should be applied. This could be a direct dial, transfer, queue membership; anything. If a call tries to go there, the time conditions should be honored.

there are probably better ways to do it, but you could use a virtual extension as the routing vehicle and push that as the extension number. i.e. everyone uses the virtual extension. the virtual extension can route to time conditions via the follow me no answer destination.

inbound route -> time condition -> extension

that works of course, but he said he also needs it to work on transfers,and internal dialing as well which is why i suggested a virtual extension

Sounds like it’s just not possible then. I’m not looking for a work around or a kludge, I’m looking for a way to make an extension not ring (in EVERY context of an extension) during a specified time period.

Any of those options simply don’t work in every case an extension would work - e.g. a directory won’t go to time conditions or misc destinations; and if misc destinations were in play, people would get confused.

e.g. User 1’s extension was 200. Create misc destination for 200 to go through time conditions, and make their extension 2000. Now when they dial another user, they see 2000 instead of 200 on the caller ID. Confusion ensues.

I’ll investigate to see if I can somehow script turning DND on/off based on time, that might work.

Looks like this will work:

http://www.mehrdust.com/archives/how-to-list-all-dnd-enable-extensions

I’ve tested the commands and they seem to work properly by "asterisk -rx “database put DND xxx YES” (or NO) to enable/disable DND.

I’ll run these from the OS crontab to accomplish the desired result

That command didn’t work for me, is that because i’m on version 12?

Tell us what you actually did, and what you are trying to do, as well as why you resurrected a five-month-dead zombie thread…

When I first set the command I get what must be the Asterisk prompt then issuing the command again gives me:

[[email protected] ~]# asterisk -rx "database put DND 001 YES

asterisk -rx "database put DND 001 YES
Usage: database put
Adds or updates an entry in the Asterisk database for
a given family, key, and value.
[[email protected] ~]#

I resurrected the thread due to my awesome ability to use Search rather than start a new thread about an already asked question, has the etiquette changed? :smile:

Clearly not that amazing at searching as it’s in “Applications”

I’m not getting full menus, i need to see if this a browser issue.

Maybe you forgot the closing quote ?

Yup Dicko, exactly as I had done. I’m loving Freepbx mate and I think I’m just in too much of a hurry to get it all done and I i miss things :smile:

Thanks anyway

Maybe worth pointing out to anyone trying this that asterisk -rx “database put DND xxx YES” does put the extension (xxx) into DND but asterisk -rx “database put DND xxx NO” doesn’t take it back out, the correct syntax is asterisk -rx “database del DND xxx”

just sayin’

Always a good thing to RTFM :slight_smile: , this one is good . . .

http://www.asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/asterisk-CHP-6-SECT-6.html

Lol thanks Dicko.
Yup, I’m a noob but there’s good reason.
My motivation to do this stems from the hatred of a 17.50GBP/month fixed line that only ever gets used to say “No thanks” to the multitude of PPI calls.
I saw a Cisco 7940G with power supply and on SIP on fleabay for a tenner and it could play Jack Bauer’s ring tone, RESULT!!
I found Orbtalk who could set me up on pay-as-you-go and that would get rid of the bill since I had internet anyway.
I couldn’t for the life of me get the 7940 to talk to Orbtalk though and their customer support said they would not help with the 7940 as it was never intended to be on SIP anyway! They subsequently added that they could only offer help if I then connected through Asterisk…
And here I am, fully working btw :smile: