Jul 6, 2014

Posted by in Tech Tips | 8 Comments

Auto provisioning snom phones for Lync

At work & home we have quite a few snom 7xx Lync phones deployed. I’m quite a fan of the snom devices & their Lync implementation particularly around things like directory search etc… With the newer snom UC Firmware it is also possible to manage all updating directly through the Lync infrastructure in the same way that you would manage & update the official Lync Phone Edition handsets. The tricky bit comes when you buy a bunch of new phones as they don’t normally come with the UC edition firmware pre-installed.

The good news is that if you can use a bit of DHCP magic to have an out-of-the-box phone boot up & flash the UC edition firmware & configure itself ready for Lync… (Auto provisioning!)

The official guidelines about how to achieve this provided by Snom can be found here – http://update.snom.com/downloads/snomuc/documentation/2012-02-06_Update-Guide-SIP-to-UC.pdf but the process is a bit tricky. I thought I’d document what actually happens in a step-by-step way…

Contents

 

Process overview

Phone perspective

image

  • The phone boots up and checks DHCP for a provisioning server
  • It then queries the provisioning server URL for a file with it’s model number
    • We can use the Lync server here if we want
  • This file contains configuration information & the location of the firmware it should go flash
    • This can be the Lync Phone Update store
  • The phone then request the firmware file for it’s model from the location specified in the configuration file
  • The phone downloads the firmware and applies it along with any configuration information we set

Admin perspective

 

image

  • Download the snom UC firmware & files
  • Add the firmware files to the Lync server as normal
  • Add an XML file to the Lync share

image

  • Customise another XML with all the settings we want, and the location of the Lync firmware files
  • Place the file on a HTTP server, or use the Lync server

image

  • Add some DHCP options to our DHCP server

Simple right? well lets get stuck in:

Detailed steps

Step 1 – Download files from snom

Steps 2/3/4 – Upload the firmware .CAB files via PowerShell to the Lync server

  • Save the .CAB files somewhere where you have access to the Lync PowerShell command lets
  • Make sure there is nothing else in the folder
    • image
  • Open a PowerShell session and navigate to the folder you are using
  • Run the following commandlet

foreach ($file in Get-ChildItem) {Get-CsService -WebServer | select PoolFQDN | foreach {Import-CsDeviceUpdate -Identity (‘WebServer:’ + $_.PoolFQDN) -FileName $file}}

    • This command will upload each file in the folder to each Lync pool
  • If it succeeds you wont see any confirmation or feedback
    • image
  • You can check by opening the Lync Control Panel and checking the “Client/Device Update” tab
    • image
  • You could see the version you uploaded listed as “Pending”
    • Note: Pending updates will not be deployed to any phones already enrolled in Lync, for this process to work you do not need to “approve” the update as we will point the snom phone directly at it, however it probably makes sense so that all your snom devices will be on the same version!

Steps 5/6 – Firmware XML

  • Extract the Firmware XML file you downloaded earlier
    • image
  • Open the relevant files for the models of phone you are deploying
  • In the file there are two variables you can modify
    • image
    • {prov_host}
      • This variable will be automatically set by the phone to be the value we will pass it via DHCP. In a normal deployment you do not need to modify this
    • <version>
      • Chances are the firmware version you have downloaded will be different to the one in the XML file. Update the numbers as appropriate
  • Browse your Lync pool folder share & find the snom folder
    • For me the path was
      • <Lync_Share>\1-WebServices-2\DeviceUpdateStore\3PIP\snom
  • Copy your modified XML into the root of the folder
    • image

Steps 7/8 – Configuration XML

  • Next we need to place a configuration XML file somewhere the phone can find it.
    • Note: This has to be on an unauthenticated HTTP web server, in a stand alone environment you can use the Lync Front end server internal website root for this however if you have an enterprise deployment you might want to use another server
  • Extract the Configuration XML file that you downloaded earlier
    • image
  • If using your Lync server browse to the internal website directory
    • For me this was – “C:\Program Files\Microsoft Lync Server 2013\Web Components\Internal Website”
  • Copy the files for the phone model you want to deploy
    • image
  • If you want to add any additional snom configuration information you can edit the file
    • For me I set the phones to use the UK language and time-zone

<language perm=”$”>English (UK)</language>

<tone_scheme perm=”$”>GBR</tone_scheme>

<timezone perm=”$”>GBR-0</timezone>

    • image
    • note: be careful about the spacing here & make sure you use the right tags. You can find the full list of customisations you can make here – http://wiki.snom.com/wiki/index.php/Settings/ or as the snom wiki is quite hard to search browse to your reference phone’s webpage and click the “?” icon next to any setting
  • Save the file and browse to your webserver to make sure you get the file back, don’t worry if it doesn’t format like XML
    • image
  • Repeat for each snom model you want to auto-provision

