06-02-2022 10:04 PM
Call object in List Calls / Get Call Details API has 'personality' field(originator, terminator and clickToDial).
When is the personality marked as 'clickToDial'?
In addition,
What is the best practice to detect whether a call is 'incoming' or 'outgoing' on receiving telephony_calls:created webhook event?
Solved! Go to Solution.
06-03-2022 12:40 AM
As the Dial API definition states:
Initiate an outbound call to a specified destination. This is also commonly referred to as Click to Call or Click to Dial. Alerts on all the devices belonging to the user. When the user answers on one of these alerting devices, an outbound call is placed from that device to the destination.
w.r.t this question - What is the best practice to detect whether a call is 'incoming' or 'outgoing' on receiving telephony_calls:created webhook event?
As per my understanding, that depends on perspective of the users who are involved in the call. For example in the below dummy telephony_calls:created webhook event: For the user mentioned in actorPersonId, its an outgoing call as this user has originated the call ("personality": "originator"). Whereas, for the user mentioned in remoteParty > personId its an incoming call.
{ "id": "XXXXXXX", "name": "Demo Telephony Calls:Create", "targetUrl": "https://dummy_url.com", "resource": "telephony_calls", "event": "created", "orgId": "XXXXXXX", "createdBy": "XXXXXXX", "appId": "XXXXXXX", "ownedBy": "creator", "status": "active", "created": "2022-06-03T13:00:43.713Z", "data": { "eventType": "originated", "actorPersonId": "XXXXXXX", "eventTimestamp": "2021-06-02T14:52:12.066Z", "callId": "XXXXXXX", "callSessionId": "XXXXXXX", "personality": "originator", "state": "connecting", "remoteParty": { "name": "Test User", "number": "2000", "personId": "XXXXXXX", "privacyEnabled": false, "callType": "location" }, "appearance": 1, "created": "2022-06-03T13:05:12.064Z" } }
Hope this helps!
06-03-2022 12:40 AM
As the Dial API definition states:
Initiate an outbound call to a specified destination. This is also commonly referred to as Click to Call or Click to Dial. Alerts on all the devices belonging to the user. When the user answers on one of these alerting devices, an outbound call is placed from that device to the destination.
w.r.t this question - What is the best practice to detect whether a call is 'incoming' or 'outgoing' on receiving telephony_calls:created webhook event?
As per my understanding, that depends on perspective of the users who are involved in the call. For example in the below dummy telephony_calls:created webhook event: For the user mentioned in actorPersonId, its an outgoing call as this user has originated the call ("personality": "originator"). Whereas, for the user mentioned in remoteParty > personId its an incoming call.
{ "id": "XXXXXXX", "name": "Demo Telephony Calls:Create", "targetUrl": "https://dummy_url.com", "resource": "telephony_calls", "event": "created", "orgId": "XXXXXXX", "createdBy": "XXXXXXX", "appId": "XXXXXXX", "ownedBy": "creator", "status": "active", "created": "2022-06-03T13:00:43.713Z", "data": { "eventType": "originated", "actorPersonId": "XXXXXXX", "eventTimestamp": "2021-06-02T14:52:12.066Z", "callId": "XXXXXXX", "callSessionId": "XXXXXXX", "personality": "originator", "state": "connecting", "remoteParty": { "name": "Test User", "number": "2000", "personId": "XXXXXXX", "privacyEnabled": false, "callType": "location" }, "appearance": 1, "created": "2022-06-03T13:05:12.064Z" } }
Hope this helps!
06-05-2022 11:49 PM
This is very helpful!
Thank you!!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide