telnyx-voice-conferencing-java
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese<!-- Auto-generated from Telnyx OpenAPI specs. Do not edit. -->
<!-- 由Telnyx OpenAPI规范自动生成,请勿编辑。 -->
Telnyx Voice Conferencing - Java
Telnyx语音会议 - Java版
Installation
安装
text
// See https://github.com/team-telnyx/telnyx-java for Maven/Gradle setuptext
// 有关Maven/Gradle配置,请查看https://github.com/team-telnyx/telnyx-javaSetup
初始化
java
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
TelnyxClient client = TelnyxOkHttpClient.fromEnv();All examples below assume is already initialized as shown above.
clientjava
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
TelnyxClient client = TelnyxOkHttpClient.fromEnv();以下所有示例均假设已按上述方式初始化。
clientEnqueue call
将呼叫加入队列
Put the call in a queue.
POST /calls/{call_control_id}/actions/enqueuequeue_nameOptional: (string), (string), (boolean), (integer), (integer)
client_statecommand_idkeep_after_hangupmax_sizemax_wait_time_secsjava
import com.telnyx.sdk.models.calls.actions.ActionEnqueueParams;
import com.telnyx.sdk.models.calls.actions.ActionEnqueueResponse;
ActionEnqueueParams params = ActionEnqueueParams.builder()
.callControlId("call_control_id")
.queueName("support")
.build();
ActionEnqueueResponse response = client.calls().actions().enqueue(params);将呼叫添加到指定队列中。
POST /calls/{call_control_id}/actions/enqueuequeue_name可选参数:(字符串)、(字符串)、(布尔值)、(整数)、(整数)
client_statecommand_idkeep_after_hangupmax_sizemax_wait_time_secsjava
import com.telnyx.sdk.models.calls.actions.ActionEnqueueParams;
import com.telnyx.sdk.models.calls.actions.ActionEnqueueResponse;
ActionEnqueueParams params = ActionEnqueueParams.builder()
.callControlId("call_control_id")
.queueName("support")
.build();
ActionEnqueueResponse response = client.calls().actions().enqueue(params);Remove call from a queue
将呼叫移出队列
Removes the call from a queue.
POST /calls/{call_control_id}/actions/leave_queueOptional: (string), (string)
client_statecommand_idjava
import com.telnyx.sdk.models.calls.actions.ActionLeaveQueueParams;
import com.telnyx.sdk.models.calls.actions.ActionLeaveQueueResponse;
ActionLeaveQueueResponse response = client.calls().actions().leaveQueue("call_control_id");将呼叫从队列中移除。
POST /calls/{call_control_id}/actions/leave_queue可选参数:(字符串)、(字符串)
client_statecommand_idjava
import com.telnyx.sdk.models.calls.actions.ActionLeaveQueueParams;
import com.telnyx.sdk.models.calls.actions.ActionLeaveQueueResponse;
ActionLeaveQueueResponse response = client.calls().actions().leaveQueue("call_control_id");List conferences
列出所有会议
Lists conferences.
GET /conferencesjava
import com.telnyx.sdk.models.conferences.ConferenceListPage;
import com.telnyx.sdk.models.conferences.ConferenceListParams;
ConferenceListPage page = client.conferences().list();查询会议列表。
GET /conferencesjava
import com.telnyx.sdk.models.conferences.ConferenceListPage;
import com.telnyx.sdk.models.conferences.ConferenceListParams;
ConferenceListPage page = client.conferences().list();Create conference
创建会议
Create a conference from an existing call leg using a and a conference name.
call_control_idPOST /conferencescall_control_idnameOptional: (enum), (string), (boolean), (string), (integer), (string), (string), (integer), (enum), (boolean)
beep_enabledclient_statecomfort_noisecommand_idduration_minuteshold_audio_urlhold_media_namemax_participantsregionstart_conference_on_createjava
import com.telnyx.sdk.models.conferences.ConferenceCreateParams;
import com.telnyx.sdk.models.conferences.ConferenceCreateResponse;
ConferenceCreateParams params = ConferenceCreateParams.builder()
.callControlId("v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg")
.name("Business")
.build();
ConferenceCreateResponse conference = client.conferences().create(params);通过现有通话的和会议名称创建新会议。
call_control_idPOST /conferencescall_control_idname可选参数:(枚举值)、(字符串)、(布尔值)、(字符串)、(整数)、(字符串)、(字符串)、(整数)、(枚举值)、(布尔值)
beep_enabledclient_statecomfort_noisecommand_idduration_minuteshold_audio_urlhold_media_namemax_participantsregionstart_conference_on_createjava
import com.telnyx.sdk.models.conferences.ConferenceCreateParams;
import com.telnyx.sdk.models.conferences.ConferenceCreateResponse;
ConferenceCreateParams params = ConferenceCreateParams.builder()
.callControlId("v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg")
.name("Business")
.build();
ConferenceCreateResponse conference = client.conferences().create(params);Retrieve a conference
获取会议详情
Retrieve an existing conference
GET /conferences/{id}java
import com.telnyx.sdk.models.conferences.ConferenceRetrieveParams;
import com.telnyx.sdk.models.conferences.ConferenceRetrieveResponse;
ConferenceRetrieveResponse conference = client.conferences().retrieve("id");查询指定会议的详细信息。
GET /conferences/{id}java
import com.telnyx.sdk.models.conferences.ConferenceRetrieveParams;
import com.telnyx.sdk.models.conferences.ConferenceRetrieveResponse;
ConferenceRetrieveResponse conference = client.conferences().retrieve("id");Hold conference participants
暂停会议参与者通话
Hold a list of participants in a conference call
POST /conferences/{id}/actions/holdOptional: (string), (array[string]), (string), (enum)
audio_urlcall_control_idsmedia_nameregionjava
import com.telnyx.sdk.models.conferences.actions.ActionHoldParams;
import com.telnyx.sdk.models.conferences.actions.ActionHoldResponse;
ActionHoldResponse response = client.conferences().actions().hold("id");将会议中的指定参与者置于通话暂停状态。
POST /conferences/{id}/actions/hold可选参数:(字符串)、(字符串数组)、(字符串)、(枚举值)
audio_urlcall_control_idsmedia_nameregionjava
import com.telnyx.sdk.models.conferences.actions.ActionHoldParams;
import com.telnyx.sdk.models.conferences.actions.ActionHoldResponse;
ActionHoldResponse response = client.conferences().actions().hold("id");Join a conference
加入会议
Join an existing call leg to a conference.
POST /conferences/{id}/actions/joincall_control_idOptional: (enum), (string), (string), (boolean), (boolean), (string), (string), (boolean), (enum), (boolean), (boolean), (enum), (array[string])
beep_enabledclient_statecommand_idend_conference_on_exitholdhold_audio_urlhold_media_namemuteregionsoft_end_conference_on_exitstart_conference_on_entersupervisor_rolewhisper_call_control_idsjava
import com.telnyx.sdk.models.conferences.actions.ActionJoinParams;
import com.telnyx.sdk.models.conferences.actions.ActionJoinResponse;
ActionJoinParams params = ActionJoinParams.builder()
.id("id")
.callControlId("v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg")
.build();
ActionJoinResponse response = client.conferences().actions().join(params);将现有通话加入指定会议。
POST /conferences/{id}/actions/joincall_control_id可选参数:(枚举值)、(字符串)、(字符串)、(布尔值)、(布尔值)、(字符串)、(字符串)、(布尔值)、(枚举值)、(布尔值)、(布尔值)、(枚举值)、(字符串数组)
beep_enabledclient_statecommand_idend_conference_on_exitholdhold_audio_urlhold_media_namemuteregionsoft_end_conference_on_exitstart_conference_on_entersupervisor_rolewhisper_call_control_idsjava
import com.telnyx.sdk.models.conferences.actions.ActionJoinParams;
import com.telnyx.sdk.models.conferences.actions.ActionJoinResponse;
ActionJoinParams params = ActionJoinParams.builder()
.id("id")
.callControlId("v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg")
.build();
ActionJoinResponse response = client.conferences().actions().join(params);Leave a conference
退出会议
Removes a call leg from a conference and moves it back to parked state.
POST /conferences/{id}/actions/leavecall_control_idOptional: (enum), (string), (enum)
beep_enabledcommand_idregionjava
import com.telnyx.sdk.models.conferences.actions.ActionLeaveParams;
import com.telnyx.sdk.models.conferences.actions.ActionLeaveResponse;
ActionLeaveParams params = ActionLeaveParams.builder()
.id("id")
.callControlId("c46e06d7-b78f-4b13-96b6-c576af9640ff")
.build();
ActionLeaveResponse response = client.conferences().actions().leave(params);将通话从会议中移除并恢复到驻留状态。
POST /conferences/{id}/actions/leavecall_control_id可选参数:(枚举值)、(字符串)、(枚举值)
beep_enabledcommand_idregionjava
import com.telnyx.sdk.models.conferences.actions.ActionLeaveParams;
import com.telnyx.sdk.models.conferences.actions.ActionLeaveResponse;
ActionLeaveParams params = ActionLeaveParams.builder()
.id("id")
.callControlId("c46e06d7-b78f-4b13-96b6-c576af9640ff")
.build();
ActionLeaveResponse response = client.conferences().actions().leave(params);Mute conference participants
静音会议参与者
Mute a list of participants in a conference call
POST /conferences/{id}/actions/muteOptional: (array[string]), (enum)
call_control_idsregionjava
import com.telnyx.sdk.models.conferences.actions.ActionMuteParams;
import com.telnyx.sdk.models.conferences.actions.ActionMuteResponse;
ActionMuteResponse response = client.conferences().actions().mute("id");将会议中的指定参与者静音。
POST /conferences/{id}/actions/mute可选参数:(字符串数组)、(枚举值)
call_control_idsregionjava
import com.telnyx.sdk.models.conferences.actions.ActionMuteParams;
import com.telnyx.sdk.models.conferences.actions.ActionMuteResponse;
ActionMuteResponse response = client.conferences().actions().mute("id");Play audio to conference participants
向会议参与者播放音频
Play audio to all or some participants on a conference call.
POST /conferences/{id}/actions/playOptional: (string), (array[string]), (object), (string), (enum)
audio_urlcall_control_idsloopmedia_nameregionjava
import com.telnyx.sdk.models.conferences.actions.ActionPlayParams;
import com.telnyx.sdk.models.conferences.actions.ActionPlayResponse;
ActionPlayResponse response = client.conferences().actions().play("id");向会议中全部或指定参与者播放音频。
POST /conferences/{id}/actions/play可选参数:(字符串)、(字符串数组)、(对象)、(字符串)、(枚举值)
audio_urlcall_control_idsloopmedia_nameregionjava
import com.telnyx.sdk.models.conferences.actions.ActionPlayParams;
import com.telnyx.sdk.models.conferences.actions.ActionPlayResponse;
ActionPlayResponse response = client.conferences().actions().play("id");Conference recording pause
暂停会议录制
Pause conference recording.
POST /conferences/{id}/actions/record_pauseOptional: (string), (string), (enum)
command_idrecording_idregionjava
import com.telnyx.sdk.models.conferences.actions.ActionRecordPauseParams;
import com.telnyx.sdk.models.conferences.actions.ActionRecordPauseResponse;
ActionRecordPauseResponse response = client.conferences().actions().recordPause("id");暂停正在进行的会议录制。
POST /conferences/{id}/actions/record_pause可选参数:(字符串)、(字符串)、(枚举值)
command_idrecording_idregionjava
import com.telnyx.sdk.models.conferences.actions.ActionRecordPauseParams;
import com.telnyx.sdk.models.conferences.actions.ActionRecordPauseResponse;
ActionRecordPauseResponse response = client.conferences().actions().recordPause("id");Conference recording resume
恢复会议录制
Resume conference recording.
POST /conferences/{id}/actions/record_resumeOptional: (string), (string), (enum)
command_idrecording_idregionjava
import com.telnyx.sdk.models.conferences.actions.ActionRecordResumeParams;
import com.telnyx.sdk.models.conferences.actions.ActionRecordResumeResponse;
ActionRecordResumeResponse response = client.conferences().actions().recordResume("id");恢复已暂停的会议录制。
POST /conferences/{id}/actions/record_resume可选参数:(字符串)、(字符串)、(枚举值)
command_idrecording_idregionjava
import com.telnyx.sdk.models.conferences.actions.ActionRecordResumeParams;
import com.telnyx.sdk.models.conferences.actions.ActionRecordResumeResponse;
ActionRecordResumeResponse response = client.conferences().actions().recordResume("id");Conference recording start
开始会议录制
Start recording the conference.
POST /conferences/{id}/actions/record_startformatOptional: (string), (string), (boolean), (enum), (enum)
command_idcustom_file_nameplay_beepregiontrimjava
import com.telnyx.sdk.models.conferences.actions.ActionRecordStartParams;
import com.telnyx.sdk.models.conferences.actions.ActionRecordStartResponse;
ActionRecordStartParams params = ActionRecordStartParams.builder()
.id("id")
.format(ActionRecordStartParams.Format.WAV)
.build();
ActionRecordStartResponse response = client.conferences().actions().recordStart(params);启动会议录制功能。
POST /conferences/{id}/actions/record_startformat可选参数:(字符串)、(字符串)、(布尔值)、(枚举值)、(枚举值)
command_idcustom_file_nameplay_beepregiontrimjava
import com.telnyx.sdk.models.conferences.actions.ActionRecordStartParams;
import com.telnyx.sdk.models.conferences.actions.ActionRecordStartResponse;
ActionRecordStartParams params = ActionRecordStartParams.builder()
.id("id")
.format(ActionRecordStartParams.Format.WAV)
.build();
ActionRecordStartResponse response = client.conferences().actions().recordStart(params);Conference recording stop
停止会议录制
Stop recording the conference.
POST /conferences/{id}/actions/record_stopOptional: (string), (string), (uuid), (enum)
client_statecommand_idrecording_idregionjava
import com.telnyx.sdk.models.conferences.actions.ActionRecordStopParams;
import com.telnyx.sdk.models.conferences.actions.ActionRecordStopResponse;
ActionRecordStopResponse response = client.conferences().actions().recordStop("id");停止正在进行的会议录制。
POST /conferences/{id}/actions/record_stop可选参数:(字符串)、(字符串)、(uuid)、(枚举值)
client_statecommand_idrecording_idregionjava
import com.telnyx.sdk.models.conferences.actions.ActionRecordStopParams;
import com.telnyx.sdk.models.conferences.actions.ActionRecordStopResponse;
ActionRecordStopResponse response = client.conferences().actions().recordStop("id");Speak text to conference participants
向会议参与者播报文本
Convert text to speech and play it to all or some participants.
POST /conferences/{id}/actions/speakpayloadvoiceOptional: (array[string]), (string), (enum), (enum), (enum), (object)
call_control_idscommand_idlanguagepayload_typeregionvoice_settingsjava
import com.telnyx.sdk.models.conferences.actions.ActionSpeakParams;
import com.telnyx.sdk.models.conferences.actions.ActionSpeakResponse;
ActionSpeakParams params = ActionSpeakParams.builder()
.id("id")
.payload("Say this to participants")
.voice("female")
.build();
ActionSpeakResponse response = client.conferences().actions().speak(params);将文本转换为语音并播放给全部或指定参与者。
POST /conferences/{id}/actions/speakpayloadvoice可选参数:(字符串数组)、(字符串)、(枚举值)、(枚举值)、(枚举值)、(对象)
call_control_idscommand_idlanguagepayload_typeregionvoice_settingsjava
import com.telnyx.sdk.models.conferences.actions.ActionSpeakParams;
import com.telnyx.sdk.models.conferences.actions.ActionSpeakResponse;
ActionSpeakParams params = ActionSpeakParams.builder()
.id("id")
.payload("Say this to participants")
.voice("female")
.build();
ActionSpeakResponse response = client.conferences().actions().speak(params);Stop audio being played on the conference
停止会议中的音频播放
Stop audio being played to all or some participants on a conference call.
POST /conferences/{id}/actions/stopOptional: (array[string]), (enum)
call_control_idsregionjava
import com.telnyx.sdk.models.conferences.actions.ActionStopParams;
import com.telnyx.sdk.models.conferences.actions.ActionStopResponse;
ActionStopResponse response = client.conferences().actions().stop("id");停止向全部或指定参与者播放的音频。
POST /conferences/{id}/actions/stop可选参数:(字符串数组)、(枚举值)
call_control_idsregionjava
import com.telnyx.sdk.models.conferences.actions.ActionStopParams;
import com.telnyx.sdk.models.conferences.actions.ActionStopResponse;
ActionStopResponse response = client.conferences().actions().stop("id");Unhold conference participants
恢复会议参与者通话
Unhold a list of participants in a conference call
POST /conferences/{id}/actions/unholdcall_control_idsOptional: (enum)
regionjava
import com.telnyx.sdk.models.conferences.actions.ActionUnholdParams;
import com.telnyx.sdk.models.conferences.actions.ActionUnholdResponse;
ActionUnholdParams params = ActionUnholdParams.builder()
.id("id")
.addCallControlId("v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg")
.build();
ActionUnholdResponse response = client.conferences().actions().unhold(params);恢复会议中指定参与者的通话。
POST /conferences/{id}/actions/unholdcall_control_ids可选参数:(枚举值)
regionjava
import com.telnyx.sdk.models.conferences.actions.ActionUnholdParams;
import com.telnyx.sdk.models.conferences.actions.ActionUnholdResponse;
ActionUnholdParams params = ActionUnholdParams.builder()
.id("id")
.addCallControlId("v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg")
.build();
ActionUnholdResponse response = client.conferences().actions().unhold(params);Unmute conference participants
取消会议参与者静音
Unmute a list of participants in a conference call
POST /conferences/{id}/actions/unmuteOptional: (array[string]), (enum)
call_control_idsregionjava
import com.telnyx.sdk.models.conferences.actions.ActionUnmuteParams;
import com.telnyx.sdk.models.conferences.actions.ActionUnmuteResponse;
ActionUnmuteResponse response = client.conferences().actions().unmute("id");取消会议中指定参与者的静音状态。
POST /conferences/{id}/actions/unmute可选参数:(字符串数组)、(枚举值)
call_control_idsregionjava
import com.telnyx.sdk.models.conferences.actions.ActionUnmuteParams;
import com.telnyx.sdk.models.conferences.actions.ActionUnmuteResponse;
ActionUnmuteResponse response = client.conferences().actions().unmute("id");Update conference participant
更新会议参与者角色
Update conference participant supervisor_role
POST /conferences/{id}/actions/updatecall_control_idsupervisor_roleOptional: (string), (enum), (array[string])
command_idregionwhisper_call_control_idsjava
import com.telnyx.sdk.models.conferences.actions.ActionUpdateParams;
import com.telnyx.sdk.models.conferences.actions.ActionUpdateResponse;
import com.telnyx.sdk.models.conferences.actions.UpdateConference;
ActionUpdateParams params = ActionUpdateParams.builder()
.id("id")
.updateConference(UpdateConference.builder()
.callControlId("v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg")
.supervisorRole(UpdateConference.SupervisorRole.WHISPER)
.build())
.build();
ActionUpdateResponse action = client.conferences().actions().update(params);更新会议参与者的(监督者角色)。
supervisor_rolePOST /conferences/{id}/actions/updatecall_control_idsupervisor_role可选参数:(字符串)、(枚举值)、(字符串数组)
command_idregionwhisper_call_control_idsjava
import com.telnyx.sdk.models.conferences.actions.ActionUpdateParams;
import com.telnyx.sdk.models.conferences.actions.ActionUpdateResponse;
import com.telnyx.sdk.models.conferences.actions.UpdateConference;
ActionUpdateParams params = ActionUpdateParams.builder()
.id("id")
.updateConference(UpdateConference.builder()
.callControlId("v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg")
.supervisorRole(UpdateConference.SupervisorRole.WHISPER)
.build())
.build();
ActionUpdateResponse action = client.conferences().actions().update(params);End a conference
结束会议
End a conference and terminate all active participants.
POST /conferences/{id}/actions/endOptional: (string)
command_idjava
import com.telnyx.sdk.models.conferences.actions.ActionEndConferenceParams;
import com.telnyx.sdk.models.conferences.actions.ActionEndConferenceResponse;
ActionEndConferenceResponse response = client.conferences().actions().endConference("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");结束会议并终止所有参与者的通话。
POST /conferences/{id}/actions/end可选参数:(字符串)
command_idjava
import com.telnyx.sdk.models.conferences.actions.ActionEndConferenceParams;
import com.telnyx.sdk.models.conferences.actions.ActionEndConferenceResponse;
ActionEndConferenceResponse response = client.conferences().actions().endConference("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");Gather DTMF using audio prompt in a conference
在会议中通过音频提示收集DTMF信号
Play an audio file to a specific conference participant and gather DTMF input.
POST /conferences/{id}/actions/gather_using_audiocall_control_idOptional: (string), (string), (string), (integer), (integer), (string), (string), (integer), (integer), (string), (integer), (boolean), (string), (integer), (string)
audio_urlclient_stategather_idinitial_timeout_millisinter_digit_timeout_millisinvalid_audio_urlinvalid_media_namemaximum_digitsmaximum_triesmedia_nameminimum_digitsstop_playback_on_dtmfterminating_digittimeout_millisvalid_digitsjava
import com.telnyx.sdk.models.conferences.actions.ActionGatherDtmfAudioParams;
import com.telnyx.sdk.models.conferences.actions.ActionGatherDtmfAudioResponse;
ActionGatherDtmfAudioParams params = ActionGatherDtmfAudioParams.builder()
.id("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.callControlId("v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg")
.build();
ActionGatherDtmfAudioResponse response = client.conferences().actions().gatherDtmfAudio(params);向指定会议参与者播放音频文件并收集DTMF输入。
POST /conferences/{id}/actions/gather_using_audiocall_control_id可选参数:(字符串)、(字符串)、(字符串)、(整数)、(整数)、(字符串)、(字符串)、(整数)、(整数)、(字符串)、(整数)、(布尔值)、(字符串)、(整数)、(字符串)
audio_urlclient_stategather_idinitial_timeout_millisinter_digit_timeout_millisinvalid_audio_urlinvalid_media_namemaximum_digitsmaximum_triesmedia_nameminimum_digitsstop_playback_on_dtmfterminating_digittimeout_millisvalid_digitsjava
import com.telnyx.sdk.models.conferences.actions.ActionGatherDtmfAudioParams;
import com.telnyx.sdk.models.conferences.actions.ActionGatherDtmfAudioResponse;
ActionGatherDtmfAudioParams params = ActionGatherDtmfAudioParams.builder()
.id("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.callControlId("v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg")
.build();
ActionGatherDtmfAudioResponse response = client.conferences().actions().gatherDtmfAudio(params);Send DTMF to conference participants
向会议参与者发送DTMF信号
Send DTMF tones to one or more conference participants.
POST /conferences/{id}/actions/send_dtmfdigitsOptional: (array[string]), (string), (integer)
call_control_idsclient_stateduration_millisjava
import com.telnyx.sdk.models.conferences.actions.ActionSendDtmfParams;
import com.telnyx.sdk.models.conferences.actions.ActionSendDtmfResponse;
ActionSendDtmfParams params = ActionSendDtmfParams.builder()
.id("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.digits("1234#")
.build();
ActionSendDtmfResponse response = client.conferences().actions().sendDtmf(params);向一位或多位会议参与者发送DTMF音。
POST /conferences/{id}/actions/send_dtmfdigits可选参数:(字符串数组)、(字符串)、(整数)
call_control_idsclient_stateduration_millisjava
import com.telnyx.sdk.models.conferences.actions.ActionSendDtmfParams;
import com.telnyx.sdk.models.conferences.actions.ActionSendDtmfResponse;
ActionSendDtmfParams params = ActionSendDtmfParams.builder()
.id("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.digits("1234#")
.build();
ActionSendDtmfResponse response = client.conferences().actions().sendDtmf(params);List conference participants
列出会议参与者
Lists conference participants
GET /conferences/{conference_id}/participantsjava
import com.telnyx.sdk.models.conferences.ConferenceListParticipantsPage;
import com.telnyx.sdk.models.conferences.ConferenceListParticipantsParams;
ConferenceListParticipantsPage page = client.conferences().listParticipants("conference_id");查询指定会议的参与者列表。
GET /conferences/{conference_id}/participantsjava
import com.telnyx.sdk.models.conferences.ConferenceListParticipantsPage;
import com.telnyx.sdk.models.conferences.ConferenceListParticipantsParams;
ConferenceListParticipantsPage page = client.conferences().listParticipants("conference_id");Webhooks
Webhook事件
The following webhook events are sent to your configured webhook URL.
All webhooks include and headers for verification (Standard Webhooks compatible).
telnyx-timestamptelnyx-signature-ed25519| Event | Description |
|---|---|
| Call Enqueued |
| Call Left Queue |
| Conference Created |
| Conference Ended |
| Conference Floor Changed |
| Conference Participant Joined |
| Conference Participant Left |
| Conference Participant Playback Ended |
| Conference Participant Playback Started |
| Conference Participant Speak Ended |
| Conference Participant Speak Started |
| Conference Playback Ended |
| Conference Playback Started |
| Conference Recording Saved |
| Conference Speak Ended |
| Conference Speak Started |
以下Webhook事件将发送到您配置的Webhook URL。所有Webhook均包含和头信息用于验证(兼容标准Webhook)。
telnyx-timestamptelnyx-signature-ed25519| 事件 | 描述 |
|---|---|
| 呼叫已加入队列 |
| 呼叫已离开队列 |
| 会议已创建 |
| 会议已结束 |
| 会议发言者已变更 |
| 参与者已加入会议 |
| 参与者已离开会议 |
| 向参与者播放的音频已结束 |
| 已开始向参与者播放音频 |
| 向参与者播报的语音已结束 |
| 已开始向参与者播报语音 |
| 会议音频播放已结束 |
| 已开始会议音频播放 |
| 会议录制文件已保存 |
| 会议语音播报已结束 |
| 已开始会议语音播报 |
Webhook payload fields
Webhook负载字段说明
callEnqueued| Field | Type | Description |
|---|---|---|
| enum | Identifies the type of the resource. |
| enum | 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 | Identifies the type of the resource. |
| enum | 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 | The reason for leaving the queue |
| integer | Time call spent in the queue in seconds. |
conferenceCreated| Field | Type | Description |
|---|---|---|
| enum | Identifies the type of the resource. |
| enum | 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 | Identifies the type of the resource. |
| enum | 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 | Reason the conference ended. |
conferenceFloorChanged| Field | Type | Description |
|---|---|---|
| enum | Identifies the type of the resource. |
| enum | 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 | Identifies the type of the resource. |
| enum | 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 | Identifies the type of the resource. |
| enum | 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 | Identifies the type of the resource. |
| enum | 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 | Identifies the type of the resource. |
| enum | 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 | Identifies the type of the resource. |
| enum | 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 | Identifies the type of the resource. |
| enum | 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 | Identifies the type of the resource. |
| enum | 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 | Identifies the type of the resource. |
| enum | 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 | Identifies the type of the resource. |
| enum | 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 | 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 | 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 | Identifies the type of the resource. |
| enum | 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 | Identifies the type of the resource. |
| enum | 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| 字段 | 类型 | 描述 |
|---|---|---|
| 枚举值 | 标识资源类型 |
| 枚举值 | 交付的事件类型 |
| uuid | 标识资源ID |
| date-time | 事件发生的ISO 8601格式时间 |
| 字符串 | 用于通过呼叫控制API发送指令的呼叫ID |
| 字符串 | 通话中使用的呼叫控制应用ID(原Telnyx连接ID) |
| 字符串 | 通话的唯一ID,可用于关联Webhook事件 |
| 字符串 | 通话会话的唯一ID,可用于关联Webhook事件 |
| 字符串 | 从指令中接收的状态 |
| 字符串 | 队列名称 |
| 整数 | 呼叫在队列中的当前位置 |
| 整数 | 呼叫在队列中的平均等待时间(秒) |
callLeftQueue| 字段 | 类型 | 描述 |
|---|---|---|
| 枚举值 | 标识资源类型 |
| 枚举值 | 交付的事件类型 |
| uuid | 标识资源ID |
| date-time | 事件发生的ISO 8601格式时间 |
| 字符串 | 用于通过呼叫控制API发送指令的呼叫ID |
| 字符串 | 通话中使用的呼叫控制应用ID(原Telnyx连接ID) |
| 字符串 | 通话的唯一ID,可用于关联Webhook事件 |
| 字符串 | 通话会话的唯一ID,可用于关联Webhook事件 |
| 字符串 | 从指令中接收的状态 |
| 字符串 | 队列名称 |
| 整数 | 呼叫在队列中的最后位置 |
| 枚举值 | 呼叫离开队列的原因 |
| 整数 | 呼叫在队列中的等待时间(秒) |
conferenceCreated| 字段 | 类型 | 描述 |
|---|---|---|
| 枚举值 | 标识资源类型 |
| 枚举值 | 交付的事件类型 |
| uuid | 标识资源ID |
| 字符串 | 用于通过呼叫控制API发送指令的呼叫ID |
| 字符串 | 通话中使用的呼叫控制应用ID(原Telnyx连接ID) |
| 字符串 | 通话的唯一ID,可用于关联Webhook事件 |
| 字符串 | 通话会话的唯一ID,可用于关联Webhook事件 |
| 字符串 | 从指令中接收的状态 |
| 字符串 | 参与者加入的会议ID |
| date-time | 事件发生的ISO 8601格式时间 |
conferenceEnded| 字段 | 类型 | 描述 |
|---|---|---|
| 枚举值 | 标识资源类型 |
| 枚举值 | 交付的事件类型 |
| uuid | 标识资源ID |
| 字符串 | 用于通过呼叫控制API发送指令的呼叫ID |
| 字符串 | 通话中使用的呼叫控制应用ID(原Telnyx连接ID) |
| 字符串 | 通话的唯一ID,可用于关联Webhook事件 |
| 字符串 | 通话会话的唯一ID,可用于关联Webhook事件 |
| 字符串 | 从指令中接收的状态 |
| 字符串 | 参与者加入的会议ID |
| date-time | 事件发生的ISO 8601格式时间 |
| 枚举值 | 会议结束的原因 |
conferenceFloorChanged| 字段 | 类型 | 描述 |
|---|---|---|
| 枚举值 | 标识资源类型 |
| 枚举值 | 交付的事件类型 |
| uuid | 标识资源ID |
| 字符串 | 新发言者的呼叫控制ID |
| 字符串 | 通话中使用的呼叫控制应用ID(原Telnyx连接ID) |
| 字符串 | 新发言者的通话ID |
| 字符串 | 新发言者的通话会话ID |
| 字符串 | 从指令中接收的状态 |
| 字符串 | 发生发言者变更的会议ID |
| date-time | 事件发生的ISO 8601格式时间 |
conferenceParticipantJoined| 字段 | 类型 | 描述 |
|---|---|---|
| 枚举值 | 标识资源类型 |
| 枚举值 | 交付的事件类型 |
| uuid | 标识资源ID |
| date-time | 事件发生的ISO 8601格式时间 |
| 字符串 | 用于通过呼叫控制API发送指令的呼叫ID |
| 字符串 | 通话中使用的呼叫控制应用ID(原Telnyx连接ID) |
| 字符串 | 通话的唯一ID,可用于关联Webhook事件 |
| 字符串 | 通话会话的唯一ID,可用于关联Webhook事件 |
| 字符串 | 从指令中接收的状态 |
| 字符串 | 参与者加入的会议ID |
conferenceParticipantLeft| 字段 | 类型 | 描述 |
|---|---|---|
| 枚举值 | 标识资源类型 |
| 枚举值 | 交付的事件类型 |
| uuid | 标识资源ID |
| date-time | 事件发生的ISO 8601格式时间 |
| 字符串 | 用于通过呼叫控制API发送指令的呼叫ID |
| 字符串 | 通话中使用的呼叫控制应用ID(原Telnyx连接ID) |
| 字符串 | 通话的唯一ID,可用于关联Webhook事件 |
| 字符串 | 通话会话的唯一ID,可用于关联Webhook事件 |
| 字符串 | 从指令中接收的状态 |
| 字符串 | 参与者加入的会议ID |
conferenceParticipantPlaybackEnded| 字段 | 类型 | 描述 |
|---|---|---|
| 枚举值 | 标识资源类型 |
| 枚举值 | 交付的事件类型 |
| uuid | 标识资源ID |
| 字符串 | 参与者的呼叫ID,用于通过呼叫控制API发送指令 |
| 字符串 | 通话的唯一ID,可用于关联Webhook事件 |
| 字符串 | 通话会话的唯一ID,可用于关联Webhook事件 |
| 字符串 | 从指令中接收的状态 |
| 字符串 | 通话中使用的呼叫控制应用ID(原Telnyx连接ID) |
| 字符串 | 启动会议的通话会话唯一ID |
| 字符串 | 语音播报所在的会议ID |
| 字符串 | 正在播放的音频URL(若通过audio_url启动播放) |
| 字符串 | 正在播放的音频媒体文件名(若通过media_name启动播放) |
| date-time | 事件发生的ISO 8601格式时间 |
conferenceParticipantPlaybackStarted| 字段 | 类型 | 描述 |
|---|---|---|
| 枚举值 | 标识资源类型 |
| 枚举值 | 交付的事件类型 |
| uuid | 标识资源ID |
| 字符串 | 参与者的呼叫ID,用于通过呼叫控制API发送指令 |
| 字符串 | 通话的唯一ID,可用于关联Webhook事件 |
| 字符串 | 通话会话的唯一ID,可用于关联Webhook事件 |
| 字符串 | 从指令中接收的状态 |
| 字符串 | 通话中使用的呼叫控制应用ID(原Telnyx连接ID) |
| 字符串 | 启动会议的通话会话唯一ID |
| 字符串 | 语音播报所在的会议ID |
| 字符串 | 正在播放的音频URL(若通过audio_url启动播放) |
| 字符串 | 正在播放的音频媒体文件名(若通过media_name启动播放) |
| date-time | 事件发生的ISO 8601格式时间 |
conferenceParticipantSpeakEnded| 字段 | 类型 | 描述 |
|---|---|---|
| 枚举值 | 标识资源类型 |
| 枚举值 | 交付的事件类型 |
| uuid | 标识资源ID |
| 字符串 | 参与者的呼叫ID,用于通过呼叫控制API发送指令 |
| 字符串 | 通话的唯一ID,可用于关联Webhook事件 |
| 字符串 | 通话会话的唯一ID,可用于关联Webhook事件 |
| 字符串 | 从指令中接收的状态 |
| 字符串 | 通话中使用的呼叫控制应用ID(原Telnyx连接ID) |
| 字符串 | 启动会议的通话会话唯一ID |
| 字符串 | 语音播报所在的会议ID |
| date-time | 事件发生的ISO 8601格式时间 |
conferenceParticipantSpeakStarted| 字段 | 类型 | 描述 |
|---|---|---|
| 枚举值 | 标识资源类型 |
| 枚举值 | 交付的事件类型 |
| uuid | 标识资源ID |
| 字符串 | 参与者的呼叫ID,用于通过呼叫控制API发送指令 |
| 字符串 | 通话的唯一ID,可用于关联Webhook事件 |
| 字符串 | 通话会话的唯一ID,可用于关联Webhook事件 |
| 字符串 | 从指令中接收的状态 |
| 字符串 | 通话中使用的呼叫控制应用ID(原Telnyx连接ID) |
| 字符串 | 启动会议的通话会话唯一ID |
| 字符串 | 语音播报所在的会议ID |
| date-time | 事件发生的ISO 8601格式时间 |
conferencePlaybackEnded| 字段 | 类型 | 描述 |
|---|---|---|
| 枚举值 | 标识资源类型 |
| 枚举值 | 交付的事件类型 |
| uuid | 标识资源ID |
| 字符串 | 通话中使用的呼叫控制应用ID(原Telnyx连接ID) |
| 字符串 | 启动会议的通话会话唯一ID |
| 字符串 | 语音播报所在的会议ID |
| 字符串 | 正在播放的音频URL(若通过audio_url启动播放) |
| 字符串 | 正在播放的音频媒体文件名(若通过media_name启动播放) |
| date-time | 事件发生的ISO 8601格式时间 |
conferencePlaybackStarted| 字段 | 类型 | 描述 |
|---|---|---|
| 枚举值 | 标识资源类型 |
| 枚举值 | 交付的事件类型 |
| uuid | 标识资源ID |
| 字符串 | 通话中使用的呼叫控制应用ID(原Telnyx连接ID) |
| 字符串 | 启动会议的通话会话唯一ID |
| 字符串 | 语音播报所在的会议ID |
| 字符串 | 正在播放的音频URL(若通过audio_url启动播放) |
| 字符串 | 正在播放的音频媒体文件名(若通过media_name启动播放) |
| date-time | 事件发生的ISO 8601格式时间 |
conferenceRecordingSaved| 字段 | 类型 | 描述 |
|---|---|---|
| 枚举值 | 标识资源类型 |
| 枚举值 | 交付的事件类型 |
| uuid | 标识资源ID |
| 字符串 | 参与者的呼叫ID,用于通过呼叫控制API发送指令 |
| 字符串 | 通话会话的唯一ID,可用于关联Webhook事件 |
| 字符串 | 从指令中接收的状态 |
| 枚举值 | 录制的声道类型, |
| uuid | 正在录制的会议ID |
| 字符串 | 通话中使用的呼叫控制应用ID(原Telnyx连接ID) |
| 枚举值 | 存储通话录制文件时使用的音频格式 |
| date-time | 录制结束的ISO 8601格式时间 |
| uuid | 会议录制文件的ID |
| date-time | 录制开始的ISO 8601格式时间 |
conferenceSpeakEnded| 字段 | 类型 | 描述 |
|---|---|---|
| 枚举值 | 标识资源类型 |
| 枚举值 | 交付的事件类型 |
| uuid | 标识资源ID |
| 字符串 | 通话中使用的呼叫控制应用ID(原Telnyx连接ID) |
| 字符串 | 启动会议的通话会话唯一ID |
| 字符串 | 语音播报所在的会议ID |
| date-time | 事件发生的ISO 8601格式时间 |
conferenceSpeakStarted| 字段 | 类型 | 描述 |
|---|---|---|
| 枚举值 | 标识资源类型 |
| 枚举值 | 交付的事件类型 |
| uuid | 标识资源ID |
| 字符串 | 通话中使用的呼叫控制应用ID(原Telnyx连接ID) |
| 字符串 | 启动会议的通话会话唯一ID |
| 字符串 | 语音播报所在的会议ID |
| date-time | 事件发生的ISO 8601格式时间 |