sentdm 0.38.1 → 0.40.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +21 -0
- data/README.md +1 -1
- data/lib/sentdm/client.rb +3 -20
- data/lib/sentdm/internal/voice_agents_page.rb +115 -0
- data/lib/sentdm/models/call_event.rb +8 -6
- data/lib/sentdm/models/call_event_payload.rb +29 -9
- data/lib/sentdm/models/channels/voice_create_params.rb +23 -11
- data/lib/sentdm/models/channels/voice_number.rb +23 -1
- data/lib/sentdm/models/channels/voice_update_params.rb +12 -1
- data/lib/sentdm/models/message_send_params.rb +8 -1
- data/lib/sentdm/models/template.rb +6 -5
- data/lib/sentdm/models/template_body.rb +8 -8
- data/lib/sentdm/models/voice/agent_create_params.rb +142 -0
- data/lib/sentdm/models/{calls/participant_list_params.rb → voice/agent_delete_params.rb} +3 -3
- data/lib/sentdm/models/voice/agent_list_params.rb +38 -0
- data/lib/sentdm/models/{calls/participant_remove_all_params.rb → voice/agent_retrieve_params.rb} +3 -3
- data/lib/sentdm/models/voice/agent_rotate_secret_params.rb +34 -0
- data/lib/sentdm/models/voice/agent_update_params.rb +141 -0
- data/lib/sentdm/models/{calls/api_response_of_list_of_call_participant.rb → voice/api_response_of_call.rb} +7 -7
- data/lib/sentdm/models/voice/api_response_of_call_recordings.rb +45 -0
- data/lib/sentdm/models/voice/api_response_of_calls_list.rb +44 -0
- data/lib/sentdm/models/voice/api_response_of_voice_agent.rb +51 -0
- data/lib/sentdm/models/voice/api_response_of_voice_agent_secret.rb +45 -0
- data/lib/sentdm/models/voice/api_response_of_voice_agents_list.rb +48 -0
- data/lib/sentdm/models/voice/api_response_of_voice_catalogue.rb +49 -0
- data/lib/sentdm/models/{channels → voice}/api_response_of_voice_token.rb +5 -5
- data/lib/sentdm/models/voice/call.rb +241 -0
- data/lib/sentdm/models/{calls/participant_remove_params.rb → voice/call_hangup_params.rb} +8 -8
- data/lib/sentdm/models/voice/call_list_params.rb +103 -0
- data/lib/sentdm/models/voice/call_list_recordings_params.rb +28 -0
- data/lib/sentdm/models/voice/call_party.rb +33 -0
- data/lib/sentdm/models/{calls/participant_update_params.rb → voice/call_record_params.rb} +10 -17
- data/lib/sentdm/models/voice/call_recording.rb +40 -0
- data/lib/sentdm/models/voice/call_recordings.rb +26 -0
- data/lib/sentdm/models/voice/call_retrieve_params.rb +28 -0
- data/lib/sentdm/models/voice/call_timeline_entry.rb +28 -0
- data/lib/sentdm/models/voice/calls/api_response_of_list_of_call_participant.rb +51 -0
- data/lib/sentdm/models/voice/calls/call_participant.rb +62 -0
- data/lib/sentdm/models/voice/calls/call_participant_target.rb +32 -0
- data/lib/sentdm/models/voice/calls/participant_add_params.rb +68 -0
- data/lib/sentdm/models/voice/calls/participant_list_params.rb +30 -0
- data/lib/sentdm/models/voice/calls/participant_remove_all_params.rb +30 -0
- data/lib/sentdm/models/voice/calls/participant_remove_params.rb +36 -0
- data/lib/sentdm/models/voice/calls/participant_update_params.rb +66 -0
- data/lib/sentdm/models/voice/calls_list.rb +28 -0
- data/lib/sentdm/models/voice/catalogue_list_params.rb +22 -0
- data/lib/sentdm/models/{channels/voice_create_token_params.rb → voice/token_create_params.rb} +4 -4
- data/lib/sentdm/models/voice/voice_agent.rb +138 -0
- data/lib/sentdm/models/voice/voice_agent_audio.rb +19 -0
- data/lib/sentdm/models/voice/voice_agent_audio_spec.rb +20 -0
- data/lib/sentdm/models/voice/voice_agent_limits.rb +31 -0
- data/lib/sentdm/models/voice/voice_agent_limits_spec.rb +40 -0
- data/lib/sentdm/models/voice/voice_agent_party.rb +25 -0
- data/lib/sentdm/models/voice/voice_agent_party_spec.rb +28 -0
- data/lib/sentdm/models/voice/voice_agent_secret.rb +27 -0
- data/lib/sentdm/models/voice/voice_agent_speech.rb +31 -0
- data/lib/sentdm/models/voice/voice_agent_speech_spec.rb +40 -0
- data/lib/sentdm/models/voice/voice_agent_transcripts.rb +25 -0
- data/lib/sentdm/models/voice/voice_agent_transcripts_spec.rb +32 -0
- data/lib/sentdm/models/voice/voice_agents_list.rb +30 -0
- data/lib/sentdm/models/voice/voice_catalogue.rb +30 -0
- data/lib/sentdm/models/voice/voice_catalogue_voice.rb +43 -0
- data/lib/sentdm/models/{channels → voice}/voice_token.rb +9 -3
- data/lib/sentdm/models/webhook_create_params.rb +31 -5
- data/lib/sentdm/models/webhook_response.rb +66 -4
- data/lib/sentdm/models/webhook_update_params.rb +15 -3
- data/lib/sentdm/models.rb +2 -30
- data/lib/sentdm/resources/channels/voice.rb +43 -63
- data/lib/sentdm/resources/channels.rb +2 -2
- data/lib/sentdm/resources/profiles/campaigns.rb +3 -2
- data/lib/sentdm/resources/voice/agents.rb +319 -0
- data/lib/sentdm/resources/voice/calls/participants.rb +244 -0
- data/lib/sentdm/resources/voice/calls.rb +269 -0
- data/lib/sentdm/resources/voice/catalogue.rb +71 -0
- data/lib/sentdm/resources/voice/tokens.rb +86 -0
- data/lib/sentdm/resources/voice.rb +142 -0
- data/lib/sentdm/resources/webhooks.rb +43 -15
- data/lib/sentdm/version.rb +1 -1
- data/lib/sentdm.rb +59 -28
- data/rbi/sentdm/client.rbi +2 -19
- data/rbi/sentdm/internal/voice_agents_page.rbi +71 -0
- data/rbi/sentdm/models/call_event.rbi +14 -10
- data/rbi/sentdm/models/call_event_payload.rbi +34 -9
- data/rbi/sentdm/models/channels/voice_create_params.rbi +33 -17
- data/rbi/sentdm/models/channels/voice_number.rbi +31 -0
- data/rbi/sentdm/models/channels/voice_update_params.rbi +14 -0
- data/rbi/sentdm/models/message_send_params.rbi +16 -2
- data/rbi/sentdm/models/template.rbi +12 -10
- data/rbi/sentdm/models/template_body.rbi +12 -12
- data/rbi/sentdm/models/voice/agent_create_params.rbi +215 -0
- data/rbi/sentdm/models/{calls/participant_remove_all_params.rbi → voice/agent_delete_params.rbi} +3 -6
- data/rbi/sentdm/models/voice/agent_list_params.rbi +66 -0
- data/rbi/sentdm/models/voice/agent_retrieve_params.rbi +48 -0
- data/rbi/sentdm/models/{calls/participant_remove_params.rbi → voice/agent_rotate_secret_params.rbi} +11 -8
- data/rbi/sentdm/models/voice/agent_update_params.rbi +211 -0
- data/rbi/sentdm/models/voice/api_response_of_call.rbi +76 -0
- data/rbi/sentdm/models/voice/api_response_of_call_recordings.rbi +81 -0
- data/rbi/sentdm/models/{calls/api_response_of_list_of_call_participant.rbi → voice/api_response_of_calls_list.rbi} +12 -9
- data/rbi/sentdm/models/voice/api_response_of_voice_agent.rbi +85 -0
- data/rbi/sentdm/models/voice/api_response_of_voice_agent_secret.rbi +81 -0
- data/rbi/sentdm/models/voice/api_response_of_voice_agents_list.rbi +83 -0
- data/rbi/sentdm/models/voice/api_response_of_voice_catalogue.rbi +83 -0
- data/rbi/sentdm/models/{channels → voice}/api_response_of_voice_token.rbi +6 -8
- data/rbi/sentdm/models/voice/call.rbi +329 -0
- data/rbi/sentdm/models/voice/call_hangup_params.rbi +61 -0
- data/rbi/sentdm/models/voice/call_list_params.rbi +134 -0
- data/rbi/sentdm/models/{calls/participant_list_params.rbi → voice/call_list_recordings_params.rbi} +3 -3
- data/rbi/sentdm/models/voice/call_party.rbi +47 -0
- data/rbi/sentdm/models/{calls/participant_update_params.rbi → voice/call_record_params.rbi} +12 -21
- data/rbi/sentdm/models/voice/call_recording.rbi +63 -0
- data/rbi/sentdm/models/voice/call_recordings.rbi +49 -0
- data/rbi/sentdm/models/voice/call_retrieve_params.rbi +48 -0
- data/rbi/sentdm/models/voice/call_timeline_entry.rbi +44 -0
- data/rbi/sentdm/models/voice/calls/api_response_of_list_of_call_participant.rbi +84 -0
- data/rbi/sentdm/models/voice/calls/call_participant.rbi +97 -0
- data/rbi/sentdm/models/voice/calls/call_participant_target.rbi +49 -0
- data/rbi/sentdm/models/voice/calls/participant_add_params.rbi +104 -0
- data/rbi/sentdm/models/voice/calls/participant_list_params.rbi +53 -0
- data/rbi/sentdm/models/voice/calls/participant_remove_all_params.rbi +53 -0
- data/rbi/sentdm/models/voice/calls/participant_remove_params.rbi +63 -0
- data/rbi/sentdm/models/voice/calls/participant_update_params.rbi +96 -0
- data/rbi/sentdm/models/voice/calls_list.rbi +54 -0
- data/rbi/sentdm/models/voice/catalogue_list_params.rbi +40 -0
- data/rbi/sentdm/models/{channels/voice_create_token_params.rbi → voice/token_create_params.rbi} +3 -6
- data/rbi/sentdm/models/voice/voice_agent.rbi +196 -0
- data/rbi/sentdm/models/voice/voice_agent_audio.rbi +30 -0
- data/rbi/sentdm/models/voice/voice_agent_audio_spec.rbi +33 -0
- data/rbi/sentdm/models/voice/voice_agent_limits.rbi +57 -0
- data/rbi/sentdm/models/voice/voice_agent_limits_spec.rbi +62 -0
- data/rbi/sentdm/models/voice/voice_agent_party.rbi +36 -0
- data/rbi/sentdm/models/voice/voice_agent_party_spec.rbi +45 -0
- data/rbi/sentdm/models/voice/voice_agent_secret.rbi +37 -0
- data/rbi/sentdm/models/voice/voice_agent_speech.rbi +48 -0
- data/rbi/sentdm/models/voice/voice_agent_speech_spec.rbi +62 -0
- data/rbi/sentdm/models/voice/voice_agent_transcripts.rbi +43 -0
- data/rbi/sentdm/models/voice/voice_agent_transcripts_spec.rbi +51 -0
- data/rbi/sentdm/models/voice/voice_agents_list.rbi +55 -0
- data/rbi/sentdm/models/voice/voice_catalogue.rbi +59 -0
- data/rbi/sentdm/models/voice/voice_catalogue_voice.rbi +75 -0
- data/rbi/sentdm/models/{channels → voice}/voice_token.rbi +8 -4
- data/rbi/sentdm/models/webhook_create_params.rbi +41 -3
- data/rbi/sentdm/models/webhook_response.rbi +112 -3
- data/rbi/sentdm/models/webhook_update_params.rbi +18 -3
- data/rbi/sentdm/models.rbi +2 -30
- data/rbi/sentdm/resources/channels/voice.rbi +57 -67
- data/rbi/sentdm/resources/channels.rbi +2 -2
- data/rbi/sentdm/resources/messages.rbi +8 -1
- data/rbi/sentdm/resources/profiles/campaigns.rbi +3 -2
- data/rbi/sentdm/resources/voice/agents.rbi +316 -0
- data/rbi/sentdm/resources/voice/calls/participants.rbi +212 -0
- data/rbi/sentdm/resources/voice/calls.rbi +244 -0
- data/rbi/sentdm/resources/voice/catalogue.rbi +59 -0
- data/rbi/sentdm/resources/voice/tokens.rbi +84 -0
- data/rbi/sentdm/resources/voice.rbi +136 -0
- data/rbi/sentdm/resources/webhooks.rbi +56 -16
- data/sig/sentdm/client.rbs +1 -1
- data/sig/sentdm/internal/voice_agents_page.rbs +41 -0
- data/sig/sentdm/models/call_event_payload.rbs +12 -0
- data/sig/sentdm/models/channels/voice_create_params.rbs +9 -4
- data/sig/sentdm/models/channels/voice_number.rbs +12 -0
- data/sig/sentdm/models/channels/voice_update_params.rbs +5 -0
- data/sig/sentdm/models/voice/agent_create_params.rbs +99 -0
- data/sig/sentdm/models/{calls/participant_remove_all_params.rbs → voice/agent_delete_params.rbs} +3 -3
- data/sig/sentdm/models/voice/agent_list_params.rbs +40 -0
- data/sig/sentdm/models/{calls/participant_list_params.rbs → voice/agent_retrieve_params.rbs} +3 -3
- data/sig/sentdm/models/{calls/participant_remove_params.rbs → voice/agent_rotate_secret_params.rbs} +8 -8
- data/sig/sentdm/models/voice/agent_update_params.rbs +108 -0
- data/sig/sentdm/models/{calls/api_response_of_list_of_call_participant.rbs → voice/api_response_of_call.rbs} +7 -7
- data/sig/sentdm/models/voice/api_response_of_call_recordings.rbs +41 -0
- data/sig/sentdm/models/voice/api_response_of_calls_list.rbs +41 -0
- data/sig/sentdm/models/voice/api_response_of_voice_agent.rbs +41 -0
- data/sig/sentdm/models/voice/api_response_of_voice_agent_secret.rbs +41 -0
- data/sig/sentdm/models/voice/api_response_of_voice_agents_list.rbs +41 -0
- data/sig/sentdm/models/voice/api_response_of_voice_catalogue.rbs +41 -0
- data/sig/sentdm/models/{channels → voice}/api_response_of_voice_token.rbs +5 -5
- data/sig/sentdm/models/voice/call.rbs +175 -0
- data/sig/sentdm/models/voice/call_hangup_params.rbs +40 -0
- data/sig/sentdm/models/voice/call_list_params.rbs +79 -0
- data/sig/sentdm/models/voice/call_list_recordings_params.rbs +32 -0
- data/sig/sentdm/models/voice/call_party.rbs +19 -0
- data/sig/sentdm/models/{calls/participant_update_params.rbs → voice/call_record_params.rbs} +8 -13
- data/sig/sentdm/models/voice/call_recording.rbs +34 -0
- data/sig/sentdm/models/voice/call_recordings.rbs +22 -0
- data/sig/sentdm/models/voice/call_retrieve_params.rbs +32 -0
- data/sig/sentdm/models/voice/call_timeline_entry.rbs +21 -0
- data/sig/sentdm/models/voice/calls/api_response_of_list_of_call_participant.rbs +43 -0
- data/sig/sentdm/models/voice/calls/call_participant.rbs +54 -0
- data/sig/sentdm/models/voice/calls/call_participant_target.rbs +25 -0
- data/sig/sentdm/models/voice/calls/participant_add_params.rbs +65 -0
- data/sig/sentdm/models/voice/calls/participant_list_params.rbs +34 -0
- data/sig/sentdm/models/voice/calls/participant_remove_all_params.rbs +36 -0
- data/sig/sentdm/models/voice/calls/participant_remove_params.rbs +42 -0
- data/sig/sentdm/models/voice/calls/participant_update_params.rbs +63 -0
- data/sig/sentdm/models/voice/calls_list.rbs +33 -0
- data/sig/sentdm/models/voice/catalogue_list_params.rbs +27 -0
- data/sig/sentdm/models/{channels/voice_create_token_params.rbs → voice/token_create_params.rbs} +3 -3
- data/sig/sentdm/models/voice/voice_agent.rbs +116 -0
- data/sig/sentdm/models/voice/voice_agent_audio.rbs +19 -0
- data/sig/sentdm/models/voice/voice_agent_audio_spec.rbs +17 -0
- data/sig/sentdm/models/voice/voice_agent_limits.rbs +38 -0
- data/sig/sentdm/models/voice/voice_agent_limits_spec.rbs +34 -0
- data/sig/sentdm/models/{calls/call_participant_target.rbs → voice/voice_agent_party.rbs} +4 -4
- data/sig/sentdm/models/voice/voice_agent_party_spec.rbs +19 -0
- data/sig/sentdm/models/voice/voice_agent_secret.rbs +19 -0
- data/sig/sentdm/models/voice/voice_agent_speech.rbs +32 -0
- data/sig/sentdm/models/voice/voice_agent_speech_spec.rbs +26 -0
- data/sig/sentdm/models/voice/voice_agent_transcripts.rbs +23 -0
- data/sig/sentdm/models/voice/voice_agent_transcripts_spec.rbs +20 -0
- data/sig/sentdm/models/voice/voice_agents_list.rbs +35 -0
- data/sig/sentdm/models/voice/voice_catalogue.rbs +35 -0
- data/sig/sentdm/models/voice/voice_catalogue_voice.rbs +42 -0
- data/sig/sentdm/models/{channels → voice}/voice_token.rbs +3 -1
- data/sig/sentdm/models/webhook_create_params.rbs +12 -0
- data/sig/sentdm/models/webhook_response.rbs +46 -3
- data/sig/sentdm/models/webhook_update_params.rbs +5 -0
- data/sig/sentdm/models.rbs +2 -30
- data/sig/sentdm/resources/channels/voice.rbs +3 -11
- data/sig/sentdm/resources/voice/agents.rbs +74 -0
- data/sig/sentdm/resources/voice/calls/participants.rbs +52 -0
- data/sig/sentdm/resources/{calls/participants.rbs → voice/calls.rbs} +25 -21
- data/sig/sentdm/resources/voice/catalogue.rbs +14 -0
- data/sig/sentdm/resources/voice/tokens.rbs +19 -0
- data/sig/sentdm/resources/voice.rbs +15 -0
- data/sig/sentdm/resources/webhooks.rbs +3 -0
- metadata +176 -83
- data/lib/sentdm/models/api_response_of_call.rb +0 -43
- data/lib/sentdm/models/api_response_of_call_recordings.rb +0 -43
- data/lib/sentdm/models/api_response_of_calls_list.rb +0 -42
- data/lib/sentdm/models/call.rb +0 -134
- data/lib/sentdm/models/call_hangup_params.rb +0 -32
- data/lib/sentdm/models/call_list_params.rb +0 -83
- data/lib/sentdm/models/call_list_recordings_params.rb +0 -26
- data/lib/sentdm/models/call_party.rb +0 -31
- data/lib/sentdm/models/call_record_params.rb +0 -55
- data/lib/sentdm/models/call_recording.rb +0 -38
- data/lib/sentdm/models/call_recordings.rb +0 -24
- data/lib/sentdm/models/call_retrieve_params.rb +0 -26
- data/lib/sentdm/models/call_timeline_entry.rb +0 -26
- data/lib/sentdm/models/calls/call_participant.rb +0 -60
- data/lib/sentdm/models/calls/call_participant_target.rb +0 -30
- data/lib/sentdm/models/calls/participant_add_params.rb +0 -66
- data/lib/sentdm/models/calls_list.rb +0 -26
- data/lib/sentdm/resources/calls/participants.rb +0 -231
- data/lib/sentdm/resources/calls.rb +0 -236
- data/rbi/sentdm/models/api_response_of_call.rbi +0 -74
- data/rbi/sentdm/models/api_response_of_call_recordings.rbi +0 -74
- data/rbi/sentdm/models/api_response_of_calls_list.rbi +0 -74
- data/rbi/sentdm/models/call.rbi +0 -179
- data/rbi/sentdm/models/call_hangup_params.rbi +0 -59
- data/rbi/sentdm/models/call_list_params.rbi +0 -112
- data/rbi/sentdm/models/call_list_recordings_params.rbi +0 -46
- data/rbi/sentdm/models/call_party.rbi +0 -41
- data/rbi/sentdm/models/call_record_params.rbi +0 -83
- data/rbi/sentdm/models/call_recording.rbi +0 -59
- data/rbi/sentdm/models/call_recordings.rbi +0 -39
- data/rbi/sentdm/models/call_retrieve_params.rbi +0 -46
- data/rbi/sentdm/models/call_timeline_entry.rbi +0 -40
- data/rbi/sentdm/models/calls/call_participant.rbi +0 -92
- data/rbi/sentdm/models/calls/call_participant_target.rbi +0 -47
- data/rbi/sentdm/models/calls/participant_add_params.rbi +0 -98
- data/rbi/sentdm/models/calls_list.rbi +0 -47
- data/rbi/sentdm/resources/calls/participants.rbi +0 -199
- data/rbi/sentdm/resources/calls.rbi +0 -207
- data/sig/sentdm/models/api_response_of_call.rbs +0 -39
- data/sig/sentdm/models/api_response_of_call_recordings.rbs +0 -39
- data/sig/sentdm/models/api_response_of_calls_list.rbs +0 -39
- data/sig/sentdm/models/call.rbs +0 -101
- data/sig/sentdm/models/call_hangup_params.rbs +0 -38
- data/sig/sentdm/models/call_list_params.rbs +0 -67
- data/sig/sentdm/models/call_list_recordings_params.rbs +0 -30
- data/sig/sentdm/models/call_party.rbs +0 -17
- data/sig/sentdm/models/call_record_params.rbs +0 -54
- data/sig/sentdm/models/call_recording.rbs +0 -32
- data/sig/sentdm/models/call_recordings.rbs +0 -17
- data/sig/sentdm/models/call_retrieve_params.rbs +0 -30
- data/sig/sentdm/models/call_timeline_entry.rbs +0 -19
- data/sig/sentdm/models/calls/call_participant.rbs +0 -52
- data/sig/sentdm/models/calls/participant_add_params.rbs +0 -63
- data/sig/sentdm/models/calls_list.rbs +0 -26
- data/sig/sentdm/resources/calls.rbs +0 -50
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Resources
|
|
5
|
+
class Voice
|
|
6
|
+
# Phone calls from the numbers you hold, driven by your own callback URL.
|
|
7
|
+
#
|
|
8
|
+
# `POST /v3/channels/voice` enables a number for calls, with the callback URL Sent
|
|
9
|
+
# asks what to do with each call on it, and `POST /v3/voice/tokens` mints a
|
|
10
|
+
# short-lived token that lets a user of your app place and receive calls as that
|
|
11
|
+
# number. When a call arrives or a caller presses a key, a signed question is
|
|
12
|
+
# POSTed to the callback URL and the answer decides the call;
|
|
13
|
+
# `POST /v3/channels/voice/{number}/test` checks the URL answers the way we need
|
|
14
|
+
# before a real call reaches it, and
|
|
15
|
+
# `POST /v3/channels/voice/{number}/rotate-secret` replaces the signing secret.
|
|
16
|
+
# The call events themselves (`call.completed` and the rest) arrive through your
|
|
17
|
+
# webhooks.
|
|
18
|
+
#
|
|
19
|
+
# Every call is a record under `/v3/voice/calls`: read it, list its recordings
|
|
20
|
+
# once one is ready, hang it up, start or stop recording, and add, mute or remove
|
|
21
|
+
# conference participants while it is live. A leg to a phone number runs for at
|
|
22
|
+
# most what your balance affords at the destination's rate.
|
|
23
|
+
#
|
|
24
|
+
# **Voice agents.** `POST /v3/voice/agents` creates an agent that answers calls
|
|
25
|
+
# through the Sent Voice Gateway: `session_type` says whether Sent carries the
|
|
26
|
+
# call as text (speech recognised and spoken for the agent) or as audio,
|
|
27
|
+
# `websocket_url` is where the gateway dials the agent for each call (leave it out
|
|
28
|
+
# and the agent dials in with your API key), and `tools`, `transfer_targets`,
|
|
29
|
+
# `fallback` and `limits` say what it may do on a call. The agent's
|
|
30
|
+
# `signing_secret` is shown on create and on
|
|
31
|
+
# `POST /v3/voice/agents/{id}/rotate-secret` only. Voices and languages for text
|
|
32
|
+
# sessions come from `GET /v3/voice/voices`. A number takes calls to an agent once
|
|
33
|
+
# it is bound to it on `/v3/channels/voice`.
|
|
34
|
+
class Calls
|
|
35
|
+
# Phone calls from the numbers you hold, driven by your own callback URL.
|
|
36
|
+
#
|
|
37
|
+
# `POST /v3/channels/voice` enables a number for calls, with the callback URL Sent
|
|
38
|
+
# asks what to do with each call on it, and `POST /v3/voice/tokens` mints a
|
|
39
|
+
# short-lived token that lets a user of your app place and receive calls as that
|
|
40
|
+
# number. When a call arrives or a caller presses a key, a signed question is
|
|
41
|
+
# POSTed to the callback URL and the answer decides the call;
|
|
42
|
+
# `POST /v3/channels/voice/{number}/test` checks the URL answers the way we need
|
|
43
|
+
# before a real call reaches it, and
|
|
44
|
+
# `POST /v3/channels/voice/{number}/rotate-secret` replaces the signing secret.
|
|
45
|
+
# The call events themselves (`call.completed` and the rest) arrive through your
|
|
46
|
+
# webhooks.
|
|
47
|
+
#
|
|
48
|
+
# Every call is a record under `/v3/voice/calls`: read it, list its recordings
|
|
49
|
+
# once one is ready, hang it up, start or stop recording, and add, mute or remove
|
|
50
|
+
# conference participants while it is live. A leg to a phone number runs for at
|
|
51
|
+
# most what your balance affords at the destination's rate.
|
|
52
|
+
#
|
|
53
|
+
# **Voice agents.** `POST /v3/voice/agents` creates an agent that answers calls
|
|
54
|
+
# through the Sent Voice Gateway: `session_type` says whether Sent carries the
|
|
55
|
+
# call as text (speech recognised and spoken for the agent) or as audio,
|
|
56
|
+
# `websocket_url` is where the gateway dials the agent for each call (leave it out
|
|
57
|
+
# and the agent dials in with your API key), and `tools`, `transfer_targets`,
|
|
58
|
+
# `fallback` and `limits` say what it may do on a call. The agent's
|
|
59
|
+
# `signing_secret` is shown on create and on
|
|
60
|
+
# `POST /v3/voice/agents/{id}/rotate-secret` only. Voices and languages for text
|
|
61
|
+
# sessions come from `GET /v3/voice/voices`. A number takes calls to an agent once
|
|
62
|
+
# it is bound to it on `/v3/channels/voice`.
|
|
63
|
+
sig { returns(Sentdm::Resources::Voice::Calls::Participants) }
|
|
64
|
+
attr_reader :participants
|
|
65
|
+
|
|
66
|
+
# Retrieves one of your calls by id: the parties, the owning number, the phone
|
|
67
|
+
# number the call was connected to and the caller id it showed, the current status
|
|
68
|
+
# with its failure reason, duration, price with the billed legs and what each
|
|
69
|
+
# cost, recording availability, and a timeline of when the call entered each
|
|
70
|
+
# status.
|
|
71
|
+
sig do
|
|
72
|
+
params(
|
|
73
|
+
id: String,
|
|
74
|
+
x_profile_id: String,
|
|
75
|
+
request_options: Sentdm::RequestOptions::OrHash
|
|
76
|
+
).returns(Sentdm::Voice::APIResponseOfCall)
|
|
77
|
+
end
|
|
78
|
+
def retrieve(
|
|
79
|
+
# The call id from the route, as carried by call webhooks and the calls list, for
|
|
80
|
+
# example call_9f2ab000-0000-4000-8000-000000000001
|
|
81
|
+
id,
|
|
82
|
+
# Profile UUID to scope the request to a child profile. Only organization API keys
|
|
83
|
+
# can use this header. The profile must belong to the calling organization.
|
|
84
|
+
x_profile_id: nil,
|
|
85
|
+
request_options: {}
|
|
86
|
+
)
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Retrieves a paginated list of your calls, most recent first. Filter by
|
|
90
|
+
# direction, status, the owning number, the mode (inapp, or agent for calls your
|
|
91
|
+
# voice agents answered), the agent that answered, and the time the call started
|
|
92
|
+
# (from and to are inclusive). Each call carries the phone number it was connected
|
|
93
|
+
# to, the caller id it showed, and the billed legs with what each cost. Use the
|
|
94
|
+
# call webhooks for real-time updates; this list is for looking calls up
|
|
95
|
+
# afterwards.
|
|
96
|
+
sig do
|
|
97
|
+
params(
|
|
98
|
+
agent_id: T.nilable(String),
|
|
99
|
+
direction: T.nilable(String),
|
|
100
|
+
from: T.nilable(Time),
|
|
101
|
+
mode: T.nilable(String),
|
|
102
|
+
number: T.nilable(String),
|
|
103
|
+
page: Integer,
|
|
104
|
+
page_size: Integer,
|
|
105
|
+
status: T.nilable(String),
|
|
106
|
+
to: T.nilable(Time),
|
|
107
|
+
x_profile_id: String,
|
|
108
|
+
request_options: Sentdm::RequestOptions::OrHash
|
|
109
|
+
).returns(Sentdm::Internal::CallsPage[Sentdm::Voice::Call])
|
|
110
|
+
end
|
|
111
|
+
def list(
|
|
112
|
+
# Query param: Optional filter on the voice agent that answered the call, such as
|
|
113
|
+
# agent_9f2ab000-0000-4000-8000-000000000001
|
|
114
|
+
agent_id: nil,
|
|
115
|
+
# Query param: Optional direction filter: outbound for calls placed from your app,
|
|
116
|
+
# inbound for calls to one of your numbers
|
|
117
|
+
direction: nil,
|
|
118
|
+
# Query param: Only calls started at or after this time (ISO 8601)
|
|
119
|
+
from: nil,
|
|
120
|
+
# Query param: Optional mode filter: inapp for calls routed by your number's
|
|
121
|
+
# callback URL, agent for calls one of your voice agents answered
|
|
122
|
+
mode: nil,
|
|
123
|
+
# Query param: Optional filter on the number that owns the call, one of your
|
|
124
|
+
# voice-enabled numbers in E.164 format
|
|
125
|
+
number: nil,
|
|
126
|
+
# Query param: Page number (1-indexed)
|
|
127
|
+
page: nil,
|
|
128
|
+
# Query param: Number of items per page
|
|
129
|
+
page_size: nil,
|
|
130
|
+
# Query param: Optional status filter: initiated, ringing, answered, completed,
|
|
131
|
+
# failed, no_answer or rejected
|
|
132
|
+
status: nil,
|
|
133
|
+
# Query param: Only calls started at or before this time (ISO 8601)
|
|
134
|
+
to: nil,
|
|
135
|
+
# Header param: Profile UUID to scope the request to a child profile. Only
|
|
136
|
+
# organization API keys can use this header. The profile must belong to the
|
|
137
|
+
# calling organization.
|
|
138
|
+
x_profile_id: nil,
|
|
139
|
+
request_options: {}
|
|
140
|
+
)
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# Ends one of your live calls. The call then ends the way any other call does once
|
|
144
|
+
# the disconnect is reported: an answered call as COMPLETED with call.completed, a
|
|
145
|
+
# call still ringing as NO_ANSWER, REJECTED or FAILED with call.failed. A call
|
|
146
|
+
# that has already ended answers 409, as do a call with no phone leg, such as one
|
|
147
|
+
# between two app users, and a call one of your voice agents answers.
|
|
148
|
+
sig do
|
|
149
|
+
params(
|
|
150
|
+
id: String,
|
|
151
|
+
sandbox: T::Boolean,
|
|
152
|
+
idempotency_key: String,
|
|
153
|
+
x_profile_id: String,
|
|
154
|
+
request_options: Sentdm::RequestOptions::OrHash
|
|
155
|
+
).void
|
|
156
|
+
end
|
|
157
|
+
def hangup(
|
|
158
|
+
# Path param: The call id from the route, as carried by call webhooks and the
|
|
159
|
+
# calls list, for example call_9f2ab000-0000-4000-8000-000000000001
|
|
160
|
+
id,
|
|
161
|
+
# Body param: Sandbox flag - when true, the operation is simulated without side
|
|
162
|
+
# effects Useful for testing integrations without actual execution
|
|
163
|
+
sandbox: nil,
|
|
164
|
+
# Header param: Unique key to ensure idempotent request processing. Must be 1-255
|
|
165
|
+
# alphanumeric characters, hyphens, or underscores. Responses are cached for 24
|
|
166
|
+
# hours per key per customer.
|
|
167
|
+
idempotency_key: nil,
|
|
168
|
+
# Header param: Profile UUID to scope the request to a child profile. Only
|
|
169
|
+
# organization API keys can use this header. The profile must belong to the
|
|
170
|
+
# calling organization.
|
|
171
|
+
x_profile_id: nil,
|
|
172
|
+
request_options: {}
|
|
173
|
+
)
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# Returns pre-signed links to the recordings of one of your calls, each valid
|
|
177
|
+
# until its url_expires_at. A recording appears once the call was recorded, by a
|
|
178
|
+
# connect answer with record set, a startRecording instruction or the recordings
|
|
179
|
+
# command, and the call.recording_ready webhook has been sent; until then, and for
|
|
180
|
+
# a call that was never recorded, the list is empty. A call recorded more than
|
|
181
|
+
# once lists every recording, oldest first, each under the recording_id its
|
|
182
|
+
# call.recording_ready webhook carried.
|
|
183
|
+
sig do
|
|
184
|
+
params(
|
|
185
|
+
id: String,
|
|
186
|
+
x_profile_id: String,
|
|
187
|
+
request_options: Sentdm::RequestOptions::OrHash
|
|
188
|
+
).returns(Sentdm::Voice::APIResponseOfCallRecordings)
|
|
189
|
+
end
|
|
190
|
+
def list_recordings(
|
|
191
|
+
# The call id from the route, as carried by call webhooks and the calls list, for
|
|
192
|
+
# example call_9f2ab000-0000-4000-8000-000000000001
|
|
193
|
+
id,
|
|
194
|
+
# Profile UUID to scope the request to a child profile. Only organization API keys
|
|
195
|
+
# can use this header. The profile must belong to the calling organization.
|
|
196
|
+
x_profile_id: nil,
|
|
197
|
+
request_options: {}
|
|
198
|
+
)
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
# Starts or stops recording one of your live calls. Use start to begin recording
|
|
202
|
+
# mid-call, or stop to end a recording, whether it was started here or by a
|
|
203
|
+
# connect answer with record set. A call that has already ended answers 409, as do
|
|
204
|
+
# a call with no phone leg, such as one between two app users, and a call one of
|
|
205
|
+
# your voice agents answers, neither of which can be recorded this way.
|
|
206
|
+
sig do
|
|
207
|
+
params(
|
|
208
|
+
id: String,
|
|
209
|
+
action: String,
|
|
210
|
+
sandbox: T::Boolean,
|
|
211
|
+
idempotency_key: String,
|
|
212
|
+
x_profile_id: String,
|
|
213
|
+
request_options: Sentdm::RequestOptions::OrHash
|
|
214
|
+
).void
|
|
215
|
+
end
|
|
216
|
+
def record(
|
|
217
|
+
# Path param: The call id from the route, as carried by call webhooks and the
|
|
218
|
+
# calls list, for example call_9f2ab000-0000-4000-8000-000000000001
|
|
219
|
+
id,
|
|
220
|
+
# Body param: start to begin recording, stop to end it
|
|
221
|
+
action: nil,
|
|
222
|
+
# Body param: Sandbox flag - when true, the operation is simulated without side
|
|
223
|
+
# effects Useful for testing integrations without actual execution
|
|
224
|
+
sandbox: nil,
|
|
225
|
+
# Header param: Unique key to ensure idempotent request processing. Must be 1-255
|
|
226
|
+
# alphanumeric characters, hyphens, or underscores. Responses are cached for 24
|
|
227
|
+
# hours per key per customer.
|
|
228
|
+
idempotency_key: nil,
|
|
229
|
+
# Header param: Profile UUID to scope the request to a child profile. Only
|
|
230
|
+
# organization API keys can use this header. The profile must belong to the
|
|
231
|
+
# calling organization.
|
|
232
|
+
x_profile_id: nil,
|
|
233
|
+
request_options: {}
|
|
234
|
+
)
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
# @api private
|
|
238
|
+
sig { params(client: Sentdm::Client).returns(T.attached_class) }
|
|
239
|
+
def self.new(client:)
|
|
240
|
+
end
|
|
241
|
+
end
|
|
242
|
+
end
|
|
243
|
+
end
|
|
244
|
+
end
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Resources
|
|
5
|
+
class Voice
|
|
6
|
+
# Phone calls from the numbers you hold, driven by your own callback URL.
|
|
7
|
+
#
|
|
8
|
+
# `POST /v3/channels/voice` enables a number for calls, with the callback URL Sent
|
|
9
|
+
# asks what to do with each call on it, and `POST /v3/voice/tokens` mints a
|
|
10
|
+
# short-lived token that lets a user of your app place and receive calls as that
|
|
11
|
+
# number. When a call arrives or a caller presses a key, a signed question is
|
|
12
|
+
# POSTed to the callback URL and the answer decides the call;
|
|
13
|
+
# `POST /v3/channels/voice/{number}/test` checks the URL answers the way we need
|
|
14
|
+
# before a real call reaches it, and
|
|
15
|
+
# `POST /v3/channels/voice/{number}/rotate-secret` replaces the signing secret.
|
|
16
|
+
# The call events themselves (`call.completed` and the rest) arrive through your
|
|
17
|
+
# webhooks.
|
|
18
|
+
#
|
|
19
|
+
# Every call is a record under `/v3/voice/calls`: read it, list its recordings
|
|
20
|
+
# once one is ready, hang it up, start or stop recording, and add, mute or remove
|
|
21
|
+
# conference participants while it is live. A leg to a phone number runs for at
|
|
22
|
+
# most what your balance affords at the destination's rate.
|
|
23
|
+
#
|
|
24
|
+
# **Voice agents.** `POST /v3/voice/agents` creates an agent that answers calls
|
|
25
|
+
# through the Sent Voice Gateway: `session_type` says whether Sent carries the
|
|
26
|
+
# call as text (speech recognised and spoken for the agent) or as audio,
|
|
27
|
+
# `websocket_url` is where the gateway dials the agent for each call (leave it out
|
|
28
|
+
# and the agent dials in with your API key), and `tools`, `transfer_targets`,
|
|
29
|
+
# `fallback` and `limits` say what it may do on a call. The agent's
|
|
30
|
+
# `signing_secret` is shown on create and on
|
|
31
|
+
# `POST /v3/voice/agents/{id}/rotate-secret` only. Voices and languages for text
|
|
32
|
+
# sessions come from `GET /v3/voice/voices`. A number takes calls to an agent once
|
|
33
|
+
# it is bound to it on `/v3/channels/voice`.
|
|
34
|
+
class Catalogue
|
|
35
|
+
# The names a voice agent's `speech.voice` and `speech.language` accept, with the
|
|
36
|
+
# default marked. The list grows as voices are added; a name is never removed
|
|
37
|
+
# without notice.
|
|
38
|
+
sig do
|
|
39
|
+
params(
|
|
40
|
+
x_profile_id: String,
|
|
41
|
+
request_options: Sentdm::RequestOptions::OrHash
|
|
42
|
+
).returns(Sentdm::Voice::APIResponseOfVoiceCatalogue)
|
|
43
|
+
end
|
|
44
|
+
def list(
|
|
45
|
+
# Profile UUID to scope the request to a child profile. Only organization API keys
|
|
46
|
+
# can use this header. The profile must belong to the calling organization.
|
|
47
|
+
x_profile_id: nil,
|
|
48
|
+
request_options: {}
|
|
49
|
+
)
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# @api private
|
|
53
|
+
sig { params(client: Sentdm::Client).returns(T.attached_class) }
|
|
54
|
+
def self.new(client:)
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Resources
|
|
5
|
+
class Voice
|
|
6
|
+
# Phone calls from the numbers you hold, driven by your own callback URL.
|
|
7
|
+
#
|
|
8
|
+
# `POST /v3/channels/voice` enables a number for calls, with the callback URL Sent
|
|
9
|
+
# asks what to do with each call on it, and `POST /v3/voice/tokens` mints a
|
|
10
|
+
# short-lived token that lets a user of your app place and receive calls as that
|
|
11
|
+
# number. When a call arrives or a caller presses a key, a signed question is
|
|
12
|
+
# POSTed to the callback URL and the answer decides the call;
|
|
13
|
+
# `POST /v3/channels/voice/{number}/test` checks the URL answers the way we need
|
|
14
|
+
# before a real call reaches it, and
|
|
15
|
+
# `POST /v3/channels/voice/{number}/rotate-secret` replaces the signing secret.
|
|
16
|
+
# The call events themselves (`call.completed` and the rest) arrive through your
|
|
17
|
+
# webhooks.
|
|
18
|
+
#
|
|
19
|
+
# Every call is a record under `/v3/voice/calls`: read it, list its recordings
|
|
20
|
+
# once one is ready, hang it up, start or stop recording, and add, mute or remove
|
|
21
|
+
# conference participants while it is live. A leg to a phone number runs for at
|
|
22
|
+
# most what your balance affords at the destination's rate.
|
|
23
|
+
#
|
|
24
|
+
# **Voice agents.** `POST /v3/voice/agents` creates an agent that answers calls
|
|
25
|
+
# through the Sent Voice Gateway: `session_type` says whether Sent carries the
|
|
26
|
+
# call as text (speech recognised and spoken for the agent) or as audio,
|
|
27
|
+
# `websocket_url` is where the gateway dials the agent for each call (leave it out
|
|
28
|
+
# and the agent dials in with your API key), and `tools`, `transfer_targets`,
|
|
29
|
+
# `fallback` and `limits` say what it may do on a call. The agent's
|
|
30
|
+
# `signing_secret` is shown on create and on
|
|
31
|
+
# `POST /v3/voice/agents/{id}/rotate-secret` only. Voices and languages for text
|
|
32
|
+
# sessions come from `GET /v3/voice/voices`. A number takes calls to an agent once
|
|
33
|
+
# it is bound to it on `/v3/channels/voice`.
|
|
34
|
+
class Tokens
|
|
35
|
+
# Mints a short-lived token for one of your app users. Call this from your backend
|
|
36
|
+
# and return the token to your app, which passes it to the voice client SDK to
|
|
37
|
+
# register. The identity is bound to the given number, or to your default app-call
|
|
38
|
+
# number when omitted, and calls placed by that identity are routed through the
|
|
39
|
+
# bound number. Minting again re-binds the identity, so an identity can move
|
|
40
|
+
# between numbers.
|
|
41
|
+
sig do
|
|
42
|
+
params(
|
|
43
|
+
identity: String,
|
|
44
|
+
number: T.nilable(String),
|
|
45
|
+
sandbox: T::Boolean,
|
|
46
|
+
ttl: T.nilable(Integer),
|
|
47
|
+
idempotency_key: String,
|
|
48
|
+
x_profile_id: String,
|
|
49
|
+
request_options: Sentdm::RequestOptions::OrHash
|
|
50
|
+
).returns(Sentdm::Voice::APIResponseOfVoiceToken)
|
|
51
|
+
end
|
|
52
|
+
def create(
|
|
53
|
+
# Body param: Your identifier for the app user, such as an agent or account id.
|
|
54
|
+
# Letters, digits, hyphens and underscores only, up to 200 characters.
|
|
55
|
+
identity: nil,
|
|
56
|
+
# Body param: One of your voice-enabled phone numbers in E.164 format. Calls
|
|
57
|
+
# placed by this identity are routed through that number. Omit to use your default
|
|
58
|
+
# app-call number.
|
|
59
|
+
number: nil,
|
|
60
|
+
# Body param: Sandbox flag - when true, the operation is simulated without side
|
|
61
|
+
# effects Useful for testing integrations without actual execution
|
|
62
|
+
sandbox: nil,
|
|
63
|
+
# Body param: Token lifetime in seconds. Defaults to 600 and cannot exceed 3600.
|
|
64
|
+
ttl: nil,
|
|
65
|
+
# Header param: Unique key to ensure idempotent request processing. Must be 1-255
|
|
66
|
+
# alphanumeric characters, hyphens, or underscores. Responses are cached for 24
|
|
67
|
+
# hours per key per customer.
|
|
68
|
+
idempotency_key: nil,
|
|
69
|
+
# Header param: Profile UUID to scope the request to a child profile. Only
|
|
70
|
+
# organization API keys can use this header. The profile must belong to the
|
|
71
|
+
# calling organization.
|
|
72
|
+
x_profile_id: nil,
|
|
73
|
+
request_options: {}
|
|
74
|
+
)
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# @api private
|
|
78
|
+
sig { params(client: Sentdm::Client).returns(T.attached_class) }
|
|
79
|
+
def self.new(client:)
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Resources
|
|
5
|
+
class Voice
|
|
6
|
+
# Phone calls from the numbers you hold, driven by your own callback URL.
|
|
7
|
+
#
|
|
8
|
+
# `POST /v3/channels/voice` enables a number for calls, with the callback URL Sent
|
|
9
|
+
# asks what to do with each call on it, and `POST /v3/voice/tokens` mints a
|
|
10
|
+
# short-lived token that lets a user of your app place and receive calls as that
|
|
11
|
+
# number. When a call arrives or a caller presses a key, a signed question is
|
|
12
|
+
# POSTed to the callback URL and the answer decides the call;
|
|
13
|
+
# `POST /v3/channels/voice/{number}/test` checks the URL answers the way we need
|
|
14
|
+
# before a real call reaches it, and
|
|
15
|
+
# `POST /v3/channels/voice/{number}/rotate-secret` replaces the signing secret.
|
|
16
|
+
# The call events themselves (`call.completed` and the rest) arrive through your
|
|
17
|
+
# webhooks.
|
|
18
|
+
#
|
|
19
|
+
# Every call is a record under `/v3/voice/calls`: read it, list its recordings
|
|
20
|
+
# once one is ready, hang it up, start or stop recording, and add, mute or remove
|
|
21
|
+
# conference participants while it is live. A leg to a phone number runs for at
|
|
22
|
+
# most what your balance affords at the destination's rate.
|
|
23
|
+
#
|
|
24
|
+
# **Voice agents.** `POST /v3/voice/agents` creates an agent that answers calls
|
|
25
|
+
# through the Sent Voice Gateway: `session_type` says whether Sent carries the
|
|
26
|
+
# call as text (speech recognised and spoken for the agent) or as audio,
|
|
27
|
+
# `websocket_url` is where the gateway dials the agent for each call (leave it out
|
|
28
|
+
# and the agent dials in with your API key), and `tools`, `transfer_targets`,
|
|
29
|
+
# `fallback` and `limits` say what it may do on a call. The agent's
|
|
30
|
+
# `signing_secret` is shown on create and on
|
|
31
|
+
# `POST /v3/voice/agents/{id}/rotate-secret` only. Voices and languages for text
|
|
32
|
+
# sessions come from `GET /v3/voice/voices`. A number takes calls to an agent once
|
|
33
|
+
# it is bound to it on `/v3/channels/voice`.
|
|
34
|
+
sig { returns(Sentdm::Resources::Voice::Calls) }
|
|
35
|
+
attr_reader :calls
|
|
36
|
+
|
|
37
|
+
# Phone calls from the numbers you hold, driven by your own callback URL.
|
|
38
|
+
#
|
|
39
|
+
# `POST /v3/channels/voice` enables a number for calls, with the callback URL Sent
|
|
40
|
+
# asks what to do with each call on it, and `POST /v3/voice/tokens` mints a
|
|
41
|
+
# short-lived token that lets a user of your app place and receive calls as that
|
|
42
|
+
# number. When a call arrives or a caller presses a key, a signed question is
|
|
43
|
+
# POSTed to the callback URL and the answer decides the call;
|
|
44
|
+
# `POST /v3/channels/voice/{number}/test` checks the URL answers the way we need
|
|
45
|
+
# before a real call reaches it, and
|
|
46
|
+
# `POST /v3/channels/voice/{number}/rotate-secret` replaces the signing secret.
|
|
47
|
+
# The call events themselves (`call.completed` and the rest) arrive through your
|
|
48
|
+
# webhooks.
|
|
49
|
+
#
|
|
50
|
+
# Every call is a record under `/v3/voice/calls`: read it, list its recordings
|
|
51
|
+
# once one is ready, hang it up, start or stop recording, and add, mute or remove
|
|
52
|
+
# conference participants while it is live. A leg to a phone number runs for at
|
|
53
|
+
# most what your balance affords at the destination's rate.
|
|
54
|
+
#
|
|
55
|
+
# **Voice agents.** `POST /v3/voice/agents` creates an agent that answers calls
|
|
56
|
+
# through the Sent Voice Gateway: `session_type` says whether Sent carries the
|
|
57
|
+
# call as text (speech recognised and spoken for the agent) or as audio,
|
|
58
|
+
# `websocket_url` is where the gateway dials the agent for each call (leave it out
|
|
59
|
+
# and the agent dials in with your API key), and `tools`, `transfer_targets`,
|
|
60
|
+
# `fallback` and `limits` say what it may do on a call. The agent's
|
|
61
|
+
# `signing_secret` is shown on create and on
|
|
62
|
+
# `POST /v3/voice/agents/{id}/rotate-secret` only. Voices and languages for text
|
|
63
|
+
# sessions come from `GET /v3/voice/voices`. A number takes calls to an agent once
|
|
64
|
+
# it is bound to it on `/v3/channels/voice`.
|
|
65
|
+
sig { returns(Sentdm::Resources::Voice::Tokens) }
|
|
66
|
+
attr_reader :tokens
|
|
67
|
+
|
|
68
|
+
# Phone calls from the numbers you hold, driven by your own callback URL.
|
|
69
|
+
#
|
|
70
|
+
# `POST /v3/channels/voice` enables a number for calls, with the callback URL Sent
|
|
71
|
+
# asks what to do with each call on it, and `POST /v3/voice/tokens` mints a
|
|
72
|
+
# short-lived token that lets a user of your app place and receive calls as that
|
|
73
|
+
# number. When a call arrives or a caller presses a key, a signed question is
|
|
74
|
+
# POSTed to the callback URL and the answer decides the call;
|
|
75
|
+
# `POST /v3/channels/voice/{number}/test` checks the URL answers the way we need
|
|
76
|
+
# before a real call reaches it, and
|
|
77
|
+
# `POST /v3/channels/voice/{number}/rotate-secret` replaces the signing secret.
|
|
78
|
+
# The call events themselves (`call.completed` and the rest) arrive through your
|
|
79
|
+
# webhooks.
|
|
80
|
+
#
|
|
81
|
+
# Every call is a record under `/v3/voice/calls`: read it, list its recordings
|
|
82
|
+
# once one is ready, hang it up, start or stop recording, and add, mute or remove
|
|
83
|
+
# conference participants while it is live. A leg to a phone number runs for at
|
|
84
|
+
# most what your balance affords at the destination's rate.
|
|
85
|
+
#
|
|
86
|
+
# **Voice agents.** `POST /v3/voice/agents` creates an agent that answers calls
|
|
87
|
+
# through the Sent Voice Gateway: `session_type` says whether Sent carries the
|
|
88
|
+
# call as text (speech recognised and spoken for the agent) or as audio,
|
|
89
|
+
# `websocket_url` is where the gateway dials the agent for each call (leave it out
|
|
90
|
+
# and the agent dials in with your API key), and `tools`, `transfer_targets`,
|
|
91
|
+
# `fallback` and `limits` say what it may do on a call. The agent's
|
|
92
|
+
# `signing_secret` is shown on create and on
|
|
93
|
+
# `POST /v3/voice/agents/{id}/rotate-secret` only. Voices and languages for text
|
|
94
|
+
# sessions come from `GET /v3/voice/voices`. A number takes calls to an agent once
|
|
95
|
+
# it is bound to it on `/v3/channels/voice`.
|
|
96
|
+
sig { returns(Sentdm::Resources::Voice::Agents) }
|
|
97
|
+
attr_reader :agents
|
|
98
|
+
|
|
99
|
+
# Phone calls from the numbers you hold, driven by your own callback URL.
|
|
100
|
+
#
|
|
101
|
+
# `POST /v3/channels/voice` enables a number for calls, with the callback URL Sent
|
|
102
|
+
# asks what to do with each call on it, and `POST /v3/voice/tokens` mints a
|
|
103
|
+
# short-lived token that lets a user of your app place and receive calls as that
|
|
104
|
+
# number. When a call arrives or a caller presses a key, a signed question is
|
|
105
|
+
# POSTed to the callback URL and the answer decides the call;
|
|
106
|
+
# `POST /v3/channels/voice/{number}/test` checks the URL answers the way we need
|
|
107
|
+
# before a real call reaches it, and
|
|
108
|
+
# `POST /v3/channels/voice/{number}/rotate-secret` replaces the signing secret.
|
|
109
|
+
# The call events themselves (`call.completed` and the rest) arrive through your
|
|
110
|
+
# webhooks.
|
|
111
|
+
#
|
|
112
|
+
# Every call is a record under `/v3/voice/calls`: read it, list its recordings
|
|
113
|
+
# once one is ready, hang it up, start or stop recording, and add, mute or remove
|
|
114
|
+
# conference participants while it is live. A leg to a phone number runs for at
|
|
115
|
+
# most what your balance affords at the destination's rate.
|
|
116
|
+
#
|
|
117
|
+
# **Voice agents.** `POST /v3/voice/agents` creates an agent that answers calls
|
|
118
|
+
# through the Sent Voice Gateway: `session_type` says whether Sent carries the
|
|
119
|
+
# call as text (speech recognised and spoken for the agent) or as audio,
|
|
120
|
+
# `websocket_url` is where the gateway dials the agent for each call (leave it out
|
|
121
|
+
# and the agent dials in with your API key), and `tools`, `transfer_targets`,
|
|
122
|
+
# `fallback` and `limits` say what it may do on a call. The agent's
|
|
123
|
+
# `signing_secret` is shown on create and on
|
|
124
|
+
# `POST /v3/voice/agents/{id}/rotate-secret` only. Voices and languages for text
|
|
125
|
+
# sessions come from `GET /v3/voice/voices`. A number takes calls to an agent once
|
|
126
|
+
# it is bound to it on `/v3/channels/voice`.
|
|
127
|
+
sig { returns(Sentdm::Resources::Voice::Catalogue) }
|
|
128
|
+
attr_reader :catalogue
|
|
129
|
+
|
|
130
|
+
# @api private
|
|
131
|
+
sig { params(client: Sentdm::Client).returns(T.attached_class) }
|
|
132
|
+
def self.new(client:)
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
end
|
|
136
|
+
end
|