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

    Good afternoon, dear readers. The story began in a small company, but with many departments separated by blank concrete walls. She occupied a few rooms in a high-rise building, and intercoms are popular in residential buildings today. The intercom is good, but when one handset and workers, some are not in place, then others, as a result of dynamic work, do not even know where to place it. In addition, running around to the tube is very distracting from work. Letting everyone in a row is not an option, the residents are very strict, all the more there was a sad case with the robbery of an old woman in this entrance. What can you come up with to please the residents and employees of the company? The answer was found on the Internet "Cross PBX with intercom" and preferably inexpensively.


    It’s good that the company has its own software exchange 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 inform colleagues, do not charge mobile phones and do not run around the office with them when the call is intended for another department. Therefore, it was decided to start the intercom at the PBX by 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 dummies. The site of PASKAL Electric LLC , not particularly credible, was chosen(probably this should look like sites of real "soldering irons" a joke :). I found teledomofon@mail.ru mail on it and voiced the request “I want the Pascal-1510 board”. I wrote to the post office, since 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 details sent). It is not strange, but the guys worked surprisingly quickly, even the Russian Post delivered the Pascal-1510 board in about a week. It seems as if while I thought it was already sent to my address :) I

    image

    unpacked the parcel 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 “Plus” and where “Minus” (this info is in the instructions), and on the intercom there was a sticker + and -. So I didn’t have to guess. Inserted into the productPascal-1510 telephone wire to the designated port (FXO). The same telephone wire from the other end, I included Cisco SPA112 in a free FXS port (there are two of them). On some models, the Chinese wrote Phone1 and Phone2 on these ports, I have written FXS1 and FXS2, but this is not so important.

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

    interface- This is a port that enables the subscriber to connect to an analog telephone line. In other words, the “wall outlet” provides a station signal, provides battery power to the line and the voltage needed to make the call.

    The FXO interface is a connector into which an analog telephone line is connected. This is the connector on the telephone or fax machine or the connector / sockets on the analog PBX. Such a port has an indication of the state of the off-hook / off-hook telephone (circuit circuit). Since ports (sockets) are part of a device, such as a telephone or fax, such a device is often referred to as an “FXO device” or “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 tabQuick Setup I configure Line2

    Proxy: enter the IP address of our soft PBX
    Display Name: domofon
    User IP: phone number that was allocated on the PBX for the doorphone
    Password: password, set on the PBX so that the number is registered
    Dial Plan: S0 <: queue number on the PBX>

    Perhaps that's all, I only increased the volume a little more on the gateway.

    Next, go to the PBX (Elastix)
    On the PBX tab - Queues (Add Queue). As usual, I added the queue from the necessary phones, set the waiting time and, in case of no response, transfer to another queue (on which I actually start ringing all the remaining phones at once). Anyone who picked up the phone can find out: who came and what he needs, conversations are recorded. To open the door during a call, press 0, end the conversation # - these are all standard functions of the device. Now the company got rid of the need to run to the phone and the role of a butler, dispersing the function to all employees, minimizing the useless waste of time.

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

    where 8XXXXXXXXXX is the
    AAAA office mobile phone - the internal number of the intercom on the PBX
    , - commas are pauses
    0 # - open the door and put the receiver down.

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

    It’s hard to collect all the keys when an organization is saving. This way of opening the door is useful to people like me, or to those who forgot the key somewhere at home, or jumped out for cookies for 5 minutes, forgetting the keys in the office.

    I would also like to do so that it can be opened by extension number from the intercom. But after dialing the apartment number, the “METAKOM” intercom does not emit any more signals when you press the numbers. The answer begs: either it is analog, or the possibility of extension dialing is blocked. Maybe readers have ideas? I'm really a small specialist, but I try to figure it out as far as possible. There is of course an idea, even if the intercom and analogue or the possibility of extension dialing is blocked - nobody will forbid me to say a keyword into it. Well, you understand what I'm leading to - speech recognition. With my level of knowledge, it is not yet feasible. Though articles on this subject came across on Habré. It would be nice if I pressed the apartment number or called on my mobile phone - said the magic word “Open” and the door opened. Even outsiders standing nearby didn’t understand anything and they didn’t peep at the door opening code, they considered it as if a person had opened it. I hope this article helps someone.

    Sources of knowledge:
    PASKAL Electric LLC Do-it-yourself
    Smart Home
    Blog about a smart home / apartment
    Automatic dialing of additional codes for Android contacts

    Also popular now: