Audio connection with an intercom via SIP

  • Document number: PO-186-EN
  • Version: 1.0
  • Date of publication: October 13, 2022


For exemplary purposes, a DoorBird’s IP intercom is configured in this guide.

Two-way SIP connection

For the image version RP-LASH-010, v10.195 or higher

The first step is to log into your server by pasting its IP address into the browser. Next thing to do, is to open the Network tab, go to SIP and tick its status as Active. Save the settings and close the browser.

Our server has the following SIP users available:

  • 201 (login:201 ; password:201)
  • 202 (login:202 ; password:202)
  • 203 (login:203 ; password:203)
  • 204 (login:204 ; password:204)
  • 205 (login:205 ; password:205)

Click to enlarge and open in a new tab.

Next, log into the Ampio Smart Home Manager, go to the Objects tab and manually add a new object to the list. The object can be added to the server and its type should be specified as SIP. Now, open the advanced settings of the object.

Click to enlarge and open in a new tab.

In the first two rows, enter the SIP user details dedicated to an Ampio UNI user - select one of the available SIP users listed above, e.g. 203.

Then, provide the SIP user for your intercom. It must be the next free SIP user, which you will later configure in your intercom’s settings - in this case, we will use user no. 204.

If your intercom broadcasts an RTSP signal compatible with the Ampio codecs, you can paste a link to the camera directly into your SIP object. By ticking the option Save image in messages when the flag is triggered (use the device’s flag number) you can save images from the camera, provided that an RTSP link was used. More details on the configuration are provided later in this document.

Currently, the RTSP signal from DoorBird is not supported by Ampio UNI.

The next thing to do is to enter the ID of an object that will be responsible for opening the gate, together with the time within which it shall be achieved.

Add an object to a group and save the configuration on the server.

Now, let’s move on to configuring the intercom.

Intercom configuration

The DoorBird intercom is configured in its native mobile application in the Admin section.

After logging into the admin panel, open SIP Settings.

Click to enlarge and open in a new tab.

In the SIP Proxy field, add the IP of your server and then enter the SIP user’s login details that you used for the object created in the Smart Home Manager. In this case - user 204.

Save and navigate to the Allowed SIP Users tab.

Click to enlarge and open in a new tab.

Here you will add the Ampio UNI SIP user, whose details were also used in the SHM object settings - in our case, 203.

Save the settings and open the Ampio UNI app.

Click to enlarge and open in a new tab.

This is what the created object looks like in the Ampio mobile app - on a click of the CALL button, you will be connected to the intercom.

Preview of the intercom’s camera in Ampio UNI

If your intercom can broadcast an RTSP image that is supported by the Ampio app, you can see the image from the camera directly in the SIP object, as mentioned earlier.

In the case og the DoorBird intercom, you will need to create a Web View type of an object.

Click to enlarge and open in a new tab.

The image’s URL is as follows:

http://[login]:[password]@[IP_DoorBird]/bha-api/video.cgi

where:

[login] - is your DoorBird user login

[password] - is your DoorBird user password

[IP_DoorBird] - is your intercom’s IP address

After you tick the Save image in messages when the flag is triggered (use the device’s flag number) option in the object’s settings, as soon as a flag with the same number as your object gets triggered (in this case number 1), a snapshot from the intercom will appear in messages. All you have to do in order to have photos saved every time there is motion detected, is add the motion sensor status to the flag.

Generating an event no. 255 (DoorBird doorbell)

It is best to begin with adding an additional intercom user in the Ampio Smart Home and setting up a very complicated password for it. Call the user, e.g. Doorbird.

Then, set Doorbird to generate an event in the Ampio system via the API-HTTP.

In order to do that, enter the following link in your browser:

http://{DOORBIRD_API_USER}:{DOORBIRD_API_PASSWORD}@{DOORBIRD_IP}
    /bha-api/notification.cgi?
    url=http://{AMPIO_SERVER_IP}:8060/api/setEvent/255&
    event=doorbell&
    subscribe=1&
    user={AMPIO_DOORBIRD_USER_NAME}&
    password={AMPIO_DOORBIRD_USER_PASSWORD}

The link below should have the words and phrases in capital letter replaced with the following values:

  • DOORBIRD_API_USER - the DoorBird intercom’s user name, which is provided on the digital passport supplied by the manufacturer with the intercom, or a user name of a user created specifically for the purpose of generating the event no. 255,
  • DOORBIRD_API_PASSWORD - the DoorBird intercom’s user password, which is provided on the digital passport supplied by the manufacturer with the intercom, or generated for specifically created user,
  • DOORBIRD_IP - the intercom’s IP address in the local network, which can be obtained, e.g. on the router configuration website, by using IT network scanners, or on DoorBird’s website after logging in: https://www.doorbird.com/checkonline
  • AMPIO_SERVER_IP - Ampio server’s address,
  • AMPIO_DOORBIRD_USER_NAME - the intercom’s user name in the Ampio system,
  • AMPIO_DOORBIRD_USER_PASSWORD - the password created for the intercom user in the Ampio system.

An example of a link created on the basis of the above-mentioned pattern:

http://dwerex001:56fdsxXD3se@192.168.111.45
    /bha-api/notification.cgi?
    url=http://192.168.111.22:8060/api/setEvent/255&
    event=doorbell&
    subscribe=1&
    user=domofon&
    password=SDSEW#@#@#DEWKLDLKFD

It is also possible to use the user name and password directly in the link, as follows:

http://dwerex001:56fdsxXD3se@192.168.111.45
    /bha-api/notification.cgi?
    url=http://domofon:SDSEW#@#@#DEWKLDLKFD@192.168.111.22:8060/api/setEvent/255&
    event=doorbell&
    subscribe=1

Such a link must be copied into the internet browser and confirmed by pressing “Enter”. If the intercom receives the configuration correctly, it will give us the following feedback about a successful configuration:

{
    "BHA": {
        "RETURNCODE": "1",
        "NOTIFICATIONS": [
            {
                "event": "doorbell1",
                "subscribe": "1",
                "url": "http://192.168.111.22:8060/api/setEvent/255",
                "user": "domofon",
                "password": "SDSEW#@#@#DEWKLDLKFD",
                "relaxation": "10"
            }
        ]
    }
}

Generating an event in the DoorBird app

Adding the link is also possible in the DoorBird app, using the “Administration” tab. Choose the intercom that you wish to configure, and select “HTTP(s) Calls” from the list of available options. Then, enter a link that is constructed similarly to the one below:

http://domofon:SDSEW#@#@#DEWKLDLKFD@192.168.111.22:8060/api/setEvent/255&event=doorbell&subscribe=1

Practical use of the event

After performing the above-mentioned steps, pressing of the intercom button will trigger the event no. 255 in the system, which can be used to, e.g. activate the buzzer or flash the lights.

Remember that this event, similarly to all other events generated by Ampio API will not be visible to the server. Therefore, you cannot create conditions from the event.