Steps 9,10,11 – Setup DHCP

  • Now we need to add some DHCP options that the phone will check. This is the part that actually gets us up and running
  • Define a new “Vendor Class”
    • Right click on the IPv4 scope
    • Choose “Define Vendor Class”
      • image
    • Click “Add”
      • Enter display name as the model number for the phone you want to configure – i.e “snom760”
      • Enter a description that makes sense to you
      • Click in the space under “ASCII”
      • Enter the phone model again – i.e “snom760”
      • image
  • Pre-define Option for the new Vendor Class
    • Right click on the IPv4 scope
    • Choose “Set Predefined Options”
      • image
    • Move to the “Advanced” tab
    • Change the “Option Class” in the drop down to the new Vendor Class you just added
      • image
    • Click “Add”
      • Name – “Option 43”
      • Data type – “Encapsulated”
      • Code – “66”
      • Description “snom configuration server”
      • image
    • Click “Ok”
      • image
    • image
  • Configure the new option for the server or scope
    • Note: You can do this at the protocol level for all IPv4 DHCP scopes on your server, or you can define the option at each scope if you only plan to service phones from certain scopes
    • Expand the IPv4 scope
    • Right click on “server options” or “scope options”
    • Move to the advanced tab
    • select the “Vendor Class” we made earlier
      • image
    • Tick the “066 Option 43” box
    • The “Data entry” area will light up
      • image
      • Note: see the full stop in the ASCII section. Make sure you delete this!
    • Click where the full stop is shown and delete it
    • Enter the http address for your web/lync server depending where you saved the configuration XML file
      • http://<servername>
      • image
      • Note: do not add a closing “/” or any filename to the url, the phone does this for you
      • Note: earlier when you configured the XML files that contained the “{prov_host}” variable, the value you specify here is what the phone sets as that variable. You should only need to change this is you have a custom requirements for traffic flow etc..
    • Click “Ok” and save the changes
    • The option should now be displayed
      • image
  • Repeat the above steps for each model of phone you want to auto provision
    • Note: The steps for configuring DHCP are really tedious but in Server 2012 it seems you can do most of the work via PowerShell. I have the bones of a script that should auto-configure the scopes for you

Testing

And that’s it! you should now be able to boot your non-UC snom phone right out the box and watch as it re-configures itself for Lync.

image

Just in case you don’t believe me here is a YouTube video of the process from the phone’s point of view end-end (in case you need help sleeping)

 

So there you have it, a bit of a faff to configure first time around  – particularly the DHCP bits. Hopefully soon I’ll have a PowerShell script that will make that part of the process a little bit simpler so check back sometime.

Thanks to @Nat for his assistance understanding the process. If you made this work for you let me know how you got on Smile (p.s doesn’t Visio rock?!)

Ben.

  1. Hi Ben,
    Great article and a very comprehensive provisioning guide! Things are moving very fast at snom and the snom 7xx devices (except currently the 715) are now supplied automatically as “Lync ready” and can be easily provisioned straight out of the box. A simple command of text into the Lync Powershell and voila!

    You can find all the details here:
    http://provisioning.snom.com/OCS/BETA/2012-05-09 Native Software Update information TK_JG.pdf

    Regards,
    Jason

  2. Ben Lee says:

    Hi Jason, Thanks. It’s good to hear that’s an option, this post was based off a mini customer deployment we had a few months ago…
    (Also can’t wait to test out the upcoming BToE implementation)

    Ben

  3. Hi Ben,

    just stumbled across your great article. Please note the guide still available (now) here:
    http://downloads.snom.com/snomuc/documentation/2012-02-06_Update-Guide-SIP-to-UC.pdf

    is kind of superseded by the fact that for about 2-3 years the carton box FW image (still standard SIP) supports the UC edition documented MS hardcoded ucupdates-r2 record:

    “not registered”: In this state the device uses the static DNS A record ucupdates-r2. as described in TechNet “Updating Devices” under: http://technet.microsoft.com/en-us/library/gg412864.aspx.

    In short: zero-touch with DNS alias or A record is possible. SIP FW will not register but ask for the CAB upload based UC FW and auto-pull it if approved (but only if device was never registered: fresh from box or f-reset).

    btw: the SIP to UC guide was made as temporally workaround, but I guess the XML templates still provide a good start line.

    Also kind of superseded with Lync Inband Support for Snom settings:

    http://www.myskypelab.com/2014/07/lync-snom-configuration-manager.html
    http://www.myskypelab.com/2014/08/lync-snom-phone-manager.html

    another great tool – powershell on steroids with Snom UC & SIP: http://realtimeuc.com/2014/09/invoke-snomcontrol/
    (a must see !)

    Please dont mind if I was a bit advertising.

    Thanks and greetings from Berlin, also to @Nat,
    Jan

  4. Fantastic article! Thanks for sharing. We’ll be transitioning our Snom 760s to provision from Lync shortly.

    Are there any licensing concerns involved?

  5. Thanks Susan,
    From a licensing point of view you need to make sure you have the UC license for the SNOM phones and on the Lync side if you are doing Enterprise Voice need a Plus CAL for the user concerned…

    Hope that helps?

    Ben

  6. Thanks Jan 🙂

  7. Thanks for the licensing info. It helps a lot!

Leave a Reply

Your email address will not be published. Required fields are marked *