Transcript

DOMIQ, SIP and Mobotix camerasThis 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 additionaluse of DOMIQ/Display touch panel,

• integrate DOMIQ system with Mobotix cameras. Configuration presented in this tutorial was made based on the Mobotix Q24 camera andthe Mobotix T24 video door station. Both devices support SIP protocol and both canoperate 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 isconnected. Then you can also answer an incoming call from the video door station, openthe gate/door using your tablet or smartphone. What is necessary?• Mobotix T24 video door station• A tablet or phone with an installed SIP client.

DOMIQ, SIP and Mobotix cameras www.domiq.eu

© DOMIQ 2014 Page 1 of 13 TU-0012-140417

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 thiscase, when the bell button is pressed, the video door station calls the internal camera (viaSIP). However, Display panel shows preview from camera outside and control buttons (toopen 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

DOMIQ, SIP and Mobotix cameras www.domiq.eu

© DOMIQ 2014 Page 2 of 13 TU-0012-140417

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 configurationBoth Mobotix devices mentioned in the introduction can operate as a SIP server. Itmeans 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 aclient 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 serverimplemented in Mobotix T24 Video Door Station and configuration of a SIP client (appli-cation) on iPhone.

2.1. SIP server configurationConfiguration of a SIP server implemented in the Mobotix T24 video door station is asfollows:

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 Mode: Expert Setup;• VoIP: Enabled;• Parallel Dialing: Enabled;• 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 ofdata 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 Proxy: Enabled. • 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 Calls: Enabled. This feature allows to play any

audio file after connecting the camera.• Auto Hide OSD: Enabled;• Setup OSD: Disabled;• Video: Enabled;

DOMIQ, SIP and Mobotix cameras www.domiq.eu

© DOMIQ 2014 Page 3 of 13 TU-0012-140417

• Video Size: TV-CIF, which corresponds to a resolution of 352x288 pixels. It is alsothe 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 Codec: H264; SIP Server is pre-configured. The next step is to create client accounts. Accounts will al-low clients to register to a server.4. Move to the top level of the Admin Menu and select the SIP Server Settings. In the

new window make sure that the SIP Server is set to Enabled. 5. 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 inthe 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 tocreate an account for video door station/camera itself. Without it, it will not be possibleto 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 asthe behaviour of the SIP server, after the connection is established. If you want to use thesame connection parameters for several devices, assign them to the same profile. Note:

DOMIQ, SIP and Mobotix cameras www.domiq.eu

© DOMIQ 2014 Page 4 of 13 TU-0012-140417

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 theprofile, the other connection attempts are canceled. In the next part of this tutorial, youwill learn how to create events that generate such calls. 8. 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 incase 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 andthe 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 when

the 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 bidirectionalcommunication.

• Set the Camera Remote Control to On. This 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 willbe terminated.

9. Click on the Set button to confirm changes, next click on the Close button to savethem.

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

2.2. SIP client configurationThe 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 confi-

DOMIQ, SIP and Mobotix cameras www.domiq.eu

© DOMIQ 2014 Page 5 of 13 TU-0012-140417

guration on the example of this application. The configuration is almost the same in themost applications.The application is available for Apple devices and Android system. Its major limitation isthe 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. Youcan 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 disqualifyingfor obvious reasons.

The configuration presented in the next part of this section was done on the iPhone. Theappearance 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 inthe range of the local network the SIP server is connected to. SIP Account is usedif you use the VoIP telephony. Out of Office Tunnel is used if the device is not inthe 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, youcan skip this parameter.

• In the External PBX IP field enter the domain name or the public IP address of theSIP server.

• If the VoIP operator has its own STUN server, enter its address in the field STUNServer. 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 caseof local connection it is the SIP registrar address.

Other parameters may remain unchanged. The correct application configuration isconfirmed by the following message: "On Hook", which means a valid registration to theSIP server.

DOMIQ, SIP and Mobotix cameras www.domiq.eu

© DOMIQ 2014 Page 6 of 13 TU-0012-140417

3. Define the eventsHaving configured the SIP communication you can define the events. The events mayvary depending on the chosen scenario. In this case we chose the following scenario inorder to show diversity:If there is anyone in the building/apartment, then the connection with an internal camera isestablished with the DOMIQ/Display panel. Otherwise the remote connection with mobiledevices is established. The presence of pleople is determined on the basis of the alarmsystem state. The presence can also be determined another way, e.g. by setting a MEMvariable 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:

DOMIQ, SIP and Mobotix cameras www.domiq.eu

© DOMIQ 2014 Page 7 of 13 TU-0012-140417

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 youcan 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 nameof the group and the type of action to Phone Call.

3.1. Sending and receiving the IP notificationsThe camera software works with the external software, so it is possible to integrate thevideo door station with the DOMIQ system, and thus with the entire installation of theintelligent building. Creating a simple rule the Base will receive information about eachevent which is triggered in the camera. Therefore the Base can react to e.g. pressingbuttons on the video door station, motion detection, sound detection, etc. The situationcan also be reversed: the video door station responds to the received IP message with aspecified 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 informingthat the bell button was pressed. It is necessary so that the internal camera can play abeep when the bell button is pressed. If you are not going to use an internal camera, youcan skip creating the second notification profile.SendingDue 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 appropriatedescriptions.1. In the configuration interface of the video door station choose Admin setup.2. In Transfer Profiles select IP Notify Profiles:

DOMIQ, SIP and Mobotix cameras www.domiq.eu

© DOMIQ 2014 Page 8 of 13 TU-0012-140417

• 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 the

Base 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 wastriggered 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 isthe 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. Theevent definition was presented in the next part of the tutorial.

An example configuration is shown below:

3. Click on Set in order to approve the changes and then Close to save them in the devi-ce 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.

DOMIQ, SIP and Mobotix cameras www.domiq.eu

© DOMIQ 2014 Page 9 of 13 TU-0012-140417

• In the section Actions add a new action (Add new action) and then choose fromthe list: IP Notify:<profile name>, in this case IP Notify: Base and IP Notify: Bell.

6. The configuration is ready. The above defined IP notifiactions will be sent everytimethe bell button is pressed.

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

ReceiptThe events in the video camera can be invoked by a message with a given contents whichis 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 witha mobile device. To provide support for both actions, you should define two independentevents that will be triggered by different IP messages. The message with the contentslocal will trigger a local connection (to the camera), while remote will trigger the remoteconnection (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 areaswhere 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 connectionsand 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 localcalls select the profile name the video camera was assigned to. Select the connec-tion profile for the mobile devices in a similar way.

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

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

DOMIQ, SIP and Mobotix cameras www.domiq.eu

© DOMIQ 2014 Page 10 of 13 TU-0012-140417

3.2. Reaction of the Base to the IP notificationsHaving 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 onthe state of the alarm system, the Base module responds with an IP message with thespecified 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 doorstation

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 visualizationwhich 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 ofpeople in the building. Depending on the result it sends the appropriate message: localor 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 conversationIn 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 serverconfiguration we mentioned that the Camera Remote Control parameter should be setOn.

DOMIQ, SIP and Mobotix cameras www.domiq.eu

© DOMIQ 2014 Page 11 of 13 TU-0012-140417

A combination of these both functions allows to control the video door station directly, aswell as the building automation system indirectly from the SIP client application.Mobotix devices have been equipped with the functionality to receive commands sentusing numeric keypad of the device, which established the the SIP connection. Amongthe available commands the one that deserves special attention is assigned to the digit 6.After pressing 6 and confirmation with #, there will be sent a command that triggers theevent which is built in the video door station named User Click. As you can probablyguess, there is only a only step to create the event in the Base module, which will react incase it appears. After receiving the event, the Base module can perform a freelyprogrammed 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 Basereceives the information everytime the event of the User Click type is triggered.

3. Click on Set in order to approve the changes and then Close to save them in the devi-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 whenthe bell button is pressed. It is also the signal that informs about incoming SIP call fromthe 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:

DOMIQ, SIP and Mobotix cameras www.domiq.eu

© DOMIQ 2014 Page 12 of 13 TU-0012-140417

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. 3. Select Admin Setup > Audio and Phone > Sound Profiles. 4. Add a new profile and name it.5. Choose the sound which should be played. In Loop Count enter the number of sound

repetitions.6. Click on Set in order to approve the changes and then Close to save them in the devi-

ce memory.7. Click on Setup Menu and select Action Group Overview. 8. Add a new group and name it, e.g. tcp, then click on Edit. 9. 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.

DOMIQ, SIP and Mobotix cameras www.domiq.eu

© DOMIQ 2014 Page 13 of 13 TU-0012-140417


Recommended