Alarm clock function for Hotel


I come to you because I am in Asterisk 17.03 and I have a client (a hotel) who asks me to set up an alarm system.

I came across this web page: “

Is it possible now or do we have to adapt the code?

Thank you so much.

Have a good day.

That’s very old code, there are many ways to achieve this task. On of them is storing the alarm date on a DB and a cron job who run every 1 minute to check the alarm time and if match make the call with the originate command

Even if the code still works (expressing no opinion) a database, cron, and originate() will yield a more robust solution.

Call files work (they’re my ‘goto’ for hacking out cruft), but originate() will return a status that you can use to make decisions and handle conditions gracefully.

A database also makes it easy to answer questions like ‘how many wake-up calls do we process a day’ or ‘what percentage of wake-up calls were acknowledged by the occupant.’

1 Like


Thank you for your answers. how nice. @sedwards . @ambiorixg12

I don’t know enough about programming yet to do this myself. Do you have any examples to show me?

Thank you so much.
Have a good day.

You won’t find any ready-made examples that fit your requirements. Nobody knows (1) your preferred programming language (2) the Database, tables and the fields in which you store the wakeup call details.

The best way is to learn the concepts sedwards mentioned in his reply and implement them yourself in your project. You can start with Asterisk wiki and Asterisk: The Definitive Guide, a free book about Asterisk

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.