This is the source code which accompanies the blog post:
Description:
Pauses music when the user goes into a Lync/Skype for Business call
My name is Tom Morgan and I blog about developing software solutions with Microsoft Lync and Skype for Business. For more code samples, see the full list at thoughtstuff.co.uk/code