Thursday, July 28, 2016




Planning for Mediation server Role



Mediation server Role plays a crucial role in Lync/SfB system for establishing a call between a Lync/SfB and PSTN or any VoIP system.  There is a Microsoft TechNet article which discusses about the Capacity planning for Mediation server Role.
 [ MS articles

https://technet.microsoft.com/en-in/library/gg398399.aspx  

https://technet.microsoft.com/en-us/library/gg615015.aspx ]. 

However, after going through it i felt that the information provided in the TechNet article is not conclusive. So before we have the Design work shop for the SIP Trunk I went through some of Channel 9 videos regarding the Enterprise Voice features found that there are several important points to consider while planning for Mediation server Role.  So, we will discuss about  some scenarios where Media Bypass can be used and CANNOT be used.


Media Bypass:
One of the main question people have is, can we reduce the number of servers required for the Mediation server role if we have Media By pass enabled for a network.
What is Media ByPass?

Media bypass refers to removing the Mediation Server from the media path whenever possible for calls whose signaling traverses the Mediation Server.  Media bypass can improve voice quality by reducing latency, needless translation, possibility of packet loss, and the number of points of potential failure. Scalability can be improved, because elimination of media processing for bypassed calls reduces the load on the Mediation Server. This reduction in load complements the ability of the Mediation Server to control multiple gateways. Picture from the TechNet article about the Media bypass.






Media By pass is a feature which when enabled will allow the Agents to talk directly to the certified Gateways (bypassing the Mediation server). However, if Media By pass feature is not enabled or not configured for the network, then all the media traffic has to traverse Mediation server.


Media By pass is a great feature and it significantly reduces the load on the Mediation servers and improves the call quality. However, it is good to understand the certain scenarios where the Media Bypass is irrelevant. It is also important to consider the following scenarios (where though the Media By pass feature is enabled) but it will not work even if a Lync/SfB call is made from a Network where Media Bypass is enabled.


Features  / applications / devices  which does not work with Media Bypass:

  •  Mobile devices does not use Media By pass. So if you have several thousands of Mobile devices in your infrastructure, then the all the Media traffic has to go through the Mediation servers.  Hence planning for Mediation servers needs to consider this situation too.
  •  Response Group does not use Media By pass. So if you have a user calling a Response Group number then though the Calls are originated from a network segment where Media By pass is enabled, the Media Bypass feature will not be used and the media traffic will be going to and from the Mediation server.
  •  If you have any trusted third party application like for Contact center solutions      then again Media bypass will not work.
  • The Media Bypass feature does not work for the  Dial in Conferencing scenarios.
  • The UCWA Applications and AV MCU does not support Media Bypass.
I hope  this post was intersting and please share your views. In case, if you feel that i have missed any other points to be considered while planning for Mediation server Role please share.

Tuesday, July 12, 2016

How to find the number of devices a user is Logged into using Lync/SfB Client logs ?


Recently, we had issue reported regarding the trusted application. While troubleshooting the issue, we had a requirement to understand the number of devices on which a user is logged in.

In our client environment we are using a third party Contact center solution as a trusted application. It was a kind of weird one, where the callers of a Contact center number where complaining they are not able to reach any agents. Whereas, the agents complained us that they are NOT receiving any calls.  

While we were discussing this issue with my colleagues we had a question, can we find the total number of registered end points for a sip account using the Lync/SfB client logs. That was a very good question. Because we have seen some third party applications actually providing the details like a user with a sip address say UserA@uctest.com has signed to 3 devices. So,  it was interesting to find out how a third party reporting applications can get the list of  devices to which a users had signed in to ? So, I tried to understand if there are anyways to get this information from the client/server  logs and understand the number of End points on which a user is logged into. 

NOTE:
I am writing this article in order to help those administrators who don't have Monitoring/Reporting solution available at their environment. Since, some Lync/SfB environment do not have the Monitoring server role or any third party Monitoring/Reporting solutions. 

There are two ways  to find out the list of get this information one using the Server logs and the other using the Client logs.

Solution #1: From the Server  logs

My first suggestion was to enable logging on all the Lync/SfB FE server and then make a test call to that the end point. Since Front End server will fork the incoming calls to all the registered end points we will get multiple 180 Ringing SIP Response if a user has signed on to multiple devices. 

So, if a user is signed on two devices like computer and a mobile phone, then I will get two 180 Ringing in the FE server logs.  Though this is helpful, this requires little bit of time and effort (to collect the logs on all the Lync/SfB servers during business hours will end up generating more logs). Moreover, if you have 10 servers in a pool then the amount of logs generated and analyzed from all the servers in the Lync/SfB FE pool will require more effort.

Solution #2: Using the Lync/SfB Client logs

But later, I realized that there is much better way to get this information and with less effort. All you need to do is, ask the user is to Sign in to another computer once again and provide the Lync/SfB client logs.  So, is it possible to get the find the number of devices on which a user is logged into using the recently gathered Lync/SfB client logs ? The answer is Yes J


I will explain this with an example. I singed into one computer, say Computer #1, then a mobile device. Later,  I singed to another computer,  Computer #2. So, now I am signed into my Lync accounts from 2 computers and one mobile client, so I have multiple registered end points for my sip account.

I collected the Lync client logs from the second computer Computer #2 (this is the latest computer on which I signed in). Then, I looked for the response 200 OK for the SIP REGISTER packet (In this 200 OK response there are three Contact: headers in it.



NOTE: You have to ask the user to Sign-in to Computer once again and then collect the client logs.This is a very important step, if you skip this step then you might not get the correct details.


07/04/2016|21:46:11.303 1834:1838 INFO  :: Data Received -10.1.92.181:5061 (To Local Address: 172.24.41.159:59266) 1640 bytes:
07/04/2016|21:46:11.303 1834:1838 INFO  :: SIP/2.0 200 OK
ms-keep-alive: UAS; tcp=no; hop-hop=yes; end-end=no; timeout=300
Authentication-Info: TLS-DSK qop="auth", opaque="F8084D77", srand="468DD1A4", snum="1", rspauth="2891b96442e3e7c7af0ef004a7babb9063fd48ba", targetname="FE01.uctest.com", realm="SIP Communications Service", version=4
From: "SOMASUNDARAM Yogesh"<sip:yogesh.somasundaram@uctest.com>;tag=cc0f68ce68;epid=6c1409c121
To: <sip:yogesh.somasundaram@uctest.com>;tag=99C17913B0B71378DCADCD792D587E29
Call-ID: d8060b5307124a1787e243e9ff587edc
CSeq: 12 REGISTER
Via: SIP/2.0/TLS 172.24.41.159:59266;ms-received-port=59266;ms-received-cid=39F2FF00

Contact: <sip:172.24.41.159:59266;transport=tls;ms-opaque=61fe165797;ms-received-cid=39F2FF00>;expires=7200;+sip.instance="<urn:uuid:aa39a11c-7a67-5d34-a985-7418ff06799c>";gruu="sip:yogesh.somasundaram@uctest.com;opaque=user:epid:HKE5qmd6NF2phXQY_wZ5nAAA;gruu"

Contact: <sip:FEPOOL01.uctest.com:5088;ms-fe=FE02.uctest.com;transport=Tls;ms-opaque=43b8303fcf7aa2b4>;expires=1295940;+sip.instance="<urn:uuid:aad6c08c-7dd8-5733-8b9e-cdcb8b0a1827>";gruu="sip:yogesh.somasundaram@uctest.com;opaque=user:epid:jMDWqth9M1eLns3LiwoYJwAA;gruu"

Contact: <sip:172.24.41.172:50900;transport=tls;ms-opaque=353dd698df;ms-received-cid=3A42B400>;expires=6311;+sip.instance="<urn:uuid:b9cc1792-d0cf-51ae-8c7e-6a0504a8b81c>";gruu=sip:yogesh.somasundaram@uctest.com;opaque=user:epid:khfMuc_QrlGMfmoFBKi4HAAA;gruu



If you have a mobile client then you will find that the Contact: header has the  FE pool name with the port number 5088 (unlike the IP address of computer).  This is because, the UCWA sip Listening port is 5088. In order to find this port number, on a FE server if you run the Get-csService | Fl *UC*  this will let you know that the UcwaSIP PrimaryListeningPort  is 5088.


So with the Contact header field present in the 200 OK, we can confirm that a user is logged into two different computer and one mobile client. And there is no need to collect the logs from the FE server’s logs in order to find this out J

Hope you find this information helpful.


NOTE:  I am sure, there are many ways to get his information and it is possible from SQL database too. However, if you are not having access to write a SQL query (like me) then it is easy to check the Client SIP logs rather than writing a SQL query.