Connecting Intercom to VOIP


I am looking to connect a Hungarian intercom into my already existing FreePBX network as a trunk so that I can receive calls from it and open our gate remotely.

I already use an existing grandstream ATA, although unfortunately the intercom works on a proprietary bus system that is used all over in Hungary. You can readily purchase parts for this system here, and I can get a simple phone board, which has an internal RJ9 connector for the handset, and 2 buttons, one for pickup/hangup and one for opening the gate.

My curiosity is if anybody has ever connected a system like this into perhaps an ATA or using a raspberry pi to turn these signals into a SIP trunk.

Thank you for any advice / wisdom :slight_smile: !

FreePBX is SIP based, but what you propose sounds like what I would do. An ATA to convert the digital/analog to SIP. Ideally that would be enough, but it sounds like that is not true.

If you had a PBX on the PI, you could make the ATA dial a number as soon as it goes off hook. The number that is called could go to a custom dialplan that triggers a script that causes the PI to do what is needed.

At that point I have to ask, given the equipment and cost of effort, would it be more cost effective to just upgrade the intercom to a SIP or a true ATA compatible one?

Unfortunately, we are stuck with this system as there’s about 65 apartments, so we would have to pay the cost of changing the wiring and the handsets for every single apartment in the building which is substantially more expensive than a Pi and a few relays.

I have actually been having good success as the pinout provides a place to connect a 5V light when the phone is ringing, which provides a reliable ring indicator, then I used linphone from CLI to dial a ring group. This has worked really well and on completion of call it puts it back on hook. I am stuck with the task of opening the gate.

I don’t want to open the gate every time of course, I was thinking of using one of the touch tones (IE press 1) to open the gate using some script on the Pi to listen to these tones, although it seems as though freepbx doesn’t pass these through to the other end of the call. I don’t know if there’s really a better way to send a signal from one end of a call to another? Perhaps a webhook would be nice if a button is pressed would be easy? I just don’t know the best way to implement either idea well in FreePBX.

Thank you again!

1 Like

You mentioned using an ATA box. I have used an ATA to do similar thing. We made it automatically call a number when the handset was off hook. Don’t know if that works in your case.

The problem I have found with using the ATA is that these phones are connected over a proprietary bus. My current solution is using a pi as an extension, and then a custom dynamic feature (#9) to signal a webhook to press the door open button. I’m effectively “tapping” the lines and then making the buttons controlled by relay instead of human. It’s not perfect, but my early tests look good. I will write a whole blog post at the end of this all.

1 Like

You could do this with your own dialplan. Have an active AMI listen for the DTMF and kick off the rest of your script with the correct party presses the correct button. This can also be done with custom feature codes that kick off the same script.

I have accomplished this by using a feature code (#9) to work as something that curls a url which switches my relay temporarily.

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.