Export details of last voice call made by all Lync 2013 users

Arun Raj 101 Reputation points
2021-02-08T16:17:18.937+00:00

Hi Friends,

Need to export the last voice call details (like username, sip address, LineURI, callee number and date/time) made by all Lync 2013 users. A powershell script to do this task would be much appreciated.

Skype for Business
Skype for Business
A Microsoft communications service that provides communications capabilities across presence, instant messaging, audio/video calling, and an online meeting experience that includes audio, video, and web conferencing.
603 questions
0 comments No comments
{count} vote

Accepted answer
  1. Arun Raj 101 Reputation points
    2021-02-25T17:40:31.293+00:00

    Thanks @Yunru Yang .

    I found an SQL query to fetch this information from the SQL DB server. Below is the query which I used.

    -------------------------------------------------------------------------------------------------------------

    Use LcsCDR
    SELECT VoipDetails.SessionIdTime [Date],
    CONVERT(varchar(10),SessionDetails.SessionEndTime - VoipDetails.SessionIdTime,108) [Time],
    Phones.PhoneUri [From Number],
    Users1.UserUri [From Sip],
    Phones1.PhoneUri [Number Dialed]

    FROM VoipDetails LEFT OUTER JOIN SessionDetails
    ON VoipDetails.SessionIdTime = SessionDetails.SessionIdTime AND VoipDetails.SessionIdSeq = SessionDetails.SessionIdSeq
    LEFT OUTER JOIN Phones
    ON VoipDetails.FromNumberId = Phones.PhoneId
    LEFT OUTER JOIN Phones Phones1
    ON VoipDetails.ConnectedNumberId = Phones1.PhoneId
    LEFT OUTER JOIN Users Users1
    ON SessionDetails.User1Id = Users1.UserId

    where SessionDetails.ResponseCode = 200
    and VoipDetails.SessionIdTime between '2020-02-23 00:00:00' and '2020-01-01 00:00:00'
    order by VoipDetails.SessionIdTime

    -------------------------------------------------------------------------------------------------------------


1 additional answer

Sort by: Most helpful
  1. JimmyYang-MSFT 49,031 Reputation points Microsoft Vendor
    2021-02-09T06:38:50.273+00:00

    Hi @Arun Raj ,

    You may try to follow this link’s steps to complete it. This script will look at the LCSCDR database, which is installed when you install a Monitoring Server in your topology. The script gathers information about current calls in progress, and displays them in list.

    https://www.ucunleashed.com/1179

    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.