Change Voice Policy of Lync 2013 Response Group Workflow, Dialin, or any other service

There is two ways to change the Voice Policy with Lync 2013.

  • CmdLets
  • Active Directory (advanced)

First of all, we will se how to get the Voice Policy from an Application Endpoint (Workflow, Dialin etc…) :

So if you want to change the voice Policy of a Workflow with powershell, here is the cmdlet :

Now we are going to be more “serious” by going to make changes in the Active Directory for the workflow itself.

First, depending on your environment, the RTC services folder can be found in different paths:

  • [Configuration]/Services/RTC Services/Application Contacts
  • [Domain Naming Context]/Services/Microsoft/RTC Services/Application Contacts

Once you’re in the path, search for the Active Directory Contact object that is your workflow, and modifies the attribute of msRTCSIP-UserPolicies.

It may have some entries like “0=123,1=6,7=2,…”

The “7=” is the voice Policy pointer. So to assign the correct voice Policy number to the Contact, Show the anchors of the voice policies in powershell and add it to the contact.

Powershell Voice Policy Anchor :

This is working for all the policies.

Karl

Disable Close button in Powershell Window

I did some powershell scripting these days.

Disabled Window running script

Disabled Window running script

Someone asked me if it would be possible to avoid the user to close the powershell window while a script is running (logon or any other). After a few searches in the MSDN world, I was able to handle the window and send some parameters to it.

For this, I ask the user32.dll Library to disable the powershell window and to disable the button (close menu). To remove any undesired button, I set the Windows style to Toolbox.

I know the fact of disabling window will avoid any user input and click on any button, but as they asked me to disable the button, I dit it this way. So use the rest as know-how… 🙂

Knowing what I need to code, I will use some user32.dll methods :

  • GetSytemMenu
  • EnableMenuItem
  • SetWindowLongPtr
  • EnableWindow

Hope that this script can be useful to some admins!

Karl

Windows versions tested
Windows 2000
Windows XP
Windows 7 OK
Windows 8
Windows 8.1 Standard OK (Disabled window only)

 

Here is the script :

Get-CsActiveCalls – Get Lync Mediation server active calls with powershell

Get-CsActiveCalls

Hi,

This is a simple script you can use to see which server has active calls (mediation).

This uses the Get-CsWindowsService cmdlet to get the RTCMEDSRV values. This can be useful if you need to restart a server.

If you need only one server, you can also use this command :

Get-CsWindowsService -Name RTCMEDSRV | select activitylevel

To launch the function, just write the function name followed by the computername :

Get-CsActiveCalls computer01,computer02,computer03,computer04

This will show you the active calls like in the picture.

A few modifications : powershell seems to keep all values from before, so we just clear the values after showing the object with Clear-Item.

Communication Server versions tested
Office Communication Server 2007
Microsoft Lync Server 2010 OK
Microsoft Lync Server 2013 OK

Here is the script :

 

Lync Server 2010 – Beep before call

Hi all,

As per usual, this is a network issue. You can use Microsoft Network Monitor with port and IP filters to check connexions.

Normally, the issue is the following :

The client is making an outbound call, the call has 3 ways to process and will try the ways as follow :

  1. Internet (Edge) – The call ask the EDGE if someone with the following sip is connected trough him.
  2. PSTN – Your PSTN Gateway
  3. Voicemail – Your UM Exchange server

For any network reason (Switch, Router,Firewall,…), the client can reach the edge, but the edge can’t reach the client. This is causing several beeps before the call really begin.

Hope this helps!

Beeps before Lync call

Hi all,

As per usual, this is a network issue. You can use Microsoft Network Monitor with port and IP filters to check connexions.

Normally, the issue is the following :

The client is making an outbound call, the call has 3 ways to process and will try the ways as follow :

  1. Internet (Edge) – The call ask the EDGE if someone with the following sip is connected trough him.
  2. PSTN – Your PSTN Gateway
  3. Voicemail – Your UM Exchange server

For any network reason (Switch, Router,Firewall,…), the client can reach the edge, but the edge can’t reach the client. This is causing several beeps before the call really begin.

Hope this helps!