DOMIQ, SIP and Mobotix cameras

This tutorial is the second in the series in which we present integration of Mobotix devi- ces with the DOMIQ system. The main subject of this tutorial is the implementation of vi- deo door station functionality using mobile devices and Mobotix T24 video door station.

By reading this manual you will learn how to:

  • use the SIP protocol to establish audio-video connection between Mobotix T24 and mobile devices (iPhone / iPad and any Android device),
  • use the SIP protocol to establish audio-video connection between two Mobotix came- ras: video intercom (Mobotix T24) – internal camera (Mobotix Q24), with additional use of DOMIQ/Display touch panel,
  • integrate DOMIQ system with Mobotix cameras.

Configuration presented in this tutorial was made based on the Mobotix Q24 camera and the Mobotix T24 video door station. Both devices support SIP protocol and both can operate as a SIP server.

This tutorial does not contain issues related to the SIP protocol.

1. Integration optionsBased on the conducted tests, we have developed a detailed configuration in order to in- tegrate the video door station with:

  • a mobile device,
  • an internal camera and DOMIQ/Display.Both solutions may have different variants. You can also use a combination of both solu- tions in one installation.1.1. Integration with mobile devicesIt is a very useful solution, especially when you are away from home. It allows you to an- swer an incoming call from the video door station using a mobile device (iOS or Android) in any location. This solution is also very convenient when you are outside the building (e.g. in the garden etc.), but in range of local network to which the video door station is connected. Then you can also answer an incoming call from the video door station, open the gate/door using your tablet or smartphone.What is necessary?

Mobotix T24 video door station

A tablet or phone with an installed SIP client.

Remote connections can be established in two ways:

  • by assigning a public IP to a video door station (requires appropriate configuration of the router),
  • by using the VoIP telephony.

1.2. Integration with an internal camera and DOMIQ/DisplayThis model allows to achieve video door station funcitonality using an internal camera, DOMIQ/Display touch panel and video door station mounted outside the building. In this case, when the bell button is pressed, the video door station calls the internal camera (via SIP). However, Display panel shows preview from camera outside and control buttons (to open gate/door/wicket, turn on the lights, etc).The microphone and speaker built in the internal camera allows two-way communication.What is necessary?

  • Mobotix T24 video door station,
  • Mobotix Q24 camera,
  • DOMIQ/Display touch panel.

Each of the described solutions can be used separately or as combination of both mo- dels. For example when you are away from home, the system will call your mobile device on the basis of information from the Satel alarm system. However, if you are at home, then the solution with touch panel and internal camera will be used.

2. SIP configuration

Both Mobotix devices mentioned in the introduction can operate as a SIP server. It means that such device can handle audio-video connections between two devices (clients) registered to that server. Bear in mind that each Mobotix device can also act as a client at the same time. In other words, you can call the camera.

In the next parts of this chapter, we present an examplary configuration of a SIP server implemented in Mobotix T24 Video Door Station and configuration of a SIP client (appli- cation) on iPhone.

2.1. SIP server configuration
Configuration of a SIP server implemented in the Mobotix T24 video door station is as follows:

  1. Log in into camera’s configurator and select the Admin Setup.
  2. From the Audio and Phone section select the VoIP Settings.
  3. In a new window configure parameters according to the following list:
    • Setup ModeExpert Setup;
    • VoIPEnabled;
    • Parallel DialingEnabled;
    • User Name: enter the name assigned to the camera;
    • SIP Domain: in case of local network, enter IP of video door station. In case of VoIP telephony, the SIP Domain will be provided by VoIP operator.
    • Registrar: In case of local network, enter IP used in the SIP Domain cell plus de- fault SIP port number (5061), for example 192.168.10.100:5061. In case of VoIP te- lephony, enter the ID assigned by the VoIP operator. Registrar serves as sort of data base, to which SIP nodes (clients) are registered. Registrar collects informa- tion about IP addresses and port numbers of SIP clients and use it to handle con- nections. In other words, registrar is a router in SIP protocol.
    • SIP ID: enter the name of camera or ID assigned by the VoIP operator.
    • SIP password: in case of local network, type any password. Otherwise type pas-sword assigned by VoIP operator.
    • Use as Outbound ProxyEnabled.
    • NAT traversal (only for remote connections): Use STUN server.
    • NAT Address or STUN server (only for remote connections): enter STUN server address. In the most cases VoIP operators provide its own STUN server.
    • Welcome Message for Inbound CallsEnabled. This feature allows to play any audio file after connecting the camera.
    • Auto Hide OSDEnabled;
    • Setup OSDDisabled;
    • VideoEnabled;
    • Video SizeTV-CIF, which corresponds to a resolution of 352×288 pixels. It is also the maximum available resolution of the transmitted image.
    • Video Bit Rate: Set this parameter, depending on bandwidth of your Internet con- nection. The lower the value, the smoother the image, but lower quality.
    • Preferred CodecH264;

