Thursday, March 31, 2011

Strip “+” from RequestURI - Lync 2010

Recently I ran to interesting case – a colleague from another organization uses SIP Trunk provider who does not “like” E.164 number format, thus had problem with outbound calls and Lync user Caller ID presentation. While stripping “+” is now made easy with the new “Trunk Configuration” feature in Lync…

***Note the simple RegEx. Because Lync uses E.164 format, the number will always begin with “+” and we remove 1 “digit”, thus the number sent in TO header to the trunk/gateway will be non-RFC 3966 compliant.

...the problem was that while we sent non -RFC 3966 compliant TO header, FROM header still contains "+": FROM: "Drago Totev"<sip:+14785550001@fe.drago.local;user=phone>;epid=754CB7883F;tag=48b2223f97, and since the provider cannot handle it, as a result, the called party sees "Anonymous" as Caller ID.

Fortunately, Lync Management Shell cmdlet “Set-CsTrunkConfiguration” can resolve this issue.

First, we run “Get-CsTrunkConfiguration”. In this example, because I have not created new trunk, only the default – Identity “Global” is presented.

***Note the parameter “RemovePlusFromUri” is currently set to “False”. It is important to understand the fact setting this to “True” will force Lync to convert ANY E.164 in the RequestURI header to non-RFC 3966 compliant.

In the case above, we run “Set-CsTrunkConfiguration -Identity "Global" -RemovePlusFromUri $true”

Now my FROM header is non-RFC 3966 compliant.

FROM: "Drago Totev"<sip:14785550001@fe.drago.local;user=phone>;epid=754CB7883F;tag=4


Anonymous said...

thanks for posting this!

Sirhan Ibrahim said...

thanks for sharing this. was useful to me

Greg S said...

This is extremely useful. my CUCM admin has asked me to strip the + from the FROM: teluri ... I don't think that it's a good idea ... but, I am glad that it appears that I can do this via your blog. Thank you for sharing.

Blogger said...

I have just downloaded iStripper, and now I enjoy having the hottest virtual strippers on my taskbar.