API FAQs
Call API to get details of a Call
1 min
to get details of a call (including status, price, etc ), you will need to make an http get request to https //\<your api key> \<your api token>@\<subdomain>/v1/accounts/ exotel sid /calls/\<callsid> replace \<your api key> and \<your api token> with the api key and token created by you replace \<your sid> with your “account sid” replace \<subdomain> with the region of your account \<subdomain> of singapore cluster is @api exotel com \<subdomain> of mumbai cluster is @api in exotel com \<your api key>, \<your api token> and \<your sid> are available on the api settings page of your exotel dashboard in case of an outbound call originating via the call apis (here or here), the "sid" parameter is as returned in the xml response to your request in case of inbound calls, you can get the callsid by using the passthru applet http response on success , this api will return an http status code of 200 and the response body will contain an xml (like below) that contains the details of the call on failure , the http status code will be a non 200 code which indicates the reason (as discussed here ) important note some of the parameters of the call (like duration, price, endtime etc ) are updated asynchronously after the call ends so it might take some time after the call ends ( 5 mins on average) for these parameters to be populated correctly response body on success \<?xml version="1 0" encoding="utf 8"?>\<twilioresponse>\<call>\<sid>xxxxxxxxxxxxxxxxxxxx\</sid>\<parentcallsid/>\<datecreated>2012 08 17 12 31 49\</datecreated>\<dateupdated>2012 08 17 12 31 49\</dateupdated>\<accountsid>xxxxxxxxx\</accountsid>\<to>09052161119\</to>\<from>09739761117\</from>\<phonenumbersid>xxxxxxx\</phonenumbersid>\<status>completed\</status>\<starttime>2012 08 17 12 31 49\</starttime>\<endtime>2012 08 17 12 32 57\</endtime>\<duration>123\</duration>\<price>2 3\</price>\<direction>outbound api\</direction>\<answeredby/>\<forwardedfrom/>\<callername/>\<recordingurl/>\<uri>/v1/accounts/xxxxxxxx/calls/xxxxxxxxxxxxxx\</uri>\</call>\</twilioresponse> the "status" parameter can take one of the following values \ queued \ in progress \ completed \ failed \ busy \ no answer response body on failure \<?xml version="1 0" encoding="utf 8"?>\<twilioresponse>\<restexception>\<status>xxx\</status>\<message>xxxxxxxxxxxxxxxxxxxx\</message>\</restexception>\</twilioresponse> rate limit this api is rate limited to 200 queries per minute once this limit has been crossed, your requests will be rejected with an http 429 'too many requests' code a detailed explanation about using the call detail api can be understood from our developer portal
🤔
Have a question?
Our knowledgeable support team and an awesome community will get you an answer in a flash.
To ask a question or participate in discussions, you'll need to authenticate first.