SIP Server is pre-configured. The next step is to create client accounts. Accounts will al-low clients to register to a server.

  1. Move to the top level of the Admin Menu and select the SIP Server Settings. In thenew window make sure that the SIP Server is set to Enabled.
  2. Click on the Add new SIP account and set its properties:
    • SIP Address: In case of local network enter any name. In case of the VoIP telepho- ny, enter the name assigned by the operator.
    • In the User Name enter the user name. Usually it is the same name as entered in the SIP Address field.
    • In the Password field enter a password that will be used to log in to a SIP server.Add as many accounts as SIP devices (clients) you expect to use. It is important to create an account for video door station/camera itself. Without it, it will not be possible to make calls from video door panel to other devices.6. Click on the Set button to confirm changes, next click on the Close button to save them.An examplary configuration of client accounts is presented in the picture below:

Now, when the client accounts are created, you can configure them.

7. Move to the top level of the Admin Setup and click on the Phone Profiles.

This window is used to create connection profiles with particular SIP devices (clients). Profile allows to define the type (audio only or audio and video) of connection, as well as the behaviour of the SIP server, after the connection is established. If you want to use the same connection parameters for several devices, assign them to the same profile. Note: Making a SIP call to a particular profile will initiate simultaneous calls to all SIP clients as- signed to this profile. When the call is answered by any of the recipients specified in the profile, the other connection attempts are canceled. In the next part of this tutorial, you will learn how to create events that generate such calls.

  1. Click on the Add new profile and set its properties:
    • Enter an unique name for the profile (left-top corner)
    • In the Phone Number or SIP Address enter the IP address of a device you want to connect to. Use names created in step 5. Phone number can be used only in case of using the VoIP telephony. To add more devices, click Add, and set up ano- ther device similarly.
    • Dial Attempts and Dial Timeout respectively, determine the number of calls and the time after which a call will be considered unsuccessful.
    • From the Connection type choose a connection type.
    • The Message name allows to choose the audio message type to be played whenthe connection is sucessful.
    • The parameter After the message has been sent determines behaviour of a se- rver after a connection is established. Select Intercom for bidirectional communication.
    • Set the Camera Remote Control to OnThis feature is very important for remo- te control of camera using SIP client (application). Usage of this feature is de- scribed later in this tutorial.
    • The Hangup after parameter determines the time after which the connection will be terminated.
  1. Click on the Set button to confirm changes, next click on the Close button to save them.

An examplary configuration of connection profie is presented in the picture below:

2.2. SIP client configuration

The SIP client can be a device with the implemented SIP protocol support, e.g. VoIP pho- ne or software, so called softphone installed on your mobile device (tablet or smartpho- ne). In this case, we will discuss the option with the software.

There are many SIP client applications available for free in the AppStore and Android Mar- ket. We tested some of them and we can recommend 3CX Phone. We discuss the configuration on the example of this application. The configuration is almost the same in the most applications.

