Create phone beeps after script runs

I have written a bash script that checks at a certain time each night and verifies that Night mode has been activated. I want to build on it to match it with some other features in the office. I would like the same three beeps that play at all the phone when you reload the config to also play after the script runs. Is there a way from the command line to fire off the indicator? Something like:

/usr/sbin/asterisk -r -x “play notification command”;

Any ideas how I could do it?


I think i sort of see what you are trying to do. If you create a file, call it or something, then put this in it. (here i’ve used 9000 as an example paging extension)

Channel: local/[email protected]
CallerID: beep
Context: custom-ring1
Extension: s1
Priority: 1

then add the following to extensions_custom.conf

exten => s1,1,Answer
exten => s1,n,wait(1)
exten => s1,n,Playback(beep)
exten => s1,n,Playback(beep)
exten => s1,n,Playback(beep)
exten => s1,n,Wait(1)
exten => s1,n,Hangup()

then to make it play the beeps you can copy the file to /var/spool/asterisk/outgoing

cp /ect/ /var/spool/asterisk/outgoing

this will then play the 3 beeps on the 9000 paging extension.

you could use crontab to automate this at specific times.

I didnt think about that aproach. Ill give it a test run. In freeBPX when you reload the config it makes a tone on all the phones. I was trying to recreate that from a command line. I guess I could also reload the config each time to do it. Although that could have unwanted consequences.

I assume these are Polycom’s? The tones you refer to are register messages caused by the sip reload. A harmless command.

However, you can send those on hook tones using the correct alert-info message in a SIP-Invite.

what phones are you using?

They are all Polycom SoundPoint IP 550 SIP phones.