Loading...
Loading...
Compare original and translation side by side
gem install telnyxgem install telnyxrequire "telnyx"
client = Telnyx::Client.new(
api_key: ENV["TELNYX_API_KEY"], # This is the default and can be omitted
)clientrequire "telnyx"
client = Telnyx::Client.new(
api_key: ENV["TELNYX_API_KEY"], # 这是默认配置,可以省略
)clientbegin
result = client.messages.send_(to: "+13125550001", from: "+13125550002", text: "Hello")
rescue Telnyx::Errors::APIConnectionError
puts "Network error — check connectivity and retry"
rescue Telnyx::Errors::RateLimitError
# 429: rate limited — wait and retry with exponential backoff
sleep(1) # Check Retry-After header for actual delay
rescue Telnyx::Errors::APIStatusError => e
puts "API error #{e.status}: #{e.message}"
if e.status == 422
puts "Validation error — check required fields and formats"
end
end401403404422429begin
result = client.messages.send_(to: "+13125550001", from: "+13125550002", text: "Hello")
rescue Telnyx::Errors::APIConnectionError
puts "网络错误 — 检查网络连接后重试"
rescue Telnyx::Errors::RateLimitError
# 429:触发限流 — 等待后使用指数退避策略重试
sleep(1) # 实际等待时长请参考Retry-After响应头
rescue Telnyx::Errors::APIStatusError => e
puts "API错误 #{e.status}: #{e.message}"
if e.status == 422
puts "验证错误 — 检查必填字段和格式是否正确"
end
end401403404422429.auto_paging_eachpage.auto_paging_each { |item| puts item.id }.auto_paging_eachpage.auto_paging_each { |item| puts item.id }POST /calls/{call_control_id}/actions/enqueuequeue_nameclient_statecommand_idkeep_after_hangupmax_sizemax_wait_time_secsresponse = client.calls.actions.enqueue("call_control_id", queue_name: "support")
puts(response)resultPOST /calls/{call_control_id}/actions/enqueuequeue_nameclient_statecommand_idkeep_after_hangupmax_sizemax_wait_time_secsresponse = client.calls.actions.enqueue("call_control_id", queue_name: "support")
puts(response)resultPOST /calls/{call_control_id}/actions/leave_queueclient_statecommand_idresponse = client.calls.actions.leave_queue("v3:550e8400-e29b-41d4-a716-446655440000_gRU1OGRkYQ")
puts(response)resultPOST /calls/{call_control_id}/actions/leave_queueclient_statecommand_idresponse = client.calls.actions.leave_queue("v3:550e8400-e29b-41d4-a716-446655440000_gRU1OGRkYQ")
puts(response)resultexpires_atGET /conferencespage = client.conferences.list
puts(page)connection_idcreated_atend_reasonended_byexpires_atidnamerecord_typeregionstatusupdated_atexpires_atGET /conferencespage = client.conferences.list
puts(page)connection_idcreated_atend_reasonended_byexpires_atidnamerecord_typeregionstatusupdated_atcall_control_idPOST /conferencescall_control_idnamebeep_enabledclient_statecomfort_noisecommand_idduration_minuteshold_audio_urlhold_media_namemax_participantsregionstart_conference_on_createconference = client.conferences.create(
call_control_id: "v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg",
name: "Business"
)
puts(conference)connection_idcreated_atend_reasonended_byexpires_atidnamerecord_typeregionstatusupdated_atcall_control_idPOST /conferencescall_control_idnamebeep_enabledclient_statecomfort_noisecommand_idduration_minuteshold_audio_urlhold_media_namemax_participantsregionstart_conference_on_createconference = client.conferences.create(
call_control_id: "v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg",
name: "Business"
)
puts(conference)connection_idcreated_atend_reasonended_byexpires_atidnamerecord_typeregionstatusupdated_atGET /conferences/{conference_id}/participantspage = client.conferences.list_participants("550e8400-e29b-41d4-a716-446655440000")
puts(page)call_control_idcall_leg_idconferencecreated_atend_conference_on_exitidmutedon_holdrecord_typesoft_end_conference_on_exitstatusupdated_atwhisper_call_control_idsGET /conferences/{conference_id}/participantspage = client.conferences.list_participants("550e8400-e29b-41d4-a716-446655440000")
puts(page)call_control_idcall_leg_idconferencecreated_atend_conference_on_exitidmutedon_holdrecord_typesoft_end_conference_on_exitstatusupdated_atwhisper_call_control_idsGET /conferences/{id}conference = client.conferences.retrieve("550e8400-e29b-41d4-a716-446655440000")
puts(conference)connection_idcreated_atend_reasonended_byexpires_atidnamerecord_typeregionstatusupdated_atGET /conferences/{id}conference = client.conferences.retrieve("550e8400-e29b-41d4-a716-446655440000")
puts(conference)connection_idcreated_atend_reasonended_byexpires_atidnamerecord_typeregionstatusupdated_atPOST /conferences/{id}/actions/endcommand_idresponse = client.conferences.actions.end_conference("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
puts(response)resultPOST /conferences/{id}/actions/endcommand_idresponse = client.conferences.actions.end_conference("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
puts(response)resultPOST /conferences/{id}/actions/gather_using_audiocall_control_idaudio_urlclient_stategather_idinitial_timeout_millisinter_digit_timeout_millisinvalid_audio_urlinvalid_media_namemaximum_digitsmaximum_triesmedia_nameminimum_digitsstop_playback_on_dtmfterminating_digittimeout_millisvalid_digitsresponse = client.conferences.actions.gather_dtmf_audio(
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
call_control_id: "v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg"
)
puts(response)resultPOST /conferences/{id}/actions/gather_using_audiocall_control_idaudio_urlclient_stategather_idinitial_timeout_millisinter_digit_timeout_millisinvalid_audio_urlinvalid_media_namemaximum_digitsmaximum_triesmedia_nameminimum_digitsstop_playback_on_dtmfterminating_digittimeout_millisvalid_digitsresponse = client.conferences.actions.gather_dtmf_audio(
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
call_control_id: "v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg"
)
puts(response)resultPOST /conferences/{id}/actions/holdaudio_urlcall_control_idsmedia_nameregionresponse = client.conferences.actions.hold("550e8400-e29b-41d4-a716-446655440000")
puts(response)resultPOST /conferences/{id}/actions/holdaudio_urlcall_control_idsmedia_nameregionresponse = client.conferences.actions.hold("550e8400-e29b-41d4-a716-446655440000")
puts(response)resultcall_control_idmax_participantsPOST /conferences/{id}/actions/joincall_control_idbeep_enabledclient_statecommand_idend_conference_on_exitholdhold_audio_urlhold_media_namemuteregionsoft_end_conference_on_exitstart_conference_on_entersupervisor_rolewhisper_call_control_idsresponse = client.conferences.actions.join(
"id",
call_control_id: "v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg"
)
puts(response)resultcall_control_idmax_participantsPOST /conferences/{id}/actions/joincall_control_idbeep_enabledclient_statecommand_idend_conference_on_exitholdhold_audio_urlhold_media_namemuteregionsoft_end_conference_on_exitstart_conference_on_entersupervisor_rolewhisper_call_control_idsresponse = client.conferences.actions.join(
"id",
call_control_id: "v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg"
)
puts(response)resultconference.participant.leftPOST /conferences/{id}/actions/leavecall_control_idbeep_enabledcommand_idregionresponse = client.conferences.actions.leave("id", call_control_id: "c46e06d7-b78f-4b13-96b6-c576af9640ff")
puts(response)resultconference.participant.leftPOST /conferences/{id}/actions/leavecall_control_idbeep_enabledcommand_idregionresponse = client.conferences.actions.leave("id", call_control_id: "c46e06d7-b78f-4b13-96b6-c576af9640ff")
puts(response)resultPOST /conferences/{id}/actions/mutecall_control_idsregionresponse = client.conferences.actions.mute("550e8400-e29b-41d4-a716-446655440000")
puts(response)resultPOST /conferences/{id}/actions/mutecall_control_idsregionresponse = client.conferences.actions.mute("550e8400-e29b-41d4-a716-446655440000")
puts(response)resultPOST /conferences/{id}/actions/playaudio_urlcall_control_idsloopmedia_nameregionresponse = client.conferences.actions.play("550e8400-e29b-41d4-a716-446655440000")
puts(response)resultPOST /conferences/{id}/actions/playaudio_urlcall_control_idsloopmedia_nameregionresponse = client.conferences.actions.play("550e8400-e29b-41d4-a716-446655440000")
puts(response)resultPOST /conferences/{id}/actions/record_pausecommand_idrecording_idregionresponse = client.conferences.actions.record_pause("550e8400-e29b-41d4-a716-446655440000")
puts(response)resultPOST /conferences/{id}/actions/record_pausecommand_idrecording_idregionresponse = client.conferences.actions.record_pause("550e8400-e29b-41d4-a716-446655440000")
puts(response)resultPOST /conferences/{id}/actions/record_resumecommand_idrecording_idregionresponse = client.conferences.actions.record_resume("550e8400-e29b-41d4-a716-446655440000")
puts(response)resultPOST /conferences/{id}/actions/record_resumecommand_idrecording_idregionresponse = client.conferences.actions.record_resume("550e8400-e29b-41d4-a716-446655440000")
puts(response)resultconference.recording.savedPOST /conferences/{id}/actions/record_startformatchannelscommand_idcustom_file_nameplay_beepregiontrimresponse = client.conferences.actions.record_start("id", format_: :wav)
puts(response)resultconference.recording.savedPOST /conferences/{id}/actions/record_startformatchannelscommand_idcustom_file_nameplay_beepregiontrimresponse = client.conferences.actions.record_start("id", format_: :wav)
puts(response)resultconference.recording.savedPOST /conferences/{id}/actions/record_stopclient_statecommand_idrecording_idregionresponse = client.conferences.actions.record_stop("550e8400-e29b-41d4-a716-446655440000")
puts(response)resultconference.recording.savedPOST /conferences/{id}/actions/record_stopclient_statecommand_idrecording_idregionresponse = client.conferences.actions.record_stop("550e8400-e29b-41d4-a716-446655440000")
puts(response)resultPOST /conferences/{id}/actions/send_dtmfdigitscall_control_idsclient_stateduration_millisresponse = client.conferences.actions.send_dtmf("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", digits: "1234#")
puts(response)resultPOST /conferences/{id}/actions/send_dtmfdigitscall_control_idsclient_stateduration_millisresponse = client.conferences.actions.send_dtmf("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", digits: "1234#")
puts(response)resultPOST /conferences/{id}/actions/speakpayloadvoicecall_control_idscommand_idlanguagepayload_typeregionvoice_settingsresponse = client.conferences.actions.speak("id", payload: "Say this to participants", voice: "female")
puts(response)resultPOST /conferences/{id}/actions/speakpayloadvoicecall_control_idscommand_idlanguagepayload_typeregionvoice_settingsresponse = client.conferences.actions.speak("id", payload: "Say this to participants", voice: "female")
puts(response)resultPOST /conferences/{id}/actions/stopcall_control_idsregionresponse = client.conferences.actions.stop("550e8400-e29b-41d4-a716-446655440000")
puts(response)resultPOST /conferences/{id}/actions/stopcall_control_idsregionresponse = client.conferences.actions.stop("550e8400-e29b-41d4-a716-446655440000")
puts(response)resultPOST /conferences/{id}/actions/unholdcall_control_idsregionresponse = client.conferences.actions.unhold(
"id",
call_control_ids: ["v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg"]
)
puts(response)resultPOST /conferences/{id}/actions/unholdcall_control_idsregionresponse = client.conferences.actions.unhold(
"id",
call_control_ids: ["v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg"]
)
puts(response)resultPOST /conferences/{id}/actions/unmutecall_control_idsregionresponse = client.conferences.actions.unmute("550e8400-e29b-41d4-a716-446655440000")
puts(response)resultPOST /conferences/{id}/actions/unmutecall_control_idsregionresponse = client.conferences.actions.unmute("550e8400-e29b-41d4-a716-446655440000")
puts(response)resultPOST /conferences/{id}/actions/updatecall_control_idsupervisor_rolecommand_idregionwhisper_call_control_idsaction = client.conferences.actions.update(
"id",
call_control_id: "v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg",
supervisor_role: :whisper
)
puts(action)resultPOST /conferences/{id}/actions/updatecall_control_idsupervisor_rolecommand_idregionwhisper_call_control_idsaction = client.conferences.actions.update(
"id",
call_control_id: "v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg",
supervisor_role: :whisper
)
puts(action)resultGET /conferences/{id}/participants/{participant_id}response = client.conferences.retrieve_participant("participant_id", id: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
puts(response)call_control_idcall_leg_idconference_idcreated_atend_conference_on_exitidlabelmutedon_holdsoft_end_conference_on_exitstatusupdated_atwhisper_call_control_idsGET /conferences/{id}/participants/{participant_id}response = client.conferences.retrieve_participant("participant_id", id: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
puts(response)call_control_idcall_leg_idconference_idcreated_atend_conference_on_exitidlabelmutedon_holdsoft_end_conference_on_exitstatusupdated_atwhisper_call_control_idsPATCH /conferences/{id}/participants/{participant_id}beep_enabledend_conference_on_exitsoft_end_conference_on_exitresponse = client.conferences.update_participant("participant_id", id: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
puts(response)call_control_idcall_leg_idconference_idcreated_atend_conference_on_exitidlabelmutedon_holdsoft_end_conference_on_exitstatusupdated_atwhisper_call_control_idsPATCH /conferences/{id}/participants/{participant_id}beep_enabledend_conference_on_exitsoft_end_conference_on_exitresponse = client.conferences.update_participant("participant_id", id: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
puts(response)call_control_idcall_leg_idconference_idcreated_atend_conference_on_exitidlabelmutedon_holdsoft_end_conference_on_exitstatusupdated_atwhisper_call_control_idsGET /queuespage = client.queues.list
puts(page)average_wait_time_secscreated_atcurrent_sizeidmax_sizenamerecord_typeupdated_atGET /queuespage = client.queues.list
puts(page)average_wait_time_secscreated_atcurrent_sizeidmax_sizenamerecord_typeupdated_atPOST /queuesqueue_namemax_sizequeue = client.queues.create(queue_name: "tier_1_support")
puts(queue)average_wait_time_secscreated_atcurrent_sizeidmax_sizenamerecord_typeupdated_atPOST /queuesqueue_namemax_sizequeue = client.queues.create(queue_name: "tier_1_support")
puts(queue)average_wait_time_secscreated_atcurrent_sizeidmax_sizenamerecord_typeupdated_atGET /queues/{queue_name}queue = client.queues.retrieve("queue_name")
puts(queue)average_wait_time_secscreated_atcurrent_sizeidmax_sizenamerecord_typeupdated_atGET /queues/{queue_name}queue = client.queues.retrieve("queue_name")
puts(queue)average_wait_time_secscreated_atcurrent_sizeidmax_sizenamerecord_typeupdated_atPOST /queues/{queue_name}max_sizequeue = client.queues.update("queue_name", max_size: 200)
puts(queue)average_wait_time_secscreated_atcurrent_sizeidmax_sizenamerecord_typeupdated_atPOST /queues/{queue_name}max_sizequeue = client.queues.update("queue_name", max_size: 200)
puts(queue)average_wait_time_secscreated_atcurrent_sizeidmax_sizenamerecord_typeupdated_atDELETE /queues/{queue_name}result = client.queues.delete("queue_name")
puts(result)DELETE /queues/{queue_name}result = client.queues.delete("queue_name")
puts(result)GET /queues/{queue_name}/callspage = client.queues.calls.list("queue_name")
puts(page)call_control_idcall_leg_idcall_session_idconnection_idenqueued_atfromis_alivequeue_idqueue_positionrecord_typetowait_time_secsGET /queues/{queue_name}/callspage = client.queues.calls.list("queue_name")
puts(page)call_control_idcall_leg_idcall_session_idconnection_idenqueued_atfromis_alivequeue_idqueue_positionrecord_typetowait_time_secsGET /queues/{queue_name}/calls/{call_control_id}call = client.queues.calls.retrieve("call_control_id", queue_name: "my-queue")
puts(call)call_control_idcall_leg_idcall_session_idconnection_idenqueued_atfromis_alivequeue_idqueue_positionrecord_typetowait_time_secsGET /queues/{queue_name}/calls/{call_control_id}call = client.queues.calls.retrieve("call_control_id", queue_name: "my-queue")
puts(call)call_control_idcall_leg_idcall_session_idconnection_idenqueued_atfromis_alivequeue_idqueue_positionrecord_typetowait_time_secsPATCH /queues/{queue_name}/calls/{call_control_id}keep_after_hangupresult = client.queues.calls.update("call_control_id", queue_name: "my-queue")
puts(result)PATCH /queues/{queue_name}/calls/{call_control_id}keep_after_hangupresult = client.queues.calls.update("call_control_id", queue_name: "my-queue")
puts(result)DELETE /queues/{queue_name}/calls/{call_control_id}result = client.queues.calls.remove("call_control_id", queue_name: "my-queue")
puts(result)DELETE /queues/{queue_name}/calls/{call_control_id}result = client.queues.calls.remove("call_control_id", queue_name: "my-queue")
puts(result)telnyx-signature-ed25519telnyx-timestampundefinedtelnyx-signature-ed25519telnyx-timestampundefined
The following webhook events are sent to your configured webhook URL.
All webhooks include `telnyx-timestamp` and `telnyx-signature-ed25519` headers for Ed25519 signature verification. Use `client.webhooks.unwrap()` to verify.
| Event | Description |
|-------|-------------|
| `callEnqueued` | Call Enqueued |
| `callLeftQueue` | Call Left Queue |
| `conferenceCreated` | Conference Created |
| `conferenceEnded` | Conference Ended |
| `conferenceFloorChanged` | Conference Floor Changed |
| `conferenceParticipantJoined` | Conference Participant Joined |
| `conferenceParticipantLeft` | Conference Participant Left |
| `conferenceParticipantPlaybackEnded` | Conference Participant Playback Ended |
| `conferenceParticipantPlaybackStarted` | Conference Participant Playback Started |
| `conferenceParticipantSpeakEnded` | Conference Participant Speak Ended |
| `conferenceParticipantSpeakStarted` | Conference Participant Speak Started |
| `conferencePlaybackEnded` | Conference Playback Ended |
| `conferencePlaybackStarted` | Conference Playback Started |
| `conferenceRecordingSaved` | Conference Recording Saved |
| `conferenceSpeakEnded` | Conference Speak Ended |
| `conferenceSpeakStarted` | Conference Speak Started |
以下Webhook事件会发送到你配置的Webhook地址。所有Webhook都携带`telnyx-timestamp`和`telnyx-signature-ed25519`请求头用于Ed25519签名验证,可以使用`client.webhooks.unwrap()`进行验证。
| 事件 | 描述 |
|-------|-------------|
| `callEnqueued` | 通话已入列 |
| `callLeftQueue` | 通话已出列 |
| `conferenceCreated` | 会议已创建 |
| `conferenceEnded` | 会议已结束 |
| `conferenceFloorChanged` | 会议发言权限变更 |
| `conferenceParticipantJoined` | 参会者已加入会议 |
| `conferenceParticipantLeft` | 参会者已离开会议 |
| `conferenceParticipantPlaybackEnded` | 参会者侧音频播放结束 |
| `conferenceParticipantPlaybackStarted` | 参会者侧音频播放开始 |
| `conferenceParticipantSpeakEnded` | 参会者侧语音合成播放结束 |
| `conferenceParticipantSpeakStarted` | 参会者侧语音合成播放开始 |
| `conferencePlaybackEnded` | 会议全局音频播放结束 |
| `conferencePlaybackStarted` | 会议全局音频播放开始 |
| `conferenceRecordingSaved` | 会议录制文件已保存 |
| `conferenceSpeakEnded` | 会议全局语音合成播放结束 |
| `conferenceSpeakStarted` | 会议全局语音合成播放开始 |callEnqueued| Field | Type | Description |
|---|---|---|
| enum: event | Identifies the type of the resource. |
| enum: call.enqueued | The type of event being delivered. |
| uuid | Identifies the type of resource. |
| date-time | ISO 8601 datetime of when the event occurred. |
| string | Call ID used to issue commands via Call Control API. |
| string | Call Control App ID (formerly Telnyx connection ID) used in the call. |
| string | ID that is unique to the call and can be used to correlate webhook events. |
| string | ID that is unique to the call session and can be used to correlate webhook events. |
| string | State received from a command. |
| string | The name of the queue |
| integer | Current position of the call in the queue. |
| integer | Average time call spends in the queue in seconds. |
callLeftQueue| Field | Type | Description |
|---|---|---|
| enum: event | Identifies the type of the resource. |
| enum: call.dequeued | The type of event being delivered. |
| uuid | Identifies the type of resource. |
| date-time | ISO 8601 datetime of when the event occurred. |
| string | Call ID used to issue commands via Call Control API. |
| string | Call Control App ID (formerly Telnyx connection ID) used in the call. |
| string | ID that is unique to the call and can be used to correlate webhook events. |
| string | ID that is unique to the call session and can be used to correlate webhook events. |
| string | State received from a command. |
| string | The name of the queue |
| integer | Last position of the call in the queue. |
| enum: bridged, bridging-in-process, hangup, leave, timeout | The reason for leaving the queue |
| integer | Time call spent in the queue in seconds. |
conferenceCreated| Field | Type | Description |
|---|---|---|
| enum: event | Identifies the type of the resource. |
| enum: conference.created | The type of event being delivered. |
| uuid | Identifies the type of resource. |
| string | Call ID used to issue commands via Call Control API. |
| string | Call Control App ID (formerly Telnyx connection ID) used in the call. |
| string | ID that is unique to the call and can be used to correlate webhook events. |
| string | ID that is unique to the call session and can be used to correlate webhook events. |
| string | State received from a command. |
| string | Conference ID that the participant joined. |
| date-time | ISO 8601 datetime of when the event occurred. |
conferenceEnded| Field | Type | Description |
|---|---|---|
| enum: event | Identifies the type of the resource. |
| enum: conference.ended | The type of event being delivered. |
| uuid | Identifies the type of resource. |
| string | Call ID used to issue commands via Call Control API. |
| string | Call Control App ID (formerly Telnyx connection ID) used in the call. |
| string | ID that is unique to the call and can be used to correlate webhook events. |
| string | ID that is unique to the call session and can be used to correlate webhook events. |
| string | State received from a command. |
| string | Conference ID that the participant joined. |
| date-time | ISO 8601 datetime of when the event occurred. |
| enum: all_left, host_left, time_exceeded | Reason the conference ended. |
conferenceFloorChanged| Field | Type | Description |
|---|---|---|
| enum: event | Identifies the type of the resource. |
| enum: conference.floor.changed | The type of event being delivered. |
| uuid | Identifies the type of resource. |
| string | Call Control ID of the new speaker. |
| string | Call Control App ID (formerly Telnyx connection ID) used in the call. |
| string | Call Leg ID of the new speaker. |
| string | Call Session ID of the new speaker. |
| string | State received from a command. |
| string | Conference ID that had a speaker change event. |
| date-time | ISO 8601 datetime of when the event occurred. |
conferenceParticipantJoined| Field | Type | Description |
|---|---|---|
| enum: event | Identifies the type of the resource. |
| enum: conference.participant.joined | The type of event being delivered. |
| uuid | Identifies the type of resource. |
| date-time | ISO 8601 datetime of when the event occurred. |
| string | Call ID used to issue commands via Call Control API. |
| string | Call Control App ID (formerly Telnyx connection ID) used in the call. |
| string | ID that is unique to the call and can be used to correlate webhook events. |
| string | ID that is unique to the call session and can be used to correlate webhook events. |
| string | State received from a command. |
| string | Conference ID that the participant joined. |
conferenceParticipantLeft| Field | Type | Description |
|---|---|---|
| enum: event | Identifies the type of the resource. |
| enum: conference.participant.left | The type of event being delivered. |
| uuid | Identifies the type of resource. |
| date-time | ISO 8601 datetime of when the event occurred. |
| string | Call ID used to issue commands via Call Control API. |
| string | Call Control App ID (formerly Telnyx connection ID) used in the call. |
| string | ID that is unique to the call and can be used to correlate webhook events. |
| string | ID that is unique to the call session and can be used to correlate webhook events. |
| string | State received from a command. |
| string | Conference ID that the participant joined. |
conferenceParticipantPlaybackEnded| Field | Type | Description |
|---|---|---|
| enum: event | Identifies the type of the resource. |
| enum: conference.participant.playback.ended | The type of event being delivered. |
| uuid | Identifies the type of resource. |
| string | Participant's call ID used to issue commands via Call Control API. |
| string | ID that is unique to the call and can be used to correlate webhook events. |
| string | ID that is unique to the call session and can be used to correlate webhook events. |
| string | State received from a command. |
| string | Call Control App ID (formerly Telnyx connection ID) used in the call. |
| string | ID that is unique to the call session that started the conference. |
| string | ID of the conference the text was spoken in. |
| string | The audio URL being played back, if audio_url has been used to start. |
| string | The name of the audio media file being played back, if media_name has been used to start. |
| date-time | ISO 8601 datetime of when the event occurred. |
conferenceParticipantPlaybackStarted| Field | Type | Description |
|---|---|---|
| enum: event | Identifies the type of the resource. |
| enum: conference.participant.playback.started | The type of event being delivered. |
| uuid | Identifies the type of resource. |
| string | Participant's call ID used to issue commands via Call Control API. |
| string | ID that is unique to the call and can be used to correlate webhook events. |
| string | ID that is unique to the call session and can be used to correlate webhook events. |
| string | State received from a command. |
| string | Call Control App ID (formerly Telnyx connection ID) used in the call. |
| string | ID that is unique to the call session that started the conference. |
| string | ID of the conference the text was spoken in. |
| string | The audio URL being played back, if audio_url has been used to start. |
| string | The name of the audio media file being played back, if media_name has been used to start. |
| date-time | ISO 8601 datetime of when the event occurred. |
conferenceParticipantSpeakEnded| Field | Type | Description |
|---|---|---|
| enum: event | Identifies the type of the resource. |
| enum: conference.participant.speak.ended | The type of event being delivered. |
| uuid | Identifies the type of resource. |
| string | Participant's call ID used to issue commands via Call Control API. |
| string | ID that is unique to the call and can be used to correlate webhook events. |
| string | ID that is unique to the call session and can be used to correlate webhook events. |
| string | State received from a command. |
| string | Call Control App ID (formerly Telnyx connection ID) used in the call. |
| string | ID that is unique to the call session that started the conference. |
| string | ID of the conference the text was spoken in. |
| date-time | ISO 8601 datetime of when the event occurred. |
conferenceParticipantSpeakStarted| Field | Type | Description |
|---|---|---|
| enum: event | Identifies the type of the resource. |
| enum: conference.participant.speak.started | The type of event being delivered. |
| uuid | Identifies the type of resource. |
| string | Participant's call ID used to issue commands via Call Control API. |
| string | ID that is unique to the call and can be used to correlate webhook events. |
| string | ID that is unique to the call session and can be used to correlate webhook events. |
| string | State received from a command. |
| string | Call Control App ID (formerly Telnyx connection ID) used in the call. |
| string | ID that is unique to the call session that started the conference. |
| string | ID of the conference the text was spoken in. |
| date-time | ISO 8601 datetime of when the event occurred. |
conferencePlaybackEnded| Field | Type | Description |
|---|---|---|
| enum: event | Identifies the type of the resource. |
| enum: conference.playback.ended | The type of event being delivered. |
| uuid | Identifies the type of resource. |
| string | Call Control App ID (formerly Telnyx connection ID) used in the call. |
| string | ID that is unique to the call session that started the conference. |
| string | ID of the conference the text was spoken in. |
| string | The audio URL being played back, if audio_url has been used to start. |
| string | The name of the audio media file being played back, if media_name has been used to start. |
| date-time | ISO 8601 datetime of when the event occurred. |
conferencePlaybackStarted| Field | Type | Description |
|---|---|---|
| enum: event | Identifies the type of the resource. |
| enum: conference.playback.started | The type of event being delivered. |
| uuid | Identifies the type of resource. |
| string | Call Control App ID (formerly Telnyx connection ID) used in the call. |
| string | ID that is unique to the call session that started the conference. |
| string | ID of the conference the text was spoken in. |
| string | The audio URL being played back, if audio_url has been used to start. |
| string | The name of the audio media file being played back, if media_name has been used to start. |
| date-time | ISO 8601 datetime of when the event occurred. |
conferenceRecordingSaved| Field | Type | Description |
|---|---|---|
| enum: event | Identifies the type of the resource. |
| enum: conference.recording.saved | The type of event being delivered. |
| uuid | Identifies the type of resource. |
| string | Participant's call ID used to issue commands via Call Control API. |
| string | ID that is unique to the call session and can be used to correlate webhook events. |
| string | State received from a command. |
| enum: single, dual | Whether recording was recorded in |
| uuid | ID of the conference that is being recorded. |
| string | Call Control App ID (formerly Telnyx connection ID) used in the call. |
| enum: wav, mp3 | The audio file format used when storing the call recording. |
| date-time | ISO 8601 datetime of when recording ended. |
| uuid | ID of the conference recording. |
| date-time | ISO 8601 datetime of when recording started. |
conferenceSpeakEnded| Field | Type | Description |
|---|---|---|
| enum: event | Identifies the type of the resource. |
| enum: conference.speak.ended | The type of event being delivered. |
| uuid | Identifies the type of resource. |
| string | Call Control App ID (formerly Telnyx connection ID) used in the call. |
| string | ID that is unique to the call session that started the conference. |
| string | ID of the conference the text was spoken in. |
| date-time | ISO 8601 datetime of when the event occurred. |
conferenceSpeakStarted| Field | Type | Description |
|---|---|---|
| enum: event | Identifies the type of the resource. |
| enum: conference.speak.started | The type of event being delivered. |
| uuid | Identifies the type of resource. |
| string | Call Control App ID (formerly Telnyx connection ID) used in the call. |
| string | ID that is unique to the call session that started the conference. |
| string | ID of the conference the text was spoken in. |
| date-time | ISO 8601 datetime of when the event occurred. |
callEnqueued| 字段 | 类型 | 描述 |
|---|---|---|
| 枚举:event | 标识资源类型 |
| 枚举:call.enqueued | 推送的事件类型 |
| uuid | 标识资源类型 |
| date-time | 事件发生的ISO 8601格式时间 |
| 字符串 | 用于通过呼叫控制API下发指令的通话ID |
| 字符串 | 通话使用的呼叫控制应用ID(原Telnyx连接ID) |
| 字符串 | 通话唯一ID,可用于关联Webhook事件 |
| 字符串 | 通话会话唯一ID,可用于关联Webhook事件 |
| 字符串 | 从指令中获取的状态信息 |
| 字符串 | 队列名称 |
| 整数 | 通话在队列中的当前位置 |
| 整数 | 队列中通话的平均等待时长,单位秒 |
callLeftQueue| 字段 | 类型 | 描述 |
|---|---|---|
| 枚举:event | 标识资源类型 |
| 枚举:call.dequeued | 推送的事件类型 |
| uuid | 标识资源类型 |
| date-time | 事件发生的ISO 8601格式时间 |
| 字符串 | 用于通过呼叫控制API下发指令的通话ID |
| 字符串 | 通话使用的呼叫控制应用ID(原Telnyx连接ID) |
| 字符串 | 通话唯一ID,可用于关联Webhook事件 |
| 字符串 | 通话会话唯一ID,可用于关联Webhook事件 |
| 字符串 | 从指令中获取的状态信息 |
| 字符串 | 队列名称 |
| 整数 | 通话在队列中的最后位置 |
| 枚举:bridged, bridging-in-process, hangup, leave, timeout | 离开队列的原因 |
| 整数 | 通话在队列中的等待时长,单位秒 |
conferenceCreated| 字段 | 类型 | 描述 |
|---|---|---|
| 枚举:event | 标识资源类型 |
| 枚举:conference.created | 推送的事件类型 |
| uuid | 标识资源类型 |
| 字符串 | 用于通过呼叫控制API下发指令的通话ID |
| 字符串 | 通话使用的呼叫控制应用ID(原Telnyx连接ID) |
| 字符串 | 通话唯一ID,可用于关联Webhook事件 |
| 字符串 | 通话会话唯一ID,可用于关联Webhook事件 |
| 字符串 | 从指令中获取的状态信息 |
| 字符串 | 参会者加入的会议ID |
| date-time | 事件发生的ISO 8601格式时间 |
conferenceEnded| 字段 | 类型 | 描述 |
|---|---|---|
| 枚举:event | 标识资源类型 |
| 枚举:conference.ended | 推送的事件类型 |
| uuid | 标识资源类型 |
| 字符串 | 用于通过呼叫控制API下发指令的通话ID |
| 字符串 | 通话使用的呼叫控制应用ID(原Telnyx连接ID) |
| 字符串 | 通话唯一ID,可用于关联Webhook事件 |
| 字符串 | 通话会话唯一ID,可用于关联Webhook事件 |
| 字符串 | 从指令中获取的状态信息 |
| 字符串 | 参会者加入的会议ID |
| date-time | 事件发生的ISO 8601格式时间 |
| 枚举:all_left, host_left, time_exceeded | 会议结束的原因 |
conferenceFloorChanged| 字段 | 类型 | 描述 |
|---|---|---|
| 枚举:event | 标识资源类型 |
| 枚举:conference.floor.changed | 推送的事件类型 |
| uuid | 标识资源类型 |
| 字符串 | 新发言人的呼叫控制ID |
| 字符串 | 通话使用的呼叫控制应用ID(原Telnyx连接ID) |
| 字符串 | 新发言人的通话支路ID |
| 字符串 | 新发言人的通话会话ID |
| 字符串 | 从指令中获取的状态信息 |
| 字符串 | 发生发言人变更的会议ID |
| date-time | 事件发生的ISO 8601格式时间 |
conferenceParticipantJoined| 字段 | 类型 | 描述 |
|---|---|---|
| 枚举:event | 标识资源类型 |
| 枚举:conference.participant.joined | 推送的事件类型 |
| uuid | 标识资源类型 |
| date-time | 事件发生的ISO 8601格式时间 |
| 字符串 | 用于通过呼叫控制API下发指令的通话ID |
| 字符串 | 通话使用的呼叫控制应用ID(原Telnyx连接ID) |
| 字符串 | 通话唯一ID,可用于关联Webhook事件 |
| 字符串 | 通话会话唯一ID,可用于关联Webhook事件 |
| 字符串 | 从指令中获取的状态信息 |
| 字符串 | 参会者加入的会议ID |
conferenceParticipantLeft| 字段 | 类型 | 描述 |
|---|---|---|
| 枚举:event | 标识资源类型 |
| 枚举:conference.participant.left | 推送的事件类型 |
| uuid | 标识资源类型 |
| date-time | 事件发生的ISO 8601格式时间 |
| 字符串 | 用于通过呼叫控制API下发指令的通话ID |
| 字符串 | 通话使用的呼叫控制应用ID(原Telnyx连接ID) |
| 字符串 | 通话唯一ID,可用于关联Webhook事件 |
| 字符串 | 通话会话唯一ID,可用于关联Webhook事件 |
| 字符串 | 从指令中获取的状态信息 |
| 字符串 | 参会者加入的会议ID |
conferenceParticipantPlaybackEnded| 字段 | 类型 | 描述 |
|---|---|---|
| 枚举:event | 标识资源类型 |
| 枚举:conference.participant.playback.ended | 推送的事件类型 |
| uuid | 标识资源类型 |
| 字符串 | 参会者的呼叫控制ID,用于通过呼叫控制API下发指令 |
| 字符串 | 通话唯一ID,可用于关联Webhook事件 |
| 字符串 | 通话会话唯一ID,可用于关联Webhook事件 |
| 字符串 | 从指令中获取的状态信息 |
| 字符串 | 通话使用的呼叫控制应用ID(原Telnyx连接ID) |
| 字符串 | 发起会议的通话会话的唯一ID |
| 字符串 | 播放音频的会议ID |
| 字符串 | 播放的音频URL(通过audio_url启动播放时存在) |
| 字符串 | 播放的音频媒体文件名称(通过media_name启动播放时存在) |
| date-time | 事件发生的ISO 8601格式时间 |
conferenceParticipantPlaybackStarted| 字段 | 类型 | 描述 |
|---|---|---|
| 枚举:event | 标识资源类型 |
| 枚举:conference.participant.playback.started | 推送的事件类型 |
| uuid | 标识资源类型 |
| 字符串 | 参会者的呼叫控制ID,用于通过呼叫控制API下发指令 |
| 字符串 | 通话唯一ID,可用于关联Webhook事件 |
| 字符串 | 通话会话唯一ID,可用于关联Webhook事件 |
| 字符串 | 从指令中获取的状态信息 |
| 字符串 | 通话使用的呼叫控制应用ID(原Telnyx连接ID) |
| 字符串 | 发起会议的通话会话的唯一ID |
| 字符串 | 播放音频的会议ID |
| 字符串 | 播放的音频URL(通过audio_url启动播放时存在) |
| 字符串 | 播放的音频媒体文件名称(通过media_name启动播放时存在) |
| date-time | 事件发生的ISO 8601格式时间 |
conferenceParticipantSpeakEnded| 字段 | 类型 | 描述 |
|---|---|---|
| 枚举:event | 标识资源类型 |
| 枚举:conference.participant.speak.ended | 推送的事件类型 |
| uuid | 标识资源类型 |
| 字符串 | 参会者的呼叫控制ID,用于通过呼叫控制API下发指令 |
| 字符串 | 通话唯一ID,可用于关联Webhook事件 |
| 字符串 | 通话会话唯一ID,可用于关联Webhook事件 |
| 字符串 | 从指令中获取的状态信息 |
| 字符串 | 通话使用的呼叫控制应用ID(原Telnyx连接ID) |
| 字符串 | 发起会议的通话会话的唯一ID |
| 字符串 | 播放语音合成内容的会议ID |
| date-time | 事件发生的ISO 8601格式时间 |
conferenceParticipantSpeakStarted| 字段 | 类型 | 描述 |
|---|---|---|
| 枚举:event | 标识资源类型 |
| 枚举:conference.participant.speak.started | 推送的事件类型 |
| uuid | 标识资源类型 |
| 字符串 | 参会者的呼叫控制ID,用于通过呼叫控制API下发指令 |
| 字符串 | 通话唯一ID,可用于关联Webhook事件 |
| 字符串 | 通话会话唯一ID,可用于关联Webhook事件 |
| 字符串 | 从指令中获取的状态信息 |
| 字符串 | 通话使用的呼叫控制应用ID(原Telnyx连接ID) |
| 字符串 | 发起会议的通话会话的唯一ID |
| 字符串 | 播放语音合成内容的会议ID |
| date-time | 事件发生的ISO 8601格式时间 |
conferencePlaybackEnded| 字段 | 类型 | 描述 |
|---|---|---|
| 枚举:event | 标识资源类型 |
| 枚举:conference.playback.ended | 推送的事件类型 |
| uuid | 标识资源类型 |
| 字符串 | 通话使用的呼叫控制应用ID(原Telnyx连接ID) |
| 字符串 | 发起会议的通话会话的唯一ID |
| 字符串 | 播放音频的会议ID |
| 字符串 | 播放的音频URL(通过audio_url启动播放时存在) |
| 字符串 | 播放的音频媒体文件名称(通过media_name启动播放时存在) |
| date-time | 事件发生的ISO 8601格式时间 |
conferencePlaybackStarted| 字段 | 类型 | 描述 |
|---|---|---|
| 枚举:event | 标识资源类型 |
| 枚举:conference.playback.started | 推送的事件类型 |
| uuid | 标识资源类型 |
| 字符串 | 通话使用的呼叫控制应用ID(原Telnyx连接ID) |
| 字符串 | 发起会议的通话会话的唯一ID |
| 字符串 | 播放音频的会议ID |
| 字符串 | 播放的音频URL(通过audio_url启动播放时存在) |
| 字符串 | 播放的音频媒体文件名称(通过media_name启动播放时存在) |
| date-time | 事件发生的ISO 8601格式时间 |
conferenceRecordingSaved| 字段 | 类型 | 描述 |
|---|---|---|
| 枚举:event | 标识资源类型 |
| 枚举:conference.recording.saved | 推送的事件类型 |
| uuid | 标识资源类型 |
| 字符串 | 参会者的呼叫控制ID,用于通过呼叫控制API下发指令 |
| 字符串 | 通话会话唯一ID,可用于关联Webhook事件 |
| 字符串 | 从指令中获取的状态信息 |
| 枚举:single, dual | 录制的声道类型:单声道 |
| uuid | 被录制的会议ID |
| 字符串 | 通话使用的呼叫控制应用ID(原Telnyx连接ID) |
| 枚举:wav, mp3 | 通话录制的音频文件存储格式 |
| date-time | 录制结束的ISO 8601格式时间 |
| uuid | 会议录制的ID |
| date-time | 录制开始的ISO 8601格式时间 |
conferenceSpeakEnded| 字段 | 类型 | 描述 |
|---|---|---|
| 枚举:event | 标识资源类型 |
| 枚举:conference.speak.ended | 推送的事件类型 |
| uuid | 标识资源类型 |
| 字符串 | 通话使用的呼叫控制应用ID(原Telnyx连接ID) |
| 字符串 | 发起会议的通话会话的唯一ID |
| 字符串 | 播放语音合成内容的会议ID |
| date-time | 事件发生的ISO 8601格式时间 |
conferenceSpeakStarted| 字段 | 类型 | 描述 |
|---|---|---|
| 枚举:event | 标识资源类型 |
| 枚举:conference.speak.started | 推送的事件类型 |
| uuid | 标识资源类型 |
| 字符串 | 通话使用的呼叫控制应用ID(原Telnyx连接ID) |
| 字符串 | 发起会议的通话会话的唯一ID |
| 字符串 | 播放语音合成内容的会议ID |
| date-time | 事件发生的ISO 8601格式时间 |