The application is available for Apple devices and Android system. Its major limitation is the fact that there are only the audio conversations possible. When it comes to applica- tions which are not free, we can recommend Bria VoIP SIP Phone and Acrobits. You can freely choose the application but bear in mind that it is crucial for the application to:

  • display the numeric keypad during the conversation. Without this function, you will not be able to control the building automation system from the SIP application.
  • work “in the background”. If the application does not offer such functionality, it means that it must be constantly running and displayed on the screen, which is disqualifying for obvious reasons.

The configuration presented in the next part of this section was done on the iPhone. The appearance of elements can vary depending on the version of the application:

  1. Add a new profile.

2. In the Name field enter the profile name and in the Display name field enter the name which will be displayed to the recipient (in this case it is irrelevant).

3. In the fields User and ID enter the name assigned to a certain device while configura- tion of the SIP server, e.g. user1. Fill in the Password field similarly.

4. In the section Server settings:

  • The field Use as determines location of the device. Select In office, if you are in the range of the local network the SIP server is connected to. SIP Account is used if you use the VoIP telephony. Out of Office Tunnel is used if the device is not in the local network and the SIP server has the assigned public IP address.
  • Local PBX IP: local address of the SIP server. If you use the VoiP telephony, you can skip this parameter.
  • In the External PBX IP field enter the domain name or the public IP address of the SIP server.
  • If the VoIP operator has its own STUN server, enter its address in the field STUN Server. If not, you can use one of the public STUN servers, e.g. stun3.3cx.com.
  • If the operator requires the proxy server, add its address in the Proxy field. In case of local connection it is the SIP registrar address.

Other parameters may remain unchanged. The correct application configuration is confirmed by the following message: “On Hook“, which means a valid registration to the SIP server.

3. Define the events

Having configured the SIP communication you can define the events. The events may vary depending on the chosen scenario. In this case we chose the following scenario in order to show diversity:

If there is anyone in the building/apartment, then the connection with an internal camera is established with the DOMIQ/Display panel. Otherwise the remote connection with mobile devices is established. The presence of pleople is determined on the basis of the alarm system state. The presence can also be determined another way, e.g. by setting a MEM variable in the Base module.

An additional event will be User Click, which will be used to trigger any action in the buil- ding automation system, e.g. opening the door/gate etc.

In our scenario the events are triggered according to the following scheme:

If your scenario does not include verification of the presence of people in the building/ apartment and is only limited to starting a connection with the mobile device, then you can skip sending the IP notification to the Base module. In this scenario, perform only ac- tions from 5 to 8 which were described in section Sending below by changing the name of the group and the type of action to Phone Call.

3.1. Sending and receiving the IP notifications

The camera software works with the external software, so it is possible to integrate the video door station with the DOMIQ system, and thus with the entire installation of the intelligent building. Creating a simple rule the Base will receive information about each event which is triggered in the camera. Therefore the Base can react to e.g. pressing buttons on the video door station, motion detection, sound detection, etc. The situation can also be reversed: the video door station responds to the received IP message with a specified contents.

In this case, we will create two profiles: one will be responsible for sending the notifica- tions to the Base in order to inform about any events generated by the video door station. The second profile will enable to send the IP notifications to the external camera informing that the bell button was pressed. It is necessary so that the internal camera can play a beep when the bell button is pressed. If you are not going to use an internal camera, you can skip creating the second notification profile.

Sending

