Tom Talks Microsoft Teams and Microsoft 365 Collaboration news and opinions

Apostrophe and dash not supported in user SIP addresses in Lync Server – Find Problem SIP URIs

This has been known for a while, but Microsoft recently updated their KB and confirmed it.

http://support.microsoft.com/kb/2716467/

If a user (user A) uses a SIP address that contains an apostrophe (‘) or a dash (-), the user may encounter multiple issues intermittently. For example, user A may encounter the following issues:

  • A user (user B) cannot join a Lync meeting that is created by user A.
  • A user (user B) cannot add user A as a contact by inputting user A’s SIP address. Additionally, user B receives the following error message:Address is not valid
  • User A receives a warning when he or she signs in to a Lync client.
  • User A misses meetings on a Lync client.
  • User A loses access to an important communication and collaboration

So addresses like Tom-Arbuthnot@domain.com or tom’s.name@domain.com will potentially hit these issues. You might find that some things work, but on the whole it’s not a great idea.

Want to see if you have affected SIP URI’s in your environment? These PowerShell lines will list the relevant accounts

get-csuser | Where-Object {$_.SipAddress -match “-“} | Select-Object SipAddress

get-csuser | Where-Object {$_.SipAddress -match “’”} | Select-Object SipAddress

It’s probably best practice to avoid any special characters where possible.

Update 17/8/2014:

A great post from thoughts from a bot named flinch (great blog, you should follow it), pointed out some time ago the challenges with unusual/illegal characters in sip addresses, he came up with a regex to search for more possible problem addresses:

# Invalid characters this script checks for:  ~|{}[]<>`#^&@\

$AddressToTest = get-csuser
$regex = “^([^~|{}\[\]<>#^’&@\\]+)$”

Foreach ($user in $AddressToTest)

{
If (($User.sipaddress -split “@”)[0].substring(4) -notmatch $regex)

{
Write-Host “Invalid username specified.” $User.sipaddress
}
}

About the author

Tom Arbuthnot

A Microsoft MVP and Microsoft Certified Master, Tom Arbuthnot is Principal Solutions Architect at Microsoft Collaboration specialists Modality Systems.

Tom stays up to date with industry developments and shares news and his opinions on his blog, Microsoft Teams Podcast and email list. He is a regular speaker at events around the world.

9 comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  • The grammar natzi in me wakes up immediately after reading the title of the KB article. Let me dissect this short KB article:

    “…user SIP address…”: does it suggest that it is indeed supported in “SERVICE SIP address” or what? If its not supported in any of them, MS should write it like that, and not highlight user address, if it affects SERVER address !

    “If a user (user A) uses a SIP address that contains an apostrophe (‘) or a dash (-) blablabla..” : what about the domain part of the SIP address, after the “@” sign? Its also forbidden? I doubt so! The userA@my-domain.org is a perfectly fine SIP address, even though it has a literally dash in there! So the KB article is liar.

    The guy ho wrote the KB article is not really experienced with the Lync product.

    • Apostrophe’s and Dash’s cannot be anywhere in the SIP URI as these form part of the Meet Simple URL, which doesn’t support these characters either

      http://technet.microsoft.com/en-au/library/gg398287.aspx
      “…Simple URLs can contain only alphanumeric characters (that is, a-z, A-Z, 0-9, and the period (.). If you use other characters, the simple URLs might not work as expected. …”

      I’ve even tried moving the hyphenated domain name in to a subfolder for simple urls and Lync still doesn’t like it.

      Royal PITA

      • Wow, I just re-found this old conversation!

        “…Simple URLs can contain only alphanumeric characters (that is, a-z, A-Z, 0-9, and the period (.). If you use other characters, the simple URLs might not work as expected. …”

        Now thats just a giant BS! Hyphens are valid characters in any domain name, so as a result are part of the Simple URLs, therefore this exclusion is plain idiocracy from Microsoft.

        I am glad, they made this product defect even more difficult to identify in Skype for Business: as on Technet there is no such things as “Planning simple URLs for Skype For Business Server 2015”. All I found after massive google-ing, this hidden section:

        https://technet.microsoft.com/en-us/library/dn951397.aspx
        DNS requirements for Skype for Business

        DNS requirements for simple URLs: “For details about simple URLs, see Planning for simple URLs in Lync Server 2013.” Because we are so f.. lazy to write content for any remaining onpremise companies / partners.

  • If I don’t have access to the SipUriParser from UCMA to validate SipUris in powershell, I’ve been using this regex as a quick pass:

    ^sip:[^:]+@.*(?:[.](?:.*){2,})+(?=$|:|;|\?)

    Good to know about the special characters though, this only check to see that the sip uris don’t contain a password succeeding the user and preceeding the host for security reasons. Will modify it to check for those other characters too.

  • Hi Tom, thanks for the blog quite useful, The $Regex used above is not finding the character “/” in SIP address., in my case user data backup for a specific pool was keep on failing and while i run the Export-userdata command to that pool i found a account that has “/” in sip address which was causing the backup failure. hence i have modified the $Regex as $regex = “^([^~|{}\/\[\]#^’&@\\]+)$” this includes “\/” to make sure its finding the invalid characters in sip address completely. hope this helps!!!! -Regards Kannan

Tom Talks Microsoft Teams and Microsoft 365 Collaboration news and opinions