Skip to main content
Question

Inconsistent Telephony Sessions Extension Events Schema

  • January 30, 2025
  • 3 replies
  • 29 views

Forum|alt.badge.img
[{'type': 'ServerNotification', 'messageId': 'xxxxxx', 'status': 200, 'headers': {'RCRequestId': 'xxxxxxx'}}, {'uuid': 'xxxxx', 'event': '/restapi/v1.0/account/xxxxxx/extension/xxxxxx/telephony/sessions', 'timestamp': '2025-01-29T14:17:14.428Z', 'subscriptionId': 'xxxxxx-xxxx-xxxx-a9f4-xxxxxx', 'ownerId': '63047761004', 'body': {'sequence': 3, 'sessionId': 'xxxxxx', 'telephonySessionId': 's-xxxxx', 'serverId': '10.13.121.172.TAM', 'eventTime': '2025-01-29T14:17:14.308Z', 'parties': [{'accountId': 'xxxxx', 'extensionId': 'xxxx', 'id': 'p-xxxxx-1', 'direction': 'Outbound', 'to': {'phoneNumber': '+xxxxxx'}, 'from': {'phoneNumber': '+xxxxxx', 'name': 'xxx xxxx', 'extensionId': 'xxxxx', 'deviceId': 'xx'}, 'status': {'code': 'Answered', 'rcc': False}, 'park': {}, 'missedCall': False, 'standAlone': False, 'muted': False}], 'origin': {'type': 'CallOut'}}}]

Another event with the same status but recordings field added 

[{'type': 'ServerNotification', 'messageId': 'xxxx', 'status': 200, 'headers': {'RCRequestId': 'xxxx'}}, {'uuid': 'xxxx', 'event': '/restapi/v1.0/account/xxxx/extension/xxxx/telephony/sessions', 'timestamp': '2025-01-29T14:17:24.135Z', 'subscriptionId': '1f528df6-xxx-4dbe-xxx-xxxxxx', 'ownerId': 'xxxx', 'body': {'sequence': 7, 'sessionId': 'xxxxx', 'telephonySessionId': 'xxxxxx', 'serverId': '10.13.121.172.TAM', 'eventTime': '2025-01-29T14:17:24.063Z', 'parties': [{'accountId': 'xxx', 'extensionId': 'xxx', 'id': 'p-xxxx-1', 'direction': 'Outbound', 'to': {'phoneNumber': '+xxxx'}, 'from': {'phoneNumber': '+xxxxx', 'name': 'xxx xxxx', 'extensionId': 'xxx', 'deviceId': 'xxxx'}, 'recordings': [{'id': 'xxxxxx', 'active': True}], 'status': {'code': 'Answered', 'rcc': False}, 'park': {}, 'missedCall': False, 'standAlone': False, 'muted': False}], 'origin': {'type': 'CallOut'}}}]

Where can I see the event structures or different event types which can help me handle such status accordingly?

PhongVu
Community Manager
Forum|alt.badge.img
  • Community Manager
  • January 30, 2025

The first event with the status.code:”Answered” without the ‘recordings’ object is the event when the call is answered. Then you will get more events with the same status.code:”Answered” with the ‘recordings’ object when the call recording started (active:True), paused (active:False), resumed (active:True) or stopped (active:False).

So if you only need to identified when the call is answered, grab the first “Answered” event, get the timestamp or any data you need, and ignore other subsequent events with the “Answered” status and the ‘recordings’ object.

 


Forum|alt.badge.img
  • Known Participant
  • January 31, 2025

PhongVu
Community Manager
Forum|alt.badge.img
  • Community Manager
  • January 31, 2025
kutbuddin wrote:

Answered in the other thread. not sure why I missed that question :).


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings