News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Search
Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
Sandbox Unable to get old calls...
Tags: developer sandbox
Sep 29, 2015 at 8:34am   •   6 replies  •  0 likes
stephen-godfrey

For the past few weeks I've been able to get calls using the api call "Get Call Log Records by Filter". Yet this morning I couldn't get any calls. I logged into my sandbox panel and could still see them, but couldn't pull them via the api. I doubled checked dates (i'm pulling from Jan 1st, this year), and other settings, but still nothing. I tried the api explorer and still nothing.

On a hunch, I called my line one more time. Then that one call showed up via my api guzzle call, and with the API explorer. I'm pretty sure i've got my code setup correctly, but I wonder why I can't get the older calls that I can see in my sandbox account panel.


So


  1. Does the sandbox API exclude older calls (I can't get ones older than 19 days),
  2. If so, why?
  3. And will this behavior still happen when I move to production?


Cheers!


Stephen

6 Answers
answered on Sep 30, 2015 at 12:13pm  
1. You say that the date filters are not set properly, but what do you mean by that? The api docs suggest that the dates are in ISO 8601 format (eg: 2012-09-17T12:51:00.000Z), and that is what I am entering in. 

Your dateTo parameter is set to future date. It shouldnt cause any issue but try to avoid the future date. The format looks fine for me. The dateFrom and dateTo should be set in such a way that there should be constant time interval between each call and change the dateTo and dateFrom keeping the same interval and append to the previous call-log data.

For Eg:  if the datefrom and dateTo has 15 min interval - you retrive the call-log data for 15min and set the dateFrom = dateTo and dateTo = dateTo+15min. and apeend every data that you get to the previous data. Handle the failure case as well. 

2. Basically I want to make sure that I grab every call that has been logged (as active calls don't show up anyway when using the filtered call log), so I set the date ahead. It's like building a sql query that says give me all the data from this date to a future date, just as a precautionary measure. Is this okay?


Active - Call API /v1.0/account/{accountId}/active-calls  will help you retrive latest calls and the call in progress for the account . This can be used to get all the latest calls along with active calls- caals in progress - along with filters. I think this api is more suitable for your app. 


3. If you look in the logs, all those 'too many requests' happened while I was just testing. I know how to handle that kind of response, and I will admit that sometimes i'll test the system a little heavy, and that I should wait, but heavy testing is not the issue. The issue is that this morning I made an api call, and the system returned false information, and kept returning false information until noon. I'm not angry, I just need to know if I can depend on the api to get correct data when I ask. So, what do you suggest we do?

When ever you throttle the system, you add up a penalty for the throttle and you need to wait for sometime before making the next api call ( when 429 error occurs penalty of nearly 1 min is applied where you need to add a delay before next call) Thats the reason you got an error message. Yes testing is necesary but please make sure you add the delay when you are throttled. One of our graudation criteria to move you app to production involves throttle free app. 

And you are right, that 'get active calls' feature would be awesome, but that only exists in the JavaScript sdk, and I am using the standard API using guzzle calls. Anything like the active calls in the api? In the future, i'll plan to just pull the calls for a given day and set this up to run consistently via cron, so I likely won't set a future date. 

I have mentioned above the api for active call - /v1.0/account/{accountId}/active-calls  it is not SDK specific. Please read our API doc for further details.


 0
answered on Sep 29, 2015 at 3:30pm  
Thanks for getting back to me. 

1. You say that the date filters are not set properly, but what do you mean by that? The api docs suggest that the dates are in ISO 8601 format (eg: 2012-09-17T12:51:00.000Z), and that is what I am entering in. 
2. Basically I want to make sure that I grab every call that has been logged (as active calls don't show up anyway when using the filtered call log), so I set the date ahead. It's like building a sql query that says give me all the data from this date to a future date, just as a precautionary measure. Is this okay?
3. If you look in the logs, all those 'too many requests' happened while I was just testing. I know how to handle that kind of response, and I will admit that sometimes i'll test the system a little heavy, and that I should wait, but heavy testing is not the issue. The issue is that this morning I made an api call, and the system returned false information, and kept returning false information until noon. I'm not angry, I just need to know if I can depend on the api to get correct data when I ask. So, what do you suggest we do?

And you are right, that 'get active calls' feature would be awesome, but that only exists in the JavaScript sdk, and I am using the standard API using guzzle calls. Anything like the active calls in the api? In the future, i'll plan to just pull the calls for a given day and set this up to run consistently via cron, so I likely won't set a future date. 

Most of all thanks for looking into this, and I look forward to your reply. 



 0
answered on Sep 29, 2015 at 2:05pm  
Hi Stephen,

After checking your error logs, There are few issues I would like to point out.
1. I see that your datefrom and dateto  filter for call-log API is not set properly.
2. dateto filter is future date
3. Your RPM( Request per Minute) for call-log calls is more that the RPM set for your usage plan- you are making more than 10 calls per minute and hence you get a 429 -  Too many Requests error (Please visit this link for more info:https://devcommunity.ringcentral.com/ringcentraldev/topics/429-too-many-requests-error )

If you are trying to access most recent calls - please use /Active-calls api instead of /call-log api . For more info visit this link: http://ringcentral.github.io/cti-tutorial/#view-active-calls

Let me know if you have any more questions.

 0
answered on Sep 29, 2015 at 12:03pm  
Definitely not. The company I am working for is called turnkey storage, and the sandbox phone number for the app is +15856234243.

What is interesting is that the api would only return the 2 new test calls I placed today, but not the old ones. Then around noon, it would return all of them. I didn't change the code, so it is likely that something happened on ring central side. 

Best of luck figuring this out. 

 0
answered on Sep 29, 2015 at 10:52am  
Hi Stephen,
Is your organization "Eangee"? If not can you provide me your organization name? 

 0
answered on Sep 29, 2015 at 10:28am  
Well that was fun. It looks like someone fixed it, or something happened that it started working again. This whole morning I've been pulling results, testing, and truncating my call log table. Then all of a sudden I had all my calls show up. 

Any back story to what happened?

 0



A new Community is coming to RingCentral!

Posts are currently read-only as we transition into our new platform.

We thank you for your patience
during this downtime.

Try Workflow Builder

Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!

Try RingCentral Workflow Builder

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

RESOURCES
Resource center
Blog
Product Releases
Accessibility
QUICK LINKS
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us