Due to the fact that the definition of the profiles is very similar, we will present a generali- zed procedure. In areas where the differences appear, we included appropriate descriptions.

  1. In the configuration interface of the video door station choose Admin setup.
  2. In Transfer Profiles select IP Notify Profiles:
  • Click on Add new profile at the bottom of the screen.
  • In IP Notify Profile enter the profile name, e.g. Base for the notifications sent to theBase and e.g. Bell for the notifications sent to the internal camera.
  • From the list IP Notify Type select Custom Configuration.
  • In the field Destination Address enter:• in case of the Base module <Base module IP>:4224 e.g. 192.168.10.20:4224.• in case of the internal camera: <camera IP>:8000, e.g. 192.168.10.30:8000.
  • Select the option Raw TCP/IP in Data Protocol and Plain text in Data Type.
  • In the last field define the contents of the contents of the notification. In case of the Base module it is the notification that contains the name of the event which was triggered in the video door station:<identifier_name>=$(EVT.EST.ACTIVATED). In this case: MOBO- TIX.event.t24=$(EVT.EST.ACTIVATED). It means that the name of the actionwhich triggered the event will be received by the Base module as a following com- mand: C.MOBOTIX.event.t24=<event name>. If the bell button is pressed, it is the following command: C.MOBOTIX.event.t24=CameraBellButton.In case of an internal camera, you can send any message. e.g. bell. Having re- ceived such a notification, the internal camera triggers a programmed event. The event definition was presented in the next part of the tutorial.

An example configuration is shown below:

3. Click on Set in order to approve thec hanges and then Close to save them in the device memory.

Now determine the action which should be taken when the bell button is pressed:

4. Click on Setup Menu and then Action Group Overview.

