question

len-ott avatar image
len-ott asked len-ott answered

Not getting all data for extension


I see others have asked this, but I haven't seen a response that works for me.
I am trying to get all call log data for a specific extension in C#. I am using the code below.
This return 3 records for 9/20/2021, however, the web portal shows 16 records for 9/20 on this date.

Also, I noticed the api is returning one marked VOIP that does NOT show up from the web portal?
Is this a problem with the account I am using for the API? Happy to send a code sample.

var pageNum = 1 
ReadCompanyCallLogParameters readCompanyCallLogParameters = new ReadCompanyCallLogParameters
                    {
                        extensionNumber = "3020",
                        dateFrom = "2021-09-19T00:00:00.000Z",
                        dateTo = "2021-09-22T00:00:00.000Z",
                        page = pageNum,
                        perPage = 1000,
                    };
                    r = await rc.Restapi().Account(accountId).CallLog().List(readCompanyCallLogParameters);

rest api
1 |3000

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

len-ott avatar image
len-ott answered

Note, I get the exact same results when using the online "Try It Out", same number of records.

1 |3000

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

Phong Vu avatar image
Phong Vu answered

Check the id (extension id is different from extension number) of the extension "3020", then call the read user call log using that extension id instead.

var parameters = new ReadUserCallLogParameters();
parameters.dateFrom = "2021-09-19T00:00:00.000Z";
parameters.dateTo = "2021-09-22T00:00:00.000Z"
var resp = await rcsdk.Restapi().Account().Extension("id").CallLog().List(parameters);
1 |3000

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

len-ott avatar image
len-ott answered

Phong, How do I get 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.

Anirban avatar image
Anirban answered
1 |3000

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

len-ott avatar image
len-ott answered Anirban commented

Ok I will try again. When I tried this yesterday I was getting an error that the account I was using was not allowed or authorized...

1 comment
1 |3000

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

Anirban avatar image Anirban commented ·

You need access token

0 Likes 0 ·
len-ott avatar image
len-ott answered Phong Vu commented

Looks like I need to create a new 'app' with more permissions? I am still puzzled why the

`rc.Restapi().Account(accountId).CallLog().List(readCompanyCallLogParameters)` doesn't return all of the call data? So for 10/1 to 10/8 I get 20 records, but when I look in the console, I see 435?!

Anyway, once my new app is approved for production I will try using the extensionID, which I can now get.

1 comment
1 |3000

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

Phong Vu avatar image Phong Vu ♦♦ commented ·

It's important to know how did you read the call log. You should not use the extension number as the query filter because that will return only records containing the extension number matching with that number. It is not all the call records of that extension. What console do you mean? Was that the call log from the service web?

0 Likes 0 ·
len-ott avatar image
len-ott answered

I am trying to read the entire call log (all extensions) using C# :
r = await rc.Restapi().Account(accountId).CallLog().List(readCompanyCallLogParameters);
and not setting any extension. I started setting the extension number asit was easier test.
My problems is I am NOT getting all calls, just a subset and I don't see what that subset is!



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