Night bell/ringer via soundcard

I’d like to figure out how I can create a night bell/ringer on my Asterisk 13 setup.

I already have paging out of the sound card working. I want to somehow send a ringing sound through that to an overhead paging system, while at the same time allowing the ability to actually answer that call via one of the phones on our manufacturing plant floor.

I’ve seen some very old tutorials for this that aren’t complete or have a lot of depreciated stuff in them. Can’t seem to find anything recent(less than 6 years old or more.)

Does anyone have any info on more recent ways of doing this? Any help would be greatly appreciated, thanks.

I believe you can dial ‘Console/dsp’ in your dialplan if you have chan_console loaded.

Dial that along with your other devices like SIP/bob or PJSIP/markster and it should ring simultaneously with them.

1 Like

Thanks. I am able to dial the console, but I already have it set to auto answer for paging so it just picks up, and I basically am able to just page at that point which is obviously not the intended result. I tried it without auto answer and no sound comes out of the speakers at all, but it does ring on the caller’s side.

I would like to have a sound played over the speakers to alert the employees working that a call is coming in, and then when they do a call pickup on one of the phones, the sound stops and they can answer the call.

I’ve been able to get console/alsa to play a sound when a call comes in, but there’s no ringing on the other end of the call because in Asterisk’s eyes the call was answered when the sound began to play.

The configs lead me to believe you can create different devices in chan_console.conf

Try seperating your ringer from your intercom and only setting auto-answer on your intercom.

Try to dial them as Console/intercom and console/ringer

input_device = default
output_device = default
autoanswer = yes
active = no

input_device = default
output_device = default
autoanswer = no
active = yes

In my /etc/asterisk directory I don’t have “chan_console.conf”

I have a console.conf and that seems to do something, as I put in the suggested config and it seemed to acknowledge the settings were there, however it didn’t work as expected.

Now when I try to page it rings instead, but no ringback on the caller’s side.

When I try to call, it auto answers and pages instead of ringing. Seems like the opposite. Double checked my extensions.conf and I don’t think I made any errors.

I have this in extensions.conf for the two different features. I have them each set up in a context:


exten => 1,1,Page(console/intercom)


exten => 1,1,Dial(console/ringer)
same => Hangup

I’m afraid you will have to let someone else give helping you a try then as I’m out of ideas and I’ve never used chan_console personally no do I have a physical machine handy to try it out.

Sorry I can’t be more of help.

It’s no problem I’ve appreciated what you’ve offered.

This guy had something here:

It’s old but it might work.I will try and let you know.

Actually got that working…sort of.

When I do the call pick up the sound does not stop. The person who originally posted this solution said it stopped when the phone was answered.

Interesting. More to come…

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:

  1. 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.

  2. Create a .call file that contains the command to play back the sound file.

  3. 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

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:


exten => s,1,System(/bin/cp /usr/local/bin/ /var/spool/asterisk/outgoing/nightdate
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.


So as those who have read this may recall, I wasn’t the biggest fan of how the original method I posted above worked out.

With some work I now have this instead(edited with a better way):


exten => 1,1,System(/bin/cp /usr/local/bin/ /var/spool/asterisk/outgoing/night`date +%s`.call)
same => n,Wait(5)
same => n,Goto(1,1)
exten => 2,1,Dial(SIP/501)

exten => 298,1,Dial(LOCAL/1@nightbell/n&LOCAL/2@nightbell/n,25,RkKt)
same => n,Voicemail(500@vm,u)
same => n,Hangup

In a nutshell this plays the sound once, then waits 5 seconds, then plays it again. I have it set for about 25 seconds in total of ringing, which is what I was going for. If you answer the call the ringing stops, and best of all it doesn’t leave 1289782389723489 missed calls on your receptionists phone, or whichever phone you’re ringing to initiate the call.

Thanks to @johnkiniston for telling me about local channels in another post I had made about paging. Without that this would not have been possible. At least…not as quickly :slight_smile:

If anyone is interested in using the ringer file I used for this solution, or can offer information on how to improve it further, just let me know.