https://retellai.com/?utm_source=discord&utm_medium=seo logo
can we get all call history for a given time perio...
# ❓・ai-evy-support
t
@AI Evy can we get all call history for a given time period for all agents?if so can you write the code
a
Thanks for tagging me @trx598. I'll look through relevant sources and get back to you shortly.
### Answer Yes, you can retrieve call history for a given time period across all agents using the List Calls API endpoint with the
filter_criteria
parameter. [(1) ]() Here's the code:
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
  apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const callResponses = await client.call.list() ;
console.log(callResponses) ;
To filter by a specific time period, use the
start_timestamp
filter with
upper_threshold
and
lower_threshold
(in milliseconds) :
Copy code
json
{  
  "filter_criteria": {
    "start_timestamp": {  
      "upper_threshold": 1738475421000,  
      "lower_threshold": 1738475411000  
    }
  }
}
Key parameters you can use: - **limit**: Default 50, max 1000 per request - **pagination_key**: Use the last
call_id
from results to fetch the next page if you need more than 1000 calls - **sort_order**:
ascending
or
descending
(default) by
start_timestamp
If you don't specify an
agent_id
in the filter criteria, the API returns calls across all agents.
​ To learn more, see the sources I considered: [[1] List Calls](https://docs.retellai.com/api-references/list-calls) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
t
where can we get the time stamp in call hisotry on the dashboard
@AI Evy where can we get the time stamp in call hisotry on the dashboard
a
Thanks for the follow-up, @trx598. I'll get back to you soon.
### Answer I don't have specific information in the available sources about where timestamps are displayed visually in the dashboard's call history tab. However, when you retrieve call data via the API, the following timestamp fields are available: [(1) ]() [(2) ]() - **start_timestamp**: Begin timestamp (milliseconds since epoch) of the call—available after the call starts [(2) ]() - **end_timestamp**: End timestamp (milliseconds since epoch) of the call—available after the call ends For viewing call history in the dashboard, you can access analyzed conversations through the History tab, which shows your defined analysis categories in the "Conversation Analysis" column. [(3) ]() If you need the exact timestamp values for filtering or analysis, using the [List Calls API]() would give you precise
start_timestamp
and
end_timestamp
data for each call. [(1) ]()
​ To learn more, see the sources I considered: [[1] List Calls](https://docs.retellai.com/api-references/list-calls) [[2] Create Phone Call](https://docs.retellai.com/api-references/create-phone-call) [[3] Consume the analysis data](https://docs.retellai.com/features/post-call-analysis-consumption) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
t
ok do me a favor write a code to get the Listof Calls in python
@AI Evy error: Error dialing to user, SIP status code: undefined SIP error category: user_no_answer Error: twirp error unknown: canceled WHAT
a
Thanks for the follow-up, @trx598. I'll get back to you soon.
### Answer This error indicates an outbound call that failed to connect. Here's what's happening: Error Breakdown: - SIP error category:
user_no_answer
— This maps to the disconnection reason
dial_no_answer
, meaning the number dialed did not answer. [(1) ]() [(2) ]() - SIP status code: undefined — When the SIP error code is unavailable or unknown, this typically falls under
dial_failed
. [(2) ]() - twirp error unknown: canceled — This suggests the connection attempt was terminated before establishing. [(3) ]() Common Causes: - The destination number didn't pick up - The call timed out waiting for an answer - There may be telephony provider issues Troubleshooting Steps: 1. Check the call history and detailed log in the Retell Dashboard—it contains the disconnection reason, SIP error code, and error message. [(2) ]() 2. Verify the destination number is valid and can accept calls. 3. If using custom telephony: - Double-check your SIP trunk configuration and ensure you imported the correct information. - Ensure phone numbers are in E.164 format (e.g.,
+14157774444
) . [(3) ]() - Check with your telephony provider to see what error occurred on their side. [(2) ]() 4. Check if the number is marked as spam — numbers with high outbound volume spikes or low pickup rates may get blocked by carriers. You can view the full disconnection reason de
tails in your Retell Dashboard under the call's detailed logs.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
​ To learn more, see the sources I considered: [[1] Debug call disconnection](https://docs.retellai.com/reliability/debug-call-disconnect) [[2] Debug outbound connection issues](https://docs.retellai.com/reliability/debug-outbound-call) [[3] SIP Trunk Outbound Call - No SIP INVITE reaching my server](https://community.retellai.com/t/sip-trunk-outbound-call-no-sip-invite-reaching-my-server/760) ​