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?