Skip to main content
Question

Not getting all data for extension

  • September 23, 2021
  • 9 replies
  • 499 views

  • Participating Frequently
  • 5 replies


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);

9 replies

  • Author
  • Participating Frequently
  • 5 replies
  • September 23, 2021

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


PhongVu
Community Manager
Forum|alt.badge.img
  • Community Manager
  • 2314 replies
  • September 24, 2021

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);

  • Author
  • Participating Frequently
  • 5 replies
  • September 24, 2021

Phong, How do I get the Extension ID?



  • Author
  • Participating Frequently
  • 5 replies
  • September 24, 2021

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...


You need access token


  • Author
  • Participating Frequently
  • 5 replies
  • October 9, 2021

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.


PhongVu
Community Manager
Forum|alt.badge.img
  • Community Manager
  • 2314 replies
  • October 9, 2021

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?


  • Author
  • Participating Frequently
  • 5 replies
  • October 14, 2021

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!




Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings