question

pritesh gondalia avatar image
pritesh gondalia asked Phong Vu answered

How can I fetch external number CALL & SMS log in RingCentral API? C# & RingCentral.Net

How can I fetch external number CALL & SMS log in RingCentral API? C# & RingCentral.Net


I am using a test account as a Developer admin

I am using the below code to get the call logs for all users

Now I am facing an issue for the below case

I am doing text(SMS) & call the phone number which is outside the ring central

I am using that number as my private number

But I am not getting log for SMS and Call to that end number which I am using from my cell phone for calling, message, and any other purpose

//Get all call logs in single list variables
ReadCompanyCallLogParameters readCompanyCallLogParameters = new ReadCompanyCallLogParameters
{
    direction = new[] { "Inbound", "Outbound" },
    type = new[] { "Voice" },
    view = "Simple",
    dateFrom = dateFrom,
    dateTo = dateTo,
};

_logger.LogDebug("GetAllCallLogs In");
AccountCallLogResponse callList = await rc.Restapi().Account(accountId).CallLog().List(readCompanyCallLogParameters);


sdk
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Phong Vu avatar image
Phong Vu answered

I don't know how you made the call and what you actually got from your call log. But each call record should contain the "from" and "to" data.

"to" : {
      "phoneNumber" : "+16505556678"
    },
"from" : {
      "phoneNumber" : "+18552001907",
      "name" : "John Smith"
}

For text messages, you have to read using the /message-store API, not the /call-log API. And remember that, there is no account level API to read the message store of all extensions. You have to detect the extension id and read one-by-one using the extension id.

1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys