0
votes

My approach of using twilio is to setup a local freeswitch to connect twilio with sip protocol.

The way is exactly as the following document describes.
https://www.twilio.com/docs/api/twilio-sip

How could I retrieve call duration?
I find there is a rest api(/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}) which are able to be used to retrieve call duration. Is it suitable for my case?

1

1 Answers

1
votes

I retrieve the duration by the answer and disconnect event from freeswitch. It may have some error due to network delay, but works for my case.