Content
If you want to see the pictures of your intercom camera in your Snom phone, you can do this via Action URL.
Snom devices do not support a video source, but only kind of "Motion Jpeg" (MJPEG) with approx. 5 - 10 frames per second.
Index:
Prerequisites
- Firmware 10
- Snom Phones
- D335
- D375
- D385
- D735
- D765
- D785
- MJPEG Source
- Web camera
- Streaming software, e.g. VLC, MPlayer
Configuration
There are different Use Cases. If you want to see a Video Source by pressing a Key, you could follow the Instructions for "Manually via function keys".
If you want to see who has rang the doorbell, please follow up the Instructions Below:Â "How can I see the door camera when it rings".
Manually via function keys
- Install the latest firmware image
- Make sure the MJPEG source is accessible from your web browser and the phone
- Result:
Â
- Result:
- Navigate to the "Function Key" WUI page
- Choose an available key and assign the key type "Action URL". Short Text can be any text you want to label the key with.
Because of some PBX Partner use the first two Function Keys for "Lines" I would suggest to start with the third Function Key.
In This Example i used a D385 which have 12 Hard Keys (48 Softkeys) and there are the first two Lines on the top, "P1" and "P7", so i start with "P2"- P2: "Number" = URL of your MJPEG source / "Short Text" = e.g. "Video on"
- Example: http://10.10.10.222/snoma.cgi
- After you entered the URL and the Short Text, just press Enter and click "Apply" on the Button below.
- Now Press the "P2" Key or whatever you setup.
- Result: You will see immediately the first Picture, on your Snom Phone.
- Please be Aware, that the Video source should offer best the exact Size of your Snom Phone.
e.g. D785, D375 and D385 have a Display Size of 480 x 272 pixel. Please Refer a Overview in our Manual for Customising Snom Phones: GUI - Customisation - The size could most time setup into the Web interface of your IP Camera or Intercom System.
- Result: You will see immediately the first Picture, on your Snom Phone.
- To stop the Video, just click on the "X" Key.
The Action URL must point to a XML File with some Informations about the offered Video Source.
The XML File should look similar to this.
<SnomIPPhoneImageFile state="relevant" track="no" dtmf="on" > <LocationX>00</LocationX> <LocationY>00</LocationY> <url>http://viewer:1234@10.10.10.222/jpg/image.jpg</url> <fetch mil="200">http://viewer:1234@10.10.10.222/snoma.cgi</fetch> </SnomIPPhoneImageFile>
For cameras like Doorbird and 2N this xml is already onboard. For generic cameras which doesn't have this possibility you need a separate webserver where to store the file. The action URL must point to this webserver and also the line
<fetch mil="200">http://viewer:1234@10.10.10.222/snoma.cgi</fetch>
has to contain the IP and path to the xml on your webserver
Setting Timeout
An explicit timeout can not be set but by using a variable this goal can be achived. When the counter reaches the limit the phone will call mb_exit which returns the phone to the idle screen.
<?xml version="1.0" encoding="UTF-8"?> <SnomIPPhoneImageFile track="no" dtmf="on"> <locationy>0</locationy> <locationx>0</locationx> <url>http://192.168.88.18/tmp/auto.jpg</url> <If condition="$(var:count)<2000"> <fetch mil="200">http://192.168.89.100/camera.xml#var:count=$(math_eval:$(var:count)+200)</fetch> </If> <Else> <fetch mil="1000">phone://mb_exit</fetch> </Else> </SnomIPPhoneImageFile>
The condition in the given XML tests if the variable "count" is less then (lt) 2000. If so, the camera.xml will be called again and the count variable (provided in URL) will be increased by 200.
It makes sense to increase this variable by the given millisecond attribute of the fetch element so the number of iteration multiplied by 200millisecond will give exactly the timeout. Should be the condition not true anymore (the count variable bigger then 2000 in this example) the "else" will be executed and the phone will wait 1000 millisecond and fetch the "phone://mb_exit" URL, which returns the phone to the idle screen.
The count variable must be first initialised, so in the phone the following URL needs to be configured for an Action-Link: http://192.168.89.100/camera.xml#var:count=0. This will initialise the value of count to 0.
Setting Timeout - 2
The previous example requires the setting of the count variable in the URL, which is sometimes not possible.
For this the following XML can be used. This has the same effect and a bit more simple:
<?xml version="1.0" encoding="UTF-8"?> <SnomIPPhoneImageFile> <LocationX>$(math_eval:$(var:count)/10)</LocationX> <LocationY>-2</LocationY> <URL>http://docs.snom.io/xml_minibrowser/examples/img/webcam.jpg</URL> <If condition="$(empty:$(var:count))"> <fetch mil="200">phone://mb_nop#var:count=0</fetch> </If> <If condition="$(var:count)<1000"> <fetch mil="1000">phone://mb_nop#var:count=$(math_eval:$(var:count)+200)</fetch> </If> <Else> <fetch mil="1000">phone://mb_exit</fetch> </Else> </SnomIPPhoneImageFile>
This example will load the mentioned webcam.jpg in every 200ms and will put it on the screen by changing the horizontal position to count / 10 (20,40,60...).
Automatic view Door Camera on Doorbell ringing
A very common usage of a "Video Streaming" shown into a Snom Deskphone is the integration of an Intercom System. This comes very often, not only with the possibility to talk to the Person who rang your Doorbell, if there is a Video Camera attached to this System you first can have a look on the Person in front of your door, before responding or open the door.
- You have to add an Directory Entry first.
- Navigate to "Operation / Directory".
- Insert the Sip Identity of your Intercom System into the Filed: "Number".
- Enter the Action-URL in it´s Field. Example: http://10.10.10.222/snoma.cgi
- Click on "Add/Edit".
- Your Intercom System should be compatible to VoIP and integrated into your PBX (Phone System).
- If you want to use your Snom deskphone to answer on your Intercom System the PBX has to be configurated that your Phone gets called if someone ring your doorbell.
- If now someone ring your doorbell, your phone gets a call and starts transfering the Motion Jpeg Pictures.
- You can now decide to pick up the phone to talk to the person and open the door, or do nothing.
Displaying JPEG with refresh timer
Snom D-Series Phones support an Action URL which is called automatically if a call is signalized to the phone and the number (along with the Action URL) is configured in the local phonebook (TBook). This feature is originally created for doorbells, which can display MotionJPEG, or with some Doorbells, which support Snom XML Minibrowser.
However not all of them use these approaches and some of them only provide a JPEG (or PNG) image, which is a static image and needs to reloaded regularly. Since Snom suppors and prefers MJPEG, this would cause a static image ot the display of the phone. For this the attached Minibrowser Wrapper can be used to periodically reload the image.
<?xml version="1.0" encoding="UTF-8"?> <SnomIPPhoneBatch> <SnomIPPhoneImageFilestate="related"fkeys_in_front="no"document_id="image"> <LocationX>0</LocationX> <LocationY>0</LocationY> <If condition="$(empty:$(var:url))"> <fetch mil="1">phone://mb_exit#var:exit=1</fetch> </If> <fetch mil="300">phone://mb_nop</fetch> <URL>$(var:url)</URL> </SnomIPPhoneImageFile> </SnomIPPhoneBatch>
Since the version 10.1.73.16 this XML can be loaded as "custom_xml" directly to the phone and can be reused within the TBook for the Action URL;Â
To do so the URL of the Camera (for instance http://ip.camera/image.jpg) needs to be set like this file:///xml/gui/custom_xml.xml#var:url=http://ip.camera/image.jpg. In this case the local XML is executed and will load the image provided in argument in every 300 miliseconds.
If the CANCEL button is pressed, or the cal is taken the phone switches into normal display mode and will go back to Idle or display the connected call itself respectivly.
Further Information
Related articles