UCMA Application vs. Lync Policies and Dial Plan

Besides installing and provisioning UCMA application, Lync Server administrator needs to assign appropriate policies and dial plan to UCMA application endpoints in order to let the application work as expected. Depending on the functionality, application endpoints might need permissions to use basic telephone functionalities (e.g. call forward, call transfer), dial out PSTN numbers and organize conferences. If an application endpoint is created without specifying associated dial plan and policies then Lync Server assigns the default dial plan and default policies to the endpoints. If these are too restrictive then CE might not work as expected.

You can launch Lync Management Shell and assign appropriate policies and dial plan to application endpoints as follows.

Dial Plan

You need to assign the appropriate dial plan to the application endpoints to allow dialing PBX extensions and PSTN numbers. Make sure that normalization rules assigned to the dial plan allows dialing all the required phone numbers. You can use the following command to check the dial plan currently assigned to the application endpoint:

Get-CsTrustedApplicationEndpoint -Identity “endpoint SIP URI” | Select-Object -Property DialPlan

You can use one of the following commands to assign a new dial plan to the application endpoint:

Grant-CSDialplan -Identity “endpoint SIP URI” -PolicyName “dial plan display name”
Get-CsTrustedApplicationEndpoint -Identity “endpoint SIP URI” | Grant-CSDialplan -PolicyName “dial plan display name”

If no appropriate dial plan is assigned to the application endpoint and the application tries to dial out a PSTN number then application receives FailureResponseException (ResponseData.ResponseCode: 404, ResponseData.ResponseText: “Not Found”) when Call.EndEstablish() is invoked.

Voice Policy

You need to assign the appropriate voice policy to the application endpoints to allow using the required voice functionalities (e.g. forward, transfer). Also check the PSTN usage records assigned to the voice policy and make sure they satisfy the application requirements. You can use the following command to check the voice policy currently assigned to the application endpoint:

Get-CsTrustedApplicationEndpoint -Identity “endpoint SIP URI” | Select-Object -Property VoicePolicy

You can use one of the following commands to assign a new voice policy to the application endpoint:

Grant-CsVoicePolicy -Identity “endpoint SIP URI” -PolicyName “voice policy display name”
Get-CsTrustedApplicationEndpoint -Identity “endpoint SIP URI” | Grant-CsVoicePolicy -PolicyName “voice policy display name”

If no appropriate PSTN usage record is assigned to the application endpoint and the application tries to dial out a PSTN number then application receives FailureResponseException (ResponseData.ResponseCode: 403, ResponseData.ResponseText: “Forbidden”) when Call.EndEstablish() is invoked.

Conferencing Policy

If the UCMA application deals with conferences then you need to assign the appropriate conferencing policy to the application endpoints to allow organizing conferences, manipulating conference participants and dialing out PSTN numbers from conferences. You can use the following command to check the conferencing policy currently assigned to the application endpoint:

Get-CsTrustedApplicationEndpoint -Identity “endpoint SIP URI” | Select-Object -Property ConferencingPolicy

You can use one of the following commands to assign a new conferencing policy to the application endpoint:

Grant-CsConferencingPolicy -Identity “endpoint SIP URI” -PolicyName “conferencing policy display name”
Get-CsTrustedApplicationEndpoint -Identity “endpoint SIP URI” | Grant-CsConferencingPolicy -PolicyName “conferencing policy display name”

If conferencing policy prohibits audio/video (AV) conferences and the application tries to set up and dial in to an AV conference then application receives ConferenceFailureException when Call.EndEstablish() is invoked.