Call Duration
# support
b
What is the best way to get the duration of the call? I have Server Events setup and getting the End of Call Report, but couldn't find this... Am I missing something?
v
message has been deleted
@Bankroll The End of Call Report should provide you with the reason the call ended, but it seems you're looking for the duration of the call which might not be directly included in that report. Typically, to calculate the call duration, you would record the timestamp when the call status changes to "in-progress" and again when it changes to "ended". The difference between these two timestamps would give you the call duration. If your current setup does not include timestamps or the duration is not being reported, you may need to adjust your server-side logic to calculate this. You could store the start time when you receive the "in-progress" event and then subtract it from the end time when you receive the "ended" event. If you need further assistance with implementing this or if there's a specific feature of VAPI that you think might help, please let me know, and I'll be happy to assist you further!
You can continue this conversation by mentioning me in the message.
@Bankroll Sweet. Have a great day!
@Vapi Sweet. Have a great day!
2 Views