Asterisk dynamic routing with MySQL database

Asterisk PBXFor the next task we will need Asterisk dynamic routing using MySQL: some company has technical department that should provide emergency services on non-working hours. Based on time and date conditions, a call should be routed to a shared department’s extension (technicians) or be sent to a man on duty on non-working time and weekends. A number to dial on non-working hours should be taken from a database during a call execution. In our example, we use MySQL database with a table that contains columns “day”, “month”, “technician” and “number”. The commented extensions.conf example is below:

Here is the func_odbc.conf example:

I hope this will help someone.
Good luck!

Want me to do this for you? Drop me a line: itgalaxyzzz {at} gmail [dot] com