OnPrem Lync Server 2010 cannot direct calls to O365 UM
Recently I have had the opportunity to work on multiple OnPrem Lync Server 2010 (Lync) deployments integrated with O365 Exchange Unified Messaging Servers (UM).
Unable to route calls from Lync to UM. If you look at traces from the Lync Edge Server (with SipStack component traced) You should see an INVITE outbound to exap.um.outlook.com (Well known UM Access Proxy).
To this request UM returns a 503 Service Unavailable bad response.
The INVITE from Lync Edge Server to exap.um.outlook.com will look like this -
UM uses the domain recognized in ms-organization parameter to route this request to the correct UM server in the cloud where the tenant is hosted. If this domain is not set up as Authoritative for O365 then UM rejects this request with a 503.
The ms-organization domain is fetched from the Lync hosted voicemail policy set up by the administrator using New-CSHostedVoicemailPolicy or Set-CSHostedVoicemailPolicy.
In my experience this domain needs to be set up as Authoritative and should be listed as one of the accepted domains in O365 . You can check your accepted domains in O365 using Get-AcceptedDomain.
You can change this to Authoritative on the O365 environment using -
Set-AcceptedDomain – Identity <domain in ms-organization> –DomainType Authoritative