{"$id":"https://events-schemas.twilio.com/VoiceInsights.CallEvent/3","$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"definitions":{"Browser":{"additionalProperties":false,"description":"The browser information associated with the event.","properties":{"major":{"default":"","description":"The major version of the browser. https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"string"},"name":{"default":"","description":"The name of the browser (e.g., Chrome, Firefox, Safari). https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"string"},"version":{"default":"","description":"The full version of the browser. https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"string"}},"required":["name","major","version"],"type":"object"},"CallWrapUpEvent":{"additionalProperties":false,"description":"https://www.twilio.com/docs/voice/insights/api/call-events-resource","properties":{"duration_in_seconds":{"default":0,"description":"https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"integer"},"end_status":{"default":"unknown","description":"https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"string"}},"required":["duration_in_seconds","end_status"],"type":"object"},"ClientEventData":{"additionalProperties":false,"description":"The data associated with the client event.","properties":{"error":{"$ref":"#/definitions/ErrorInfo"},"feedback":{"$ref":"#/definitions/FeedbackInfo"},"ice_candidate_pair":{"$ref":"#/definitions/SelectedIceCandidatePair"},"metadata":{"$ref":"#/definitions/ClientMetadata"},"metric":{"$ref":"#/definitions/MetricData"}},"type":"object"},"ClientMetadata":{"additionalProperties":false,"description":"The metadata associated with the client event.","properties":{"city":{"default":"","description":"The city associated with the client's IP address. https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"string"},"client_name":{"default":"","description":"The name of the client application. https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"string"},"country_code":{"default":"","description":"The ISO 3166-1 alpha-2 country code associated with the client's IP address. https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"string"},"country_subdivision":{"default":"","description":"The subdivision (state/province) associated with the client's IP address. https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"string"},"ip_address":{"default":"","description":"The IP address of the client. https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"string"},"location":{"$ref":"#/definitions/Location"},"sdk":{"$ref":"#/definitions/TwilioSDK"}},"required":["client_name","city","country_code","country_subdivision","ip_address"],"type":"object"},"ConfigurationsEvent":{"additionalProperties":false,"description":"https://www.twilio.com/docs/voice/insights/api/call-events-resource","properties":{"configurations":{"additionalProperties":{"type":"string"},"description":"https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"object"},"languages":{"additionalProperties":{"additionalProperties":false,"properties":{"speech_model":{"default":"","description":"https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"string"},"transcription_provider":{"default":"","description":"https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"string"},"tts_provider":{"default":"","description":"https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"string"},"voice":{"default":"","description":"https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"string"}},"required":["tts_provider","voice","transcription_provider","speech_model"],"type":"object"},"description":"https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"object"}},"required":["configurations","languages"],"type":"object"},"CrelayEventData":{"additionalProperties":false,"description":"https://www.twilio.com/docs/voice/insights/api/call-events-resource","properties":{"call_wrap_up":{"$ref":"#/definitions/CallWrapUpEvent"},"configurations":{"$ref":"#/definitions/ConfigurationsEvent"},"error":{"$ref":"#/definitions/ErrorEvent"},"interrupt":{"$ref":"#/definitions/InterruptEvent"},"language_changed":{"$ref":"#/definitions/LanguageChangedEvent"},"last_token_received":{"$ref":"#/definitions/LastTokenReceivedEvent"},"name":{"default":"","description":"https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"string"},"sequence_number":{"default":0,"description":"https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"integer"},"session_id":{"default":"","description":"https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"string"},"stt_latency":{"$ref":"#/definitions/LatencyEvent"},"tts_latency":{"$ref":"#/definitions/LatencyEvent"}},"required":["session_id","name","sequence_number"],"type":"object"},"Device":{"additionalProperties":false,"description":"The device information associated with the event.","properties":{"arch":{"default":"","description":"The architecture of the device (e.g., ARM, x86). https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"string"},"model":{"default":"","description":"The model of the device (e.g., iPhone, Pixel, Galaxy). https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"string"},"type":{"default":"","description":"The type of device (e.g., mobile, tablet, desktop). https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"string"},"vendor":{"default":"","description":"The vendor of the device (e.g., Apple, Samsung, Google). https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"string"}},"required":["model","type","vendor","arch"],"type":"object"},"Engine":{"additionalProperties":false,"description":"The rendering engine information associated with the event.","properties":{"name":{"default":"","description":"The name of the rendering engine (e.g., Blink, Gecko, WebKit). https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"string"},"version":{"default":"","description":"The version of the rendering engine. https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"string"}},"required":["name","version"],"type":"object"},"ErrorEvent":{"additionalProperties":false,"description":"https://www.twilio.com/docs/voice/insights/api/call-events-resource","properties":{"error_code":{"default":0,"description":"https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"integer"},"message":{"default":"","description":"https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"string"}},"required":["error_code","message"],"type":"object"},"ErrorInfo":{"additionalProperties":false,"description":"The error information associated with the event.","properties":{"code":{"default":0,"description":"The error code associated with the event. For more information, visit https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"integer"},"message":{"default":"","description":"The error message associated with the event. For more information, visit https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"string"}},"required":["code","message"],"type":"object"},"FeedbackInfo":{"additionalProperties":false,"description":"The feedback information associated with the event.","properties":{"reason":{"default":"unknown","description":"The reason for the feedback score. For more information, visit https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"string"},"score":{"default":0,"description":"The feedback score associated with the event. For more information, visit https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"integer"}},"required":["score","reason"],"type":"object"},"GatewayEventData":{"additionalProperties":false,"description":"The data associated with the gateway event.","properties":{"metadata":{"$ref":"#/definitions/GatewayMetadata"}},"type":"object"},"GatewayMetadata":{"additionalProperties":false,"description":"The metadata associated with the gateway event.","properties":{"edge_location":{"default":"","description":"The specific edge location of the gateway. For more information, visit https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"string"},"external_ip":{"default":"","description":"The external IP address associated with the gateway. For more information, visit https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"string"},"region":{"default":"unknown_realm","description":"The region where the gateway is located. For more information, visit https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"string"},"twilio_ip":{"default":"","description":"The Twilio IP address associated with the gateway. For more information, visit https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"string"}},"required":["region","twilio_ip","external_ip","edge_location"],"type":"object"},"IceCandidate":{"additionalProperties":false,"description":"The ICE candidate information associated with the event.","properties":{"protocol":{"default":"","description":"The protocol used by the ICE candidate (e.g., udp, tcp, tls). For more information, visit https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"string"},"type":{"default":"","description":"The type of ICE candidate (e.g., host, srflx, relay). For more information, visit https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"string"}},"required":["type","protocol"],"type":"object"},"InterruptEvent":{"additionalProperties":false,"description":"https://www.twilio.com/docs/voice/insights/api/call-events-resource","properties":{"type":{"default":"DTMF","description":"https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"string"}},"required":["type"],"type":"object"},"LanguageChangedEvent":{"additionalProperties":false,"description":"https://www.twilio.com/docs/voice/insights/api/call-events-resource","properties":{"transcription_language_code":{"default":"","description":"https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"string"},"tts_language_code":{"default":"","description":"https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"string"}},"required":["tts_language_code","transcription_language_code"],"type":"object"},"LastTokenReceivedEvent":{"additionalProperties":false,"description":"https://www.twilio.com/docs/voice/insights/api/call-events-resource","properties":{"total_tokens":{"default":0,"description":"https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"integer"},"total_words":{"default":0,"description":"https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"integer"}},"required":["total_tokens","total_words"],"type":"object"},"LatencyEvent":{"additionalProperties":false,"description":"https://www.twilio.com/docs/voice/insights/api/call-events-resource","properties":{"latency_ms":{"description":"https://www.twilio.com/docs/voice/insights/api/call-events-resource","maximum":2147483647,"minimum":-2147483648,"type":"integer"}},"type":"object"},"Location":{"additionalProperties":false,"description":"The geographical location information associated with the event.","properties":{"lat":{"description":"The latitude coordinate. https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"number"},"lon":{"description":"The longitude coordinate. https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"number"}},"required":["lat","lon"],"type":"object"},"MetricData":{"additionalProperties":false,"description":"The metric data associated with the event.","properties":{"threshold":{"default":0,"description":"The threshold value for the metric. For more information, visit https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"number"},"values":{"description":"The list of metric values. For more information, visit https://www.twilio.com/docs/voice/insights/api/call-events-resource","items":{"description":"A metric value. For more information, visit https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"number"},"type":"array"}},"required":["threshold","values"],"type":"object"},"Os":{"additionalProperties":false,"description":"The operating system information associated with the event.","properties":{"name":{"default":"","description":"The name of the operating system (e.g., Windows, macOS, Linux). https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"string"},"version":{"default":"","description":"The version of the operating system. https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"string"}},"required":["name","version"],"type":"object"},"SelectedIceCandidatePair":{"additionalProperties":false,"description":"The selected ICE candidate pair information associated with the event.","properties":{"local":{"$ref":"#/definitions/IceCandidate"},"remote":{"$ref":"#/definitions/IceCandidate"}},"type":"object"},"TwilioSDK":{"additionalProperties":false,"description":"The Twilio SDK information associated with the event.","properties":{"browser":{"$ref":"#/definitions/Browser"},"device":{"$ref":"#/definitions/Device"},"edge_location":{"default":"","description":"The specific edge location used by the SDK. https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"string"},"engine":{"$ref":"#/definitions/Engine"},"os":{"$ref":"#/definitions/Os"},"platform":{"default":"","description":"The platform on which the Twilio SDK is running (e.g., iOS, Android, Web). https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"string"},"region":{"default":"unknown_realm","description":"The region where the SDK is operating. https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"string"},"selected_region":{"default":"","description":"The specific region selected by the SDK. https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"string"},"type":{"default":"","description":"The type of Twilio SDK (e.g., Voice, Video). https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"string"},"version":{"default":"","description":"The version of the Twilio SDK. https://www.twilio.com/docs/voice/insights/api/call-events-resource","type":"string"}},"required":["type","version","platform","region","selected_region","edge_location"],"type":"object"}},"description":"This schema represents a Call Event resource in Twilio's Voice Insights API. For more details, visit https://www.twilio.com/docs/voice/insights/api/call-events-resource","examples":[{"account_sid":"AC0000000000000000000000000000001","call_sid":"CA0000000000000000000000000000001","carrier_edge":{"metadata":{"edge_location":"ashburn","external_ip":"172.0.0.130","region":"us1","twilio_ip":"172.0.0.130"}},"client_edge":{"metadata":{"edge_location":"ashburn","external_ip":"172.0.0.130","region":"us1","twilio_ip":"172.0.0.130"}},"conversation_relay_data":{"call_wrap_up":{"duration_in_seconds":185,"end_status":"ended"},"configurations":{"configurations":{"debug":"[SPEAKER_EVENT_REPORT]","dtmfDetection":"true","interruptOptions":"InterruptOptions{interruptConfidenceThreshold=0.8, ignoreBackchannelForInterrupt=false, interruptCheckThresholdType=by-chars, interruptInputLengthThreshold=5}","interruptible":"TRUE","partialPromptOnHangup":"false","partialPrompts":"false","preemptible":"FALSE","reportInputDuringAgentSpeech":"NONE","speechProvider":"nova-3-general","speechTimeout":"0","transcriptionLanguage":"en-US","transcriptionProvider":"deepgram","ttsLanguage":"en-US","ttsProvider":"block_elevenlabs","voice":"3liN8q8YoeB9Hk6AboKe-1.0_0.7_0.8","welcomeGreetingInterruptible":"TRUE"},"languages":{"en-US":{"speech_model":"nova-3-general","transcription_provider":"deepgram","tts_provider":"block_elevenlabs","voice":"3liN8q8YoeB9Hk6AboKe-1.0_0.7_0.8"},"es-US":{"speech_model":"nova-2-general","transcription_provider":"deepgram","tts_provider":"block_elevenlabs","voice":"94zOad0g7T7K4oa7zhDq-0.9_0.7_0.8"}}},"error":{"error_code":54000,"message":"ConversationRelay session encountered an error."},"interrupt":{"type":"DTMF"},"language_changed":{"transcription_language_code":"es-US","tts_language_code":"es-US"},"last_token_received":{"total_tokens":128,"total_words":42},"name":"conversation-relay-event-example-all-in-one","sequence_number":1,"session_id":"VX0000000000000000000000000000001","stt_latency":{"latency_ms":150},"tts_latency":{"latency_ms":230}},"edge":"ashburn","group":"call","level":"UNKNOWN","name":"call.connected","sdk_edge":{"error":{"code":31600,"message":"Call failed due to network issues."},"feedback":{"reason":"excellent_audio","score":1},"ice_candidate_pair":{"local":{"protocol":"udp","type":"host"},"remote":{"protocol":"udp","type":"host"}},"metadata":{"city":"San Francisco","client_name":"MyVoiceApp","country_code":"US","country_subdivision":"CA","ip_address":"172.0.0.130","location":{"lat":20.956036,"lon":-157.23793},"sdk":{"browser":{"major":"89","name":"Chrome","version":"89.0.4389.90"},"device":{"arch":"ARM","model":"iPhone","type":"mobile","vendor":"Apple"},"edge_location":"ashburn","engine":{"name":"Blink","version":"89.0.4389.90"},"os":{"name":"Windows","version":"10"},"platform":"iOS","region":"us1","selected_region":"us1","type":"Voice","version":"2.0.0"}},"metric":{"threshold":0.5,"values":[0.1]}},"sip_edge":{"metadata":{"edge_location":"ashburn","external_ip":"172.0.0.130","region":"us1","twilio_ip":"172.0.0.130"}},"timestamp":"2021-05-24T14:15:22Z"}],"properties":{"account_sid":{"description":"The unique identifier for the account associated with this event.","type":"string"},"call_sid":{"description":"The unique identifier for the call associated with this event.","type":"string"},"carrier_edge":{"$ref":"#/definitions/GatewayEventData"},"client_edge":{"$ref":"#/definitions/GatewayEventData"},"conversation_relay_data":{"$ref":"#/definitions/CrelayEventData"},"edge":{"description":"The Twilio edge location that handled the event.","type":"string"},"group":{"description":"The group category of the event.","type":"string"},"level":{"default":"UNKNOWN","description":"The level of the event.","type":"string"},"name":{"description":"The name of the event.","type":"string"},"sdk_edge":{"$ref":"#/definitions/ClientEventData"},"sip_edge":{"$ref":"#/definitions/GatewayEventData"},"timestamp":{"description":"The timestamp of the event in ISO 8601 format (e.g., 2021-05-24T14:15:22Z).","format":"date-time","type":"string"}},"required":["timestamp","call_sid","account_sid","edge","name","group","level"],"title":"CallEvent","type":"object","x-twilio-eventstreams-customer-traceparent":false}