API FAQs
Leg details API to get all participants details of a Call
3 min
this document outlines an api to query all the participants in the completed calls the use case where this api will be useful calls where more than 2 participants were there in a call for ex dialer, cold transfer, connect after connect listen, whisper or barge use case more details of lwb api is here note in order to use this api, one needs to provide the callsid of the completed call this is a dependency for the api note to enable this api in your account, please reach out to hello\@exotel com to get the details of a call , you will need to make a http get request to https //\<your api key> \<your api token>@\<subdomain>/v1/accounts/ exotel sid /calls/\<callsid>/legs \<callsid> is the sid of the call 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 in the api settings page of your exotel dashboard in the case of an outbound call originating via the call apis (here or here), the "sid" parameter is returned in the xml response to your request in the 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/json (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 ) response body on success { "metadata" { "total" 3, "count" 3 }, "legs" \[ { "sid" "xxxxxxxxxxxxxx", "callsid" "xxxxxxxxxxxxxx", "accountsid" "exotelt", "phonenumber" "xxxxxxxxxxxxxx", "status" "completed", "origin" "outbound", "lastaction" "", "datecreated" "2021 06 24 11 12 39", "dateupdated" "2021 06 24 11 13 08", "oncallduration" 25, "uri" "/v1/accounts/exotelt/calls/xxxxxxxxxxxxxx/legs/xxxxxxxxxxxxxx" }, { "sid" "xxxxxxxxxxxxxx", "callsid" "xxxxxxxxxxxxxx", "accountsid" "exotelt", "phonenumber" "xxxxxxxxxxxxxx", "status" "completed", "origin" "outbound dial", "lastaction" "", "datecreated" "2021 06 24 11 12 48", "dateupdated" "2021 06 24 11 12 57", "oncallduration" 5, "uri" "/v1/accounts/exotelt/calls/xxxxxxxxxxxxxx/legs/xxxxxxxxxxxxxx" }, { "sid" "xxxxxxxxxxxxxx", "callsid" "xxxxxxxxxxxxxx", "accountsid" "exotelt", "phonenumber" "xxxxxxxxxxxxxx", "status" "completed", "origin" "outbound dial", "lastaction" "", "datecreated" "2021 06 24 11 12 58", "dateupdated" "2021 06 24 11 13 07", "starttime" "2021 06 24 11 12 58", "endtime" "2021 06 24 11 13 08", "exophone" "xxxxxxxxxx", "backupecophone" "xxxxxxxxxx", "oncallduration" 4, "uri" "/v1/accounts/exotelt/calls/xxxxxxxxxxxxxx/legs/xxxxxxxxxxxxxx" } ] } the "status" parameter can take one of the following values queued in progress completed failed busy no answer the "origin" parameter can take one of the following values inbound customers dialing into exotel virtual number outbound 1st leg of connect api outbound dial subsequent dial out from exotel platform post 1st leg is established ( either via inbound/outbound) monitor supervisor leg performing the listen / whisper / barge actions response body on failure { "restexception" { "code" 400, "message" "bad request", "description" "please check the callsid passed" } } 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
🤔
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.