Calls
Answered/Ringing event in CRM
8 min
today exotel gives status callbacks when the call reaches terminal event when used for outbound connecting two numbers and when used in connect applet exotel gives status callback for dial and terminal event now exotel powers answered and ringing event as an intermediate state when the agent/customer is ringing or picking up the call so that more definitive action can be taken on the call in the crms ( like assigning a ticket to the agent, etc ) how to get answered event in crm 1\ using connect applet the agent pass through is a part of the 'connect' applet when configured with a url, exotel will pass on to that url details of the agent who is currently being called it makes a get request to the url with the following query parameters true 162 unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type note to get answered event in the connect applet, this needs to be enabled by exotel for your account 2\ using outbound api connecting agent to customer note please refer to this to understand the connect api in detail https //developer exotel com/api/#call agent while using the api, one can subscribe now for more event types and specify in the below parameter in the api request true unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type when the answered event is subscribed, the exotel platform shall send a post request to the status callback url a sample request for connecting two numbers via api with the answered event curl x post 'https //\<your api key> \<your api token>@api exotel com/v1/accounts/\<your account sid>/calls/connect json?from=\<from no>\&to=\<to number>\&statuscallback=\<your url endpoint>\&statuscallbackevents\\\[0\\]=terminal\&statuscallbackevents\\\[1\\]=answered' a sample post request when the first leg is answered { 	"callsid" "xxxxxxxxxxxxxxxx", 	"eventtype" “answered", 	"datecreated" "2019 04 08 03 17 59", 	"dateupdated" "2019 04 08 03 18 35", 	"eventtime" "2019 04 08 03 18 35", 	"status" "no answer", 	"to" "+91886799xxxx", 	"from" "+91941374xxxx", 	"phonenumbersid" "0113083xxxx", 	"starttime" "2019 04 08 03 17 59", 	"endtime" "null", 	"direction" "outbound api", 	"recordingurl" null, 	"conversationduration" 32, 	"legs" \[ 	 { 	 "oncallduration" null, 	 "status" "in progress" 	 }, 	 { 	 "oncallduration" null, 	 "status" "null" 	 } 	] } a sample example when the second leg is answered { 	"callsid" "xxxxxxxxxxxxxxxxxxxxx", 	"eventtype" “answered", 	"datecreated" "2019 04 08 03 17 59", 	"dateupdated" "2019 04 08 03 18 35", 	"eventtime" "2019 04 08 03 18 35", 	"status" "no answer", 	"to" "+91886799xxxx", 	"from" "+91941374xxxx", 	"phonenumbersid" "0113083xxxx", 	"starttime" "2019 04 08 03 17 59", 	"endtime" "null", 	"direction" "outbound api", 	"recordingurl" null, 	"conversationduration" 32, 	"legs" \[ 	 { 	 "oncallduration" null, 	 "status" "in progress" 	 }, 	 { 	 "oncallduration" null, 	 "status" "in progress" 	 } 	] } a sample request for connecting two numbers via api with a ringing event curl x post 'https //\<your api key> \<your api token>@api exotel com/v1/accounts/\<your account sid>/calls/connect json?from=\<from no>\&to=\<to number>\&statuscallback=\<your url endpoint>\&statuscallbackevents\\\[0\\]=terminal\&statuscallbackevents\\\[1\\]=ringing' a sample example is when the first leg is ringing { 	"callsid" "09c14403fb2a31097ba5ed64f9251646", 	"eventtype" "ringing", 	"datecreated" "2022 04 06 10 44 40", 	"dateupdated" "2022 04 06 10 44 41", 	"status" "in progress", 	"to" "08780296135", 	"from" "07874762218", 	"phonenumbersid" "08044556678", 	"starttime" "2022 04 06 10 44 41", 	"endtime" null, 	"eventtime" "2022 04 06 10 44 41", 	"direction" "outbound api", 	"recordingurl" null, 	"conversationduration" null, 	"legs" \[ 	 { 	 "oncallduration" null, 	 "status" "in progress" 	 }, 	 { 	 "oncallduration" null, 	 "status" null 	 } 	] } a sample example is when the second leg is ringing { 	"callsid" "09c14403fb2a31097ba5ed64f9251646", 	"eventtype" "ringing", 	"datecreated" "2022 04 06 10 44 40", 	"dateupdated" "2022 04 06 10 44 46", 	"status" "in progress", 	"to" "08780296135", 	"from" "07874762218", 	"phonenumbersid" "08044556678", 	"starttime" "2022 04 06 10 44 44", 	"endtime" null, 	"eventtime" "2022 04 06 10 44 46", 	"direction" "outbound api", 	"recordingurl" null, 	"conversationduration" null, 	"legs" \[ 	 { 	 "oncallduration" null, 	 "status" "in progress" 	 }, 	 { 	 "oncallduration" null, 	 "status" "in progress" 	 } 	] } a sample example of terminal statuscallback with ringing duration { 	"callsid" "054cfcd8910389ff64882d8e25211646", 	"eventtype" "terminal", 	"datecreated" "2022 04 06 10 48 00", 	"dateupdated" "2022 04 06 10 48 16", 	"status" "completed", 	"to" "08780296135", 	"from" "07874762218", 	"phonenumbersid" "08044556678", 	"starttime" "2022 04 06 10 48 04", 	"endtime" "2022 04 06 10 48 16", 	"eventtime" "2022 04 06 10 48 16", 	"direction" "outbound api", 	"recordingurl" "https //s3 us west 2 amazonaws com/exotel us3 recordings/ree5e1us3/054cfcd8910389ff64882d8e25211646 mp3", 	"conversationduration" 6, 	"legs" \[ 	 { 	 "oncallduration" 12, 	 "ringingduration" 4, 	 "status" "completed" 	 }, 	 { 	 "oncallduration" 6, 	 "ringingduration" 3, 	 "status" "completed" 	 } 	] } note the ringing event is dependent on the operator and it may not be reported if the operator doesn't provide it in certain cases if the ringing event is not available then the ringduration is set as 0 how to get this enabled for an account? you can raise a request with hello\@exotel com or reach out to your account managers in exotel to enable this feature in your account
Have a question?
Our super-smart AI, 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.
