TIPS Play Tone at Certain Times for a school

therock112

Member
Joined
Dec 13, 2007
Messages
143
Reaction score
0
Helping a local school with their piaf install.

the install is purple, ast 1.8, freepbx 2.10, polycom 331 endpoints

principal would like the phones to play a tone at 10am, 12:30 and 2pm monday to friday.

figured I would do a cron job on that.

but how would i get asterisk to play a tone from a cronjob fairly accurately without too much deviation from preset times?

I am looking for a reliable solution.

thanks for any suggestions.
 
You should check out the Paging Pro Commercial Module it allows you to use the GUI to set up scheduled pages or announcements. You can sign up for a portal account at pbxinaflash.com/support and follow this guide to prepare your PIAF system for commercial modules. (you may also want to take a look at the Park Pro module, as it includes a license for Paging Pro as well.)

Page Pro also allows you to hook paging groups into outbound routes. Example a class room can call 911, and the front desk or security office would be notified of the call and which extension it is coming from, and optionally barge into the call by pressing *1
 
Not to discourage using the Paging Pro module, which I'm sure will do the job quite easily through a nice GUI, but you can quite easily accomplish this with a cron and a call file. Construct a call file like this:

Code:
Channel: Local/9999@from-internal
CallerID: <1111>
MaxRetries: 1
RetryTime: 30
WaitTime: 45
Application: Playback
Data: tt-monkeys

and save it, as user asterisk, in a file called call.file. Change the file to play back (tt-monkeys), the CID you want to send (1111) and the paging group extension (9999). Then setup a cron like this:

Code:
0 10,14 * * 1-5    asterisk    /bin/cp /path/to/my/call.file /path/to/my/call.file.tmp && /bin/mv /path/to/my/call.file.tmp /var/spool/asterisk/outgoing
30 12 * * 1-5    asterisk    /bin/cp /path/to/my/call.file /path/to/my/call.file.tmp && /bin/mv /path/to/my/call.file.tmp /var/spool/asterisk/outgoing

That should be it. The cron will move the file /path/to/my/call.file to /var/spool/asterisk/outgoing at 10:30 AM, 12:00 PM, and 2:00 PM Monday through Friday, which will page your page group and play back your sound file.
 

Members online

No members online now.

Forum statistics

Threads
26,688
Messages
174,412
Members
20,259
Latest member
Fadeek86
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Back
Top