Child pages
  • Video Streaming with Snom Phones - Motion-Jpeg

Contents


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.

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

  1. Install the latest firmware image
  2. Make sure the MJPEG source is accessible from your web browser and the phone
    • Result:


  3. Navigate to the "Function Key" WUI page
  4. 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"

  5. After you entered the URL and the Short Text, just press Enter and click "Apply" on the Button below.
  6. 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.
  7. 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>


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)&lt;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)&lt;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.

  1. You have to add an Directory Entry first.
  2. Navigate to "Operation / Directory".
  3. Insert the Sip Identity of your Intercom System into the Filed: "Number".
  4. Enter the Action-URL in it´s Field. Example: http://10.10.10.222/snoma.cgi
  5. 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.