Can it be done?

I am new to asterisk, and looking for a solution to a problem.

Can I have asterisk look at the incoming phone number and react differently depending on 1) the number and 2) the time
example:

CALL FROM #########1 would pass-through to our already setup phone system.
CALL FROM #########2 would check the time, if between 8:30-5:00 MON to FRI, pass-through like #########1, but if outside of those hours, forward to EXTERNAL #########3 (cell phone).

Secondly, can asterisk look at a database to pull up the times and destination numbers?

Thanks to whomever answers!

Yes its possible, for the CID conditions you can use GotoIF or ExecIf commands, for the time conditions you will use GotoIfTime command.

And Yes Asterisk can use with realtime integration with ODBC or MYSQL.

[quote=“servillian”]I am new to asterisk, and looking for a solution to a problem.

Can I have asterisk look at the incoming phone number and react differently depending on 1) the number and 2) the time
example:

CALL FROM #########1 would pass-through to our already setup phone system.
CALL FROM #########2 would check the time, if between 8:30-5:00 MON to FRI, pass-through like #########1, but if outside of those hours, forward to EXTERNAL #########3 (cell phone).

Secondly, can asterisk look at a database to pull up the times and destination numbers?

Thanks to whomever answers![/quote]

is it something like this ?:
viewtopic.php?f=13&t=67976&start=0

Beware of the version of asterisk. 1.6.xxx is the separator ,
and iv you have version 1.4 or lower its |