Changing/removing ring tones based on scripting

Hi all,

I will start by saying I am a FreePBX/Asterisk newbie, so please be gentle with me.

I am currently playing around with a “proof of concept” for my local community based radio station. I am looking at replacing our current PSTN phones with a FreePBX setup and would like to include some scripting into the install.

As of the extensions would be in radio studio environments, I would like the phones to not make an audible ringing tone only when the microphones in the studio are live.

The broadcast panel we use can output a closed circuit when the microphones are live. As I am using freepbx on a raspberry pi, I can easily interface this with the GPIO ports and return the port value in a python script.

What I am struggling with is how to configure the scripting on the asterisk side of things.

Additionally, I am hoping to do this at the extension level rather than at the ring group configuration as I would prefer the phone to ring in the studio that ISNT on air at any given time.

Any advice or script samples would be greatly appreciated.

thanks everyone.

Back in the 1960s and '70s, we did this much easier.

We used the Microphone “active” relay to turn on the “On Air” light outside the door and silenced the external ringer on the phone. We then silenced the ringer on the “in studio” phone and left the line lights enabled.

Thats exactly what we have now!

We are just lacking in a number of other areas and thats the reason I want to replace our current system with an IP PBX.

Conceptually, the methodology is still sound.

The thing I’d advise against the Raspberry. The SD-Cards that are used are not designed for the write-read cycles that a PBX typically generates in a commercial setting - for a house where you get three or four calls a day, they’re probably fine, but in a place that takes 60 calls an hour, the SD-card solution isn’t going to cut it.

So - let’s think outside the box. You want a SIP ringer that can be disabled by the ON-AIR light. Add to that the features of FreePBX and you have yourself a real power-house.

So, how do we get there. Let’s apply a little inverse programming logic to the problem. Are you hard over that the ringer MUST BE at the extension? Could a remote extension work? How about this:

Set up an extension ringer that only rings when the on-air light is off. On the actual phone, you set the extension’s ringer off all the time, but set the extension’s BLF to blink when the phone is ringing. You could do that with an DPDT SSR (solid state relay). When “open” the ringer circuit is closed and the ringer (bell) is allowed to ring but the On-Air light is off. When “closed” the ringer is disabled, but the On-Air light is on.

You could, of course, get tricky and set it up an Arduino as a really dumb phone that sits on the extension (in a two phone PJ-SIP extension set) and matches the ringer information for the phone. If you got carried away, you could even program the Arduino to do different ring tones if you wanted to.

Just food for though. In the short term, getting off the POTS/Key system and onto a SIP system is going to be a really good idea for your folks, especially once they start to see the ways you can merge things like playlist management with phone services, and a whole list of things they can’t even imagine yet.

Thanks for the feedback cynjut.

Thinking about your feedback, I agree that disabling the ringer in the phone and using an external unit is by far the best idea and I am going to base the solution around that for my proof of concept.

The Raspberry Pi: I am using it as the proof of concept at this stage. Going into a production space, i think i would use something else thats more fit for purpose.

Thanks for the feedback, I appreciate it.

If you use Sangoma phones we have a sip notify you can use to control the ring volume. We use it in ring groups , queues and lots of other places. It would be simple for you to set the same sip notify in ring.

1 Like