I have this working though not sure I’d recommend it in all situations where something like this is needed.
I’ll explain why after I show how this is done. If anyone knows a better way please share! This is all I could find on how to do this.
As the link I posted above explained, there are three parts to this in summary:
-
A ringing sound file or whatever you’d like. I created mine from a recording of a phones ringer that I already had in the office.
-
Create a .call file that contains the command to play back the sound file.
-
Modify extensions.conf with the config to allow the .call file to be referenced so that the sound can be played through the sound card when a call is coming in, and that the call can be passed to an extension which allows the call to be picked up.
Here’s the details:
As I said above I created a ringing sound file from a phone I already had in the office. I recorded it using voice memos on my iPhone, edited it in Audacity, then saved it and uploaded it via scp to my Asterisk server in /var/lib/asterisk/sounds. Actually sounds pretty good. All you need is one instance of the ringing. In my config the ringing sound file is called “Ringer.wav”
The next thing I did was create the .call file in /usr/local/bin
I named the .call file night.call
This is what is inside the file:
Channel: Console/alsa
MaxRetries: 0
Application: playback
Data: /var/lib/asterisk/sounds/Ringer
I use Alsa for my sound card so I think if you’re using OSS you’d have Console/dsp for your Channel instead of Console/alsa. Could be wrong on that.
Save and close that file.
Last thing is adding the needed info in extensions.conf
For me it is:
[nightbell]
exten => s,1,System(/bin/cp /usr/local/bin/night.call /var/spool/asterisk/outgoing/nightdate +%s
.call)
same => n,Dial(SIP/103,5.5,tTkK)
same => n,Goto(nightbell,s,1)
I’ve defined a timeout of 5.5 seconds because that seems to be the sweet spot. Basically what this does is it triggers the ringing sound file to be copied to a directory where Asterisk will play it through the sound card and it also rings extension 103. One it has done this for 5 and a half seconds, it does it again. This keeps the ringing sound going until the call is answered.
I have a call group set up for 103 so that someone can pick up the call from a phone on the production floor.
That’s pretty much all there is to it.
Now, here are some reasons why I may not recommend this as a solution. I’m relatively new to Asterisk so someone who knows a lot more than myself may say I am incorrect in these claims. But here goes:
In order to allow the call to be picked up, you have to send it to an extension configured with a call group that can be picked up by another phone in it’s pick up group at the same time the ringing sound is being played over the paging system/speakers. An example is that if I’m sending the call to extension 103 and that’s in call group 1, then all your phones that need to pick up those calls should be in pick up group 1. For some places this is no trouble as maybe they only use one phone to answer after hours calls. If there are going to be multiple phones used, I would try to send the call to an extension/phone created to receive the night ringer calls, preferably in the equipment closet.
To add to this if you have a phone that records missed calls, you will have a TON of them on whatever phone is receiving the night ringer calls. Each time the routine repeats in Asterisk to ring the phone and play the ringing sound again, it’s a new incoming call. Again, if there is only one phone where these calls are answered, it’s not much of an issue as missed call notifications on the screen are probably cleared when the phone is picked up.
Another potential drawback is that the night ringer will never go to Voicemail either. I believe there is probably a way to run this whole thing with a “loop” and then put voicemail at the end of that loop but I couldn’t figure it out. Again…I’m new to all this. In my case though my work has a pretty good size warehouse. The night supervisor is often out walking the floor and will need to answer calls from one of the workstations out there. The infinite ringing allows him the time to get to the phone, and if there’s no answer most people will just hang up and try again later. That line is primarily used only for employees or employee family members who need to reach them at work, so leaving messages is not necessary as the night supervisor would not be the one to check them.
Anyway, I hope this helps someone and if any of it was inaccurate I apologize for that.