📜 ⬆️ ⬇️

Asterisk-Butler or epic Intercom connection with Pascal-1510 board, SPA112 gateway and PBX Elastix

Good afternoon, dear readers. The story began in a small company, but with a variety of departments, separated by concrete walls. She occupied several high-rises in a high-rise building, and in residential buildings intercoms are popular today. Intercom is good, but when one handset and the workers, then some are not in place, then others, due to the dynamic work, you don’t know where to place it. In addition, running to the tube is very distracting from work. Letting everyone is not an option, the tenants are very strict, especially since there was a sad case of robbing an old woman in this entrance. What can you think of to please the tenants and employees of the company? The answer was found on the Internet "Cross PBX with intercom" and preferably inexpensive.


It’s good that the company has its own software-based PBX based on Asterisk ( Elastix ) , which allows you to save the company's budget on calls, do not yell through the walls when you need to tell colleagues something, don’t charge mobile phones and run around the office with them department. Therefore, it was decided to start an intercom at a PBX after spending 900 rubles (Pascal-1510 device) + 300 rubles (mail) = 1200 rubles. Unfortunately, there are no special specialists on this topic, so we were looking for a simple option, so to speak for teapots. The not very trustworthy site of PASCAL Electric LLC was chosen (probably the sites of real “soldering irons” joke should look like this :). On it I found teledomofon@mail.ru mail and voiced the request “I want to pay Pascal-1510”. I wrote to the post office, because I did not find the usual order form, as well as the payment. Then he went to Sberbank and sent the money in an unknown direction (according to the sent details). It is not strange, but the guys worked surprisingly quickly, even the Russian Post delivered the Pascal-1510 fee in about a week. It feels as if, while I thought she was already sent to my address :)

image
')
I unpacked the package and found inside the instructions and the product itself. After that, the wires from the intercom were screwed to the Pascal-1510 board. On the board itself it is signed where is “Plus”, and where is “Minus” (this info is in the instruction), and on the intercom there was a sticker + and -. So it was not necessary to guess. Pasted into the product Pascal-1510 telephone wire in the port provided for this (FXO). The same telephone wire from the other end, I included in the free FXS port of Cisco SPA112 (there are two of them). On some models, the Chinese have written Phone1 and Phone2 on these ports, I have written FXS1 and FXS2, but this is not so important.

I will explain. Pascal acts as the FXO port, and CISCO SPA112 as the FXS .
FXS and FXO are the names of the ports to which PSTN analog telephone lines (also known as “public telephone networks”) are connected.

The FXS interface is a port that allows a subscriber to connect to an analog telephone line. In other words, the "socket in the wall" gives a signal to the station, provides the battery-powered lines and the voltage required for the call.

The FXO interface is the connector into which the analog telephone line is connected. This connector on the telephone or fax machine or connector / jacks on an analog PBX. This port has an indication of the status of the off-hook handset / handset on the telephone (short circuit). Since the ports (connectors) are part of a device, such as a telephone or a fax, such a device is often called an "FXO device" or an "analog device."

The FXO and FXS connectors are always paired, that is, they have a “plug” and a “socket”.

Further on cisco spa112 on the Quick Setup tab I configure Line2

Proxy: enter the ip address of our software PBX
Display Name: domofon
User IP: phone number that was allocated to the intercom PBX
Password: password, set on the PBX so that the number is registered
Dial Plan: S0 <: Queue Number for PBX>

Probably everything, I only slightly increased the volume on the gateway.

Next, go to the PBX (Elastix)
On the PBX - Queues tab. I added the queue of the necessary phones as usual, set the waiting time and if not answered, transfer to another queue (on which I actually start calling all the remaining phones at once). The one who picked up the phone can find out: who came and what he needs, conversations are recorded. To open the door you need to press 0 during a call, end the conversation # - these are all the standard functions of the device. Now, the company got rid of the need to run to the phone and the role of the butler, having dispersed the function on all employees, minimizing the waste of time.

But this is not all. It turned out, if you call a cellular or city company, but in fact, the Elastix PBX is tighter (we still have IVR configured). Add a number that we have allocated to the intercom, for spa112 . We will hear beeps - the intercom call and at this moment you can press the call of our apartment (office) on the intercom panel. Our cell phone and intercom will connect, after which you can chat or press 0 on the mobile phone - open the door and # - end the conversation. Thus, we put in the mobile phone a contact of the form 8XXXXXXXXXX, AAAA ,, 0 #

where 8XXXXXXXXXX is an office mobile phone
AAAA - internal number of the on-door speakerphone on automatic telephone exchange
, - commas are pauses
0 # - open the door and hang up.

Now you can simply call the contact in the mobile phone, after hearing the beeps instead of the voice IVR , press the apartment (office) number on the interphone panel and the mobile itself opens the door (this takes about 3-4 seconds).
Calls in the office are not distributed, either from the intercom or from the phone, so that we do not distract anyone from work. Mobile money is also not spent due to the tariffs of mobile operators.

All keys are difficult to gather up when the organization saves. This way of opening the door is useful for people like me, or for those who have forgotten the key somewhere at home, or jumped out for cookies for 5 minutes having forgotten the keys in the office.

I would like to do more so that you can open an extension from the intercom. But after dialing the number of the apartment, the intercom of the "METAKOM company" does not emit any more signals when you press the numbers. The answer suggests itself: either it is analog or the dialing capability is blocked. Maybe readers have ideas? I'm really a small specialist, but I try to figure out as much as possible. There is still an idea, of course, even if the intercom and analog or the possibility of dialing is blocked - then no one will forbid me to say the keyword to it. Well, you understand what I am talking about - speech recognition. With my level of knowledge it is not yet feasible. Though on Habré articles on this subject came across. As if it were good, I pressed the apartment number or rang the mobile phone - said the magic word “Unlock” and the door opened. Even nearby strangers did not understand anything and the code for opening the door was not peeped, they would have thought that the person had discovered it. I hope this article will help someone.

Sources of knowledge:
LLC PASKAL Electric
Smart House do it yourself
Smart home / apartment blog
Automatic dialing of additional codes for Android contacts

Source: https://habr.com/ru/post/231101/


All Articles