5. Add a new group (Add new group) and then set its parameters:

    • Enter the group name, e.g. Door bell.
    • Choose Enable from the drop down menu.
    • In the section Event Selection select CameraBellButton.
    • In the section Actions add a new action (Add new action) and then choose from the list: IP Notify:<profile name>, in this case IP Notify: Base and IP Notify: Bell.
    1. The configuration is ready. The above defined IP notifiactions will be sent everytime the bell button is pressed.
    2. Click on Set in order to approve thec hanges and then Close to save them in the device memory.

    Receipt

    The events in the video camera can be invoked by a message with a given contents which is received via TCP/IP.

    Getting back to our scenario, depending on the state of the alarm system one of two ac- tions will be taken: connection with a camera in the building or a remote connection with a mobile device. To provide support for both actions, you should define two independent events that will be triggered by different IP messages. The message with the contents local will trigger a local connection (to the camera), while remote will trigger the remote connection (with mobile devices). To do this, you should define two independent IP notifi- cation profiles. Due to their similarity we will present a generalized procedure. In areas where the differences appear, we included appropriate descriptions.

    1. Select Setup Menu and then Event Overview.
    2. In Message Events click on Edit.
    3. In the new window click on Add new profile and then fill in the profile properties:
      • Enter its name (upper-left corner of the screen), e.g. local call for local connections and remote call for remote connections.
      • Make sure that the option String compare is checked.
      • In the Message field enter the message that will call the event. Do not use spaces.In this case: local for local connections and remote for remote connections.
    4. Click on Set in order to approve the changes.
    5. Go back to the main level of the Setup Menu and select Action Group Overview.
    6. In the new window add a new group (Add new group) and then set its parameters:
      • Enter the name of the group, e.g. Local call.
      • Choose Enable from the drop down menu.
      • In the section Event Selection select Message: local call in case of local calls. For the remote connections choose Message: remote call.
      • In the section Actions add a new action (Add new action) and then choose the re- cipient of the connection Phone Call: <profile>. Instead of <profile>, for the local calls select the profile name the video camera was assigned to. Select the connec- tion profile for the mobile devices in a similar way.
    7. ClickonSetinordertoapprovethechangesandthenClosetosavetheminthedevi- ce memory.

    In the next section we will show you how the Base can process the IP messages received from the video door station and how to send the TCP/IP messages with a given contents from the Base.

    3.2. Reaction of the Base to the IP notifications

    Having defined the events in the camera, we can proceed to create the event in the Base, which will be triggered by the IP notification from the video door station. Depending on the state of the alarm system, the Base module responds with an IP message with the specified contents.

    1. Select the Events tab in the Base configurator.
    2. Add new events and fill in its properties:
      • Add description of an event (optional).
      • In the Channel field enter: C.MOBOTIX.event.t24 .
      • In the Data field enter: CameraBellButton. The event will be called after pres- sing the bell button.
    3. Click on Add command… . In the displayed window in the Name field enter: C.LO- GIC, in the Value field enter: sipCall().
    4. Paste the following code in the Logic tab:
    function sipCall()

    -- instead of <number> enter the number of the zone which determi- nes if someone is in the building/apartment

    local isArmed = use 'IDS.armed.<number>'
    -- instead of <ip_address> enter the IP address of the video door

    station
    local address = ”<ip_address>”
    if isArmed.value == 0 then
              command ('C.TCP.send.'..address..':8000','local')

    -- instead of <screen_name> enter the name of the visualization which contains the preview from the video camera.

              command ('C.DISPLAY.screen’,’<screen_name>’)
    else
              command ('C.TCP.send.'..address..':8000','remote')
    end

    end

    The program checks the state of the alarm zone, which determines the presence of people in the building. Depending on the result it sends the appropriate message: local or remote to the IP address of the video door station. Then the messages are procces- sed in accordance with the configuration presented in the section 3.1.Sending and re- ceiving the IP notifications

    3.3. Control during conversation

    In the section describing the SIP application we paid the attention to the function that al- lows you to display the numeric keypad during a call. In the description of the SIP server configuration we mentioned that the Camera Remote Control parameter should be set On. A combination of these both functions allows to control the video door station directly, as well as the building automation system indirectly from the SIP client application.

    Mobotix devices have been equipped with the functionality to receive commands sent using numeric keypad of the device, which established the the SIP connection. Among the available commands the one that deserves special attention is assigned to the digit 6. After pressing and confirmation with #, there will be sent a command that triggers the event which is built in the video door station named User Click. As you can probably guess, there is only a only step to create the event in the Base module, which will react in case it appears. After receiving the event, the Base module can perform a freely programmed sequence of actions, e.g. the opening of the gate/door, turning on the lights, etc.

    In order to define the already mentioned events, proceed as follows:

    1. In the camera configurator click on Setup Menu and then Action Group Overview.
    2. Add a new group in the new window (Add new group) and then set its parameters:
      • Enter the group name e.g. automation control.
      • From the drop down menu select Enable.
      • In Event Selection select UC – User Click.
      • In Actions add a new action (Add new action) and then select from the list IP No- tify:<name of the already created profile>, in this case IP Notify: Base. So the Base receives the information everytime the event of the User Click type is triggered.
    3. ClickonSetinordertoapprovethechangesandthenClosetosavetheminthedevi- ce memory.
    4. In the configurator of the Base module select the Events tab.
    5. Add a new event and fill in its properties:
      • Enter the event description (optional)
      • In the Channel field enter: C.MOBOTIX.event.t24 .
      • In the Data field enter: UC.
      • Define action (actions) which will be performed if the User Click event is received – e.g. opening the door/gate etc.

    3.4. Reaction of the camera inside the houseIf you are not going to use the camera inside the house, you can omit this section.In section 3.1.Sending and receiving the IP notifications we defined the IP notification pro- file which sends the notification from the video door station to the internal camera when the bell button is pressed. It is also the signal that informs about incoming SIP call from the video door station. The definition of the event is as follows:

    1. Select Setup Menu Event Settings IP Receive (RC).
    2. Fill in the parameters as follows:

    IP Receive Message should be filled according to the definition of the IP profile in the vi- deo door station.

    The next step is to define the sound profile that should be played.

    1. Select Admin Setup Audio and Phone Sound Profiles.
    2. Add a new profile and name it.
    3. Choosethesoundwhichshouldbeplayed.InLoopCountenterthenumberofsound repetitions.
    4. ClickonSetinordertoapprovethechangesandthenClosetosavetheminthedevi- ce memory.
    5. Click on Setup Menu and select Action Group Overview.
    6. Add a new group and name it, e.g. tcp, then click on Edit.
    7. From the list Event Selection select RC – IP Receive.

    10.Add a new action (Add new action). From the list select: Play Sound: <name of your profile>.

    11.Click on Set in order to approve the changes and then Close to save them in the devi- ce memory.

    Powered by BetterDocs

    Select your currency
    PLN Polish złoty
    EUR Euro