Am 13.01.2013 03:17, schrieb Adolphus Enaboifo:
Hi List Members , its been about one months since I built my first Asterisk server. What I want to know is: are there ways to make Asterisk take recorded reminders. This is the scenario I have in mind.1 You place a call to a specific extension say 350. 2 On recognizing the incoming extension the reminder application at extension 350 prompts you to enter a number say 1 to record a message to your profile as well as input the time when the application will call you to playback the message. 3 or enter another number say 0 to playback all your recorded reminders in your profile.with options to add to the list or delete from the list. and of course there will be a limit on the amount of messages per user. Please if such applications exist can you guys show me how to configure it.
Hi Adolphus,this sounds like something that a little scripting + call files can do. There may be better ways (and others may point those out in a flash), but this is what springs to my mind:
- Have one directory for recorded audio for each user. Name audio files for their "target time", like 201301131500.wav - When someone calls "350" and presses "1", check the number of files in that directory. If more than MAXMSGS, deny. - If there is already a recording for the target time, deny. - Else prompt for target day (today, tomorrow...) and time. If a file for that date/time exists, deny. - Record file, move to the right directory - Create a call file on the same filesystem as the "spool" directory - "touch" it for the target date/time and move into call files directory You'd need some nice scripting later on to handle that outgoing call. If the messages is read (and possibly acknowledged by pressing "1" or the like), the sound file should be deleted. If either the call fails or the acknowledgement is not given, the sound file should be re-named to a new time (say, one hour later) and a new call file generated. A few things that also should be thought about: - To not have endless reminder calls over and over, you could have a "failed delivery counter" per user - once that reaches a certain threshold, say 5, the reminders can be emailed to the user and deleted from the spool. You can reset that counter if the counter file has a change date older than 2 days with a cronjob - so if no failed deliveries happen within 3 days or so, they will be activated again. Make sure the user is informed about this problem iff a file exists when he calls in to record a new message. - Do sane error checking. When the call file is fired and fails to find the "wav" file it expects, this should not trigger another call. Perhaps an email.... avoid endless loops. - It might be a good idea to have a variation in the "touch" to the call file such that the expected time is only precise in minutes. Like add a random number of seconds in the range (0...50, or even -180 to 180 if precision is not essential). Be sure to document that or users might complain that the telephone system clock is not space-age-precise (Lusers!) This should get around everyone wanting to be reminded of going home in time for the soccer match, and everyone typing in a reminder time of "1630". - You should monitor usage; there can be still quite a lot of calls to interesting times. Same problem that automatic window blinds have: If everyone sets the DCF controlled clock to open the shutters at 8:00 precisely, the start current of possibly many motors may be _noticeable_ for the power company. That is why those devices do not have and do not need clocks with ultra- high precision - some even vary the morning/evening action time by several minutes on purpose. BR AMH
smime.p7s
Description: S/MIME Kryptografische Unterschrift
-- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users