Howto:Working with multiple Door Cameras
Applies To
This information applies to
- V10 and innovaphone PBX platform
- innovaphone phones supporting video
- web server running PHP 5
some innovaphone phones support display of a door phone camera picture (see Howto:Door Phone with Video in V10 and later). However, only one camera is supported. This article describes a solution for use of multiple door cameras.
More Information
Overview
When multiple door cameras are used, the standard mechanism described in Howto:Door Phone with Video in V10 and later is not sufficiant, as the URL used in the phone is static and will always show the same door camera. Instead, the image should switch from one camera to the next continuously. Also, when the operator is called by the door phone, the picture from the calling door should be shown always. This can be achiedved using a this SOAP-based urtiliy.
Prerequisites
This SOAP script requires a web server running PHP5. A Linux Application Platform is fine, but any other PHP platform should do too.
Download
- http://download.innovaphone.com/ice/wiki-src#doorcontrol - download the complete file package of scripts and files described in this article.
Installation
Unpack the downloaded file (see #Download). Copy the content of the Solution/sources
directory (including the sub directories) to your web server.
Open your web browser and go to http://your-web-server-name-or-ip/path-you-installed-the-toolto/DoorControl.php?debug
. You should see something like
number seconds since last switch ... switching to next name-of-door ...
On a Linux Application Platform
To install the utility on a Linux Application Platform , you may proceed as follows
- mount the LAP's WebDav drive (
\\
lap-ip-addr\webdav
orhttp://
lap-ip-addr/webdav
, depending on your client)
- you will need proper credentials at that point
- create a subdirectory
/doorcontrol
- change to this directory
- copy the files doors.xml, state.xml, DoorControl.xml to the new directory
- create a subdirectoy
/doorcontrol/classes
- change to this directory
- copy the file innopbx.class.php to the new directory
- on the LAP, go to Administration/Web Server
- select Change web server properties and public access to the web/webdav
- add
/doorcontrol
to the Public Webdav Paths
- there is no need to tick the Write check-mark for the utility to function
If you now type http://
lap-ip-addr/webdav/doorcontrol/DoorControl.php?debug
, you should see the message mentioned above.
Configuration
doors.xml
The utility comes with a working sample configuration (in doors.xml
). This file must reside in the same directory you installed the PHP script (DoorControl.php
) too. The sample file looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<doors
pbx="145.253.157.200"
pbxhttp="demo"
pbxpw="demo"
pbxuser="_TAPI_"
interval="5"
>
<door
url="http://baudisch.dyndns.org/jpg/image.jpg"
name="ckl-1"/>
<door
url="http://216.123.238.208/axis-cgi/jpg/image.cgi"
name="door2"/>
<door
url="http://rax1.bsn.net/axis-cgi/jpg/image.cgi"
name="door3"/>
</doors>
doors
The root tag doors
has a few attributes which define the PBX access (used to determine if a phone is being called by a door phone):
- pbx
- the IP address of the PBX
- pbxhttp
- the HTTP user to be used to access the SOAP service on the PBX (usually the Name' of a PBX user object or the admin user)
- pbxpw
- the password of the HTTP user
- pbxuser
- the Long Name of a user object that is used to access the SOAP service on the PBX
Also, the interval between switching the available door cams must be defined
- interval
- the number of seconds the utility will wait before switchign to the next camera
door
Each sub-tag door
defines an available door camera.
- url
- the URL to retrieve a single picture from this camera
- name
- the Name of the PBX user object the door phone is registered with. You must use the single-picture URL here (usually ending in
.jpg
), not the picture stream (.mjpg
). Otherwise, the phone will never switch to the next camera.
Phone
The Background Image property in Phone/Preferences must be set to the DoorControl.php script on your web server. It supports 2 arguments
- id
- e.g.
id=operator
, the Name of the PBX user object the calling phone is registered with. The script will use this name to query the PBX if the phone is currently being called by a door phone. - debug
- if this is set, the script will not deliver the requested picture but will spit out some debug information