Teams Real Simple with Pictures: Voicemail and Redirecting using SIP-URI

Written: 22/05/2022 | Updated: N/A

From time to time, I receive the odd question about Microsoft 365 – and whilst it has been by admission difficult this year getting onto the Tech Community I am starting to make a general comeback into wider community pursuits outside of speaking and blogging. Now everyone pretty much knows I started out in the Tech Community. I like answering questions. They are always opportunities to help, learn or both. So I had a question this week regarding the new centralized voicemail settings in the TAC and this particular question referred to call answering rules. More specifically, what did it mean that you could forward a call which has gone to voicemail to the SIP-URI of another user? Where could you find the SIP-URI of a user? What is the SIP-URI? Very good.

Lets go.

This blog will cover

  • What does the question mean? Where did it originate?
  • What is SIP-URI?
  • What the SIP-URI typically is
  • Verifying via the Exchange Admin Centre
  • Verifying via PowerShell
  • Completing in the Teams Admin Centre

Prerequisites

  • Global admin permissions (Using Multiple Admin Centres and PowerShell) or if using POLP then Exchange and Teams Administrator permissions

WHAT DOES THE QUESTION MEAN? WHERE DID IT ORIGINATE?

Ok let’s log into the Teams Admin Centre and take a look

1.) Login with administrator credentials to https://login.microsoftonline.com

2.) From the left app rail, or via the waffle (top left) select Admin

3.) In the M365 Admin Centre from the left navigation select Show All and then Teams

4.) In the Teams Admin Centre select Users and then Manage Users

5.) Select the user in question

6.) Select the tab Voicemail

7.) Here it is, the question is referring to transferring a call to another person inside the organisation using the SIP-URI of the destination (in other words the SIP-URI of the user). But what is that?

WHAT IS SIP-URI?

SIP-URI stands for Session Initiation Protocol Uniform Resource Identifier. It identifies a communications resource, and contains enough information to initiate/continue a communication session with the resource identified in the URI. In short, and in language that means something to you and I, if you wanted to call someone or transfer a call to someone else, or have a call answering rule just as the one above, then SIP-URI facilitates those things. Used with VOIP systems, SIP-URI is therefore a phone number of sorts, but it typically looks like an email address because of the way SIP-URI is formatted as in SIP-URI = sip:x@y:Port where x = Username and y = Host (Domain or IP). For example, john.doe@contoso.com could be a SIP address, and written sip:john.doe@contoso.com

WHAT THE SIP URI TYPICALLY IS

Whilst there is a few ways to confirm the SIP-URI of a user, it is typically – and I say typically – based on the User Principal Name (UPN) of the Teams user if that user has simply been set up as a cloud user, has a Microsoft 365 licence and has not modified in any way with nothing disabled in the licence

1.) Login with administrator credentials to https://login.microsoftonline.com

2.) From the left app rail, or via the waffle (top left) select Admin

3.) In the M365 Admin Centre from the left navigation select Users then Active Users

4.) The UPN is the Username (not the email address as commonly mistaken). The UPN of this user is chrish@M365x843980.onmicrosoft.com

5.) You may ask me at this point why the UPN is typically the SIP-URI. Typically the SIP-URI is set when the Microsoft 365 licence is assigned to the user when creating them, and from testing this is determined not by the Teams licence, but by the Skype for Business Plan 2 licence. This will be explained later.

But how can we check just to make sure – because there isn’t anything in the Microsoft 365 admin centre, or under that active users section, that conclusively confirms that the SIP-URI is the UPN in this case. The UX doesn’t show it and there isn’t any visible confirmation here

VERIFYING VIA THE EXCHANGE ADMIN CENTRE

Now assuming the cloud user hasn’t had anything modified in the past – or at least if you as an admin aren’t aware of any changes, a good place to start is the Exchange Online Admin Centre. However, whilst this is the easiest place to check, this also isn’t a 100% guarantee. This will be explained in the next section

1.) In the M365 Admin Centre from the left navigation select Show All and then Exchange

2.) In the Exchange Admin Centre, select the mailbox of the user

3.) In the flyout, select Manage Email Address Types under Email Addresses

4.) The SIP-URI can be found here

So it’s looking likely that the SIP-URI is sip:chrish@m365x843980.microsoft.com and from a combination of the UPN and the SIP value IN Exchange Online this could be enough to use within the Teams Admin Centre, however, for me this isn’t enough so PowerShell is the way to go

VERIFYING VIA POWERSHELL

Ok, the UPN is chrish@m365x843980.microsoft.com and so is the SIP value in EXO. However, in my personal opinion the gold standard is really checking in PowerShell via the Teams PowerShell module. I’ll answer why at the end of this section.

1.) Let’s fire up a PowerShell session. In Windows search for and find Windows PowerShell and select Run As Administrator

2.) If you haven’t installed the Teams PowerShell module yet, use

Install-Module -Name MicrosoftTeams -Force -AllowClobber

3.) Wait for the install

4.) Sign In

Connect-MicrosoftTeams

5.) Run the following command to get the details of the user

Get-CSOnlineUser - Identity "[UPN]"

6.) You will be able to get the SIP address from what is returned

Bingo. sip:chrish@m365x843980.microsoft.com confirmed as the SIP-URI for this user

Now at this point some will ask why I consider this to be the gold standard. Well, you can change the SIP address in EXO and it does not appear to change it for Teams which can be checked by running PowerShell after the change (and I checked this for over 48 hours after with no change). As far as I am aware the SIP-URI is stamped when a Skype for Business Plan 2 licence is added/enabled on a user based upon the UPN. This is my working theory because I have tested removing the Skype for Business Plan 2 licence and it changes the SIP-URI to something else based upon the default domain of the tenant. This is why, to answer the questions above, you cannot be 100% reliant on the UPN or EXO, and why PowerShell should always be authoritative here. Of courses, it is recommended that the UPN, the EXO value and what’s spat back in PowerShell are one and the same address.

COMPLETING IN THE TEAMS ADMIN CENTRE

Now we know what a SIP-URI is and how to get it for a user, it is then easy to complete the operation and forward the call going to someone’s voicemail to someone else.

1.) In the Teams Admin Centre select Users and then Manage Users

2.) Select the user in question

3.) Select the tab Voicemail

7.) Now we can configure voicemail centrally for the user. I set the call answering rules centrally beforehand to forward all calls to voicemail. I then configure the voicemail settings to play an outgoing message to the caller based upon out of office greetings. I then set the call to transfer to Vesa Nopanen using his SIP-URI of sip:veskun@m365x843980.microsoft.com

8.) Job done. Checking the settings in the Teams Client they are configured instantly

Our job here is done

I really enjoyed writing this one. So much out of a simple question. See you soon.