Service enfonica.voice.v1beta1.Calls¶
Methods¶
CreateCall |
---|
rpc CreateCall(CreateCallRequest) returns (Call) Creates a call in the state QUEUED. This will cause an outgoing call to be started. The caller must have voice.calls.create permission on the project. |
GetCall |
---|
rpc GetCall(GetCallRequest) returns (Call) Retrieves a Call identified by the supplied resource name. The caller must have voice.calls.get permission on the project. |
ListCalls |
---|
rpc ListCalls(ListCallsRequest) returns (ListCallsResponse) Lists the Calls of the specified project. List returns Calls sorted by create_time descending. The caller must have voice.calls.list permission on the project. |
Resource: Call¶
The Call resource. This represents a call, such as an SMS.
Fields | |
---|---|
name | string Resource name of the call. It is of the form projects/*/calls/* |
to | string Required. The recipient of the call. For PSTN calls, this is the phone number in +E164 format. For calls to a SIP domain, this is the URI in the To header, in the format sip:user-or-number@domain .When placing outgoing API calls, only PSTN is supported. |
from | string Required. The originator of the call. For PSTN calls, this is the CLI (Caller ID) in +E164 format. When placing outgoing API calls, this is required. For calls to a SIP domain, this is the URI in the From header, in the format sip:user-or-number@domain .This field will not be set if the CLI originated from the PSTN and is_private is true. |
from_location | NumberLocation The approximate location where the call originated from. Only set for INCOMING calls (this may be changed in the future). |
from_zone | string The zone associated with the from phone number, if applicable. Only applicable for PSTN. Only set for INCOMING calls (this may be changed in the future). |
is_private | boolean Whether the Caller ID is private. |
labels | map<string, string> You can store any arbitrary data against labels. The maximum number of keys is 50. The maximum length of all keys and values combined is 10kB. |
transport | Transport Output only. The transport that carried this call. |
direction | Direction Output only. The direction of the call. Can be outgoing for calls that are sent or incoming for calls that are received. |
error_code | string Output only. If the outgoing call failed to be delivered, the reason why. |
error_message | string Output only. The human readable call associated with the error. |
price | google.type.Money Output only. The price of this call. This may be set at various times. Generally, it is available when the call reaches a terminal state, either immediately or shortly afterwards. This price is the price of the call itself, and does not include charges from the consumption of other paid services, such as text-to-speech and transcription. |
state | State Output only. The current state of the call. |
create_time | google.protobuf.Timestamp Output only. The creation time of the call. Output only. |
start_time | google.protobuf.Timestamp Output only. The time the call was started. For an incoming call, this is the same as create_time . For an outgoing call, this is the time that the call attempt commenced. |
ring_time | google.protobuf.Timestamp Output only. The time the call started ringing. Only set for outgoing call. |
answer_time | google.protobuf.Timestamp Output only. The time the call was answered. |
end_time | google.protobuf.Timestamp Output only. The time the call finished. |
bridged | boolean Output only. Was the call bridged with another call at any point? |
originating_call | string Output only. The name of the call that originated this call, set for outgoing calls that were created during the execution of another call, of the form projects/*/calls/* . |
create_method | CreateMethod Output only. How this call started. |
options | ApiCallOptions Required. The options to use to handle this call. This is only required when a call is created using the API. |
sip_call_id | string Output only. The Call-ID header of the call. Only set when transport is SIP. |
answer_duration | google.protobuf.Duration Output only. The duration for which the call was answered. If the call was not answered or it has not reached a terminal state, this field will not be set. |
Call.ApiCallOptions¶
Options that are applied to the call when it is an outgoing call created by the API.
Fields | |
---|---|
handler_uris[] | string Required. One or more URIs where VoiceML requests should be made to control the call. The first URI will be attempted first, while the other URIs are only used if the initial URI fails. Can be any supported URI. Minimum 1 URI, maximum 5 URIs. |
state_update_uri | string The URL where state updates should be sent. |
timeout_seconds | int32 The maximum amount of time, in seconds, the call is allowed to attempt an endpoint. Default 30 seconds. Minimum 1, maximum 600 seconds. |
recording | CallRecordingConfig The configuration of call recording. If not specified, no call recording will be configured. |
Call.CreateMethod¶
How a call was created.
Enums | |
---|---|
CREATE_METHOD_UNSPECIFIED | Unspecified create method. |
INCOMING_CALL | The call was created as a result of receiving an incoming call. |
PARENT_CALL | The call was created by its parent call, e.g. VoiceML <Call> or <Redirect> . |
API | The call was creating using the API. |
Call.Direction¶
The direction of a call.
Enums | |
---|---|
DIRECTION_UNSPECIFIED | Unspecified direction. |
OUTGOING | An outgoing call. |
INCOMING | An incoming call |
Call.State¶
The state of a call.
Enums | |
---|---|
STATE_UNSPECIFIED | Unspecified status. |
QUEUED | The call has been queued. |
STARTING | The call is being attempted. |
RINGING | The remote party is ringing. |
IN_PROGRESS | The call has been answered. |
COMPLETED | The call was answered and is now finished. |
FAILED | The call could not be made. |
NOT_ANSWERED | The call was not answered. This is the same as the call waiting to be answered and timing out. |
BUSY | The remote party indicated they were busy. |
REJECTED | The call was not answered and it was actively rejected. |
Call.Transport¶
The transport of a call.
Enums | |
---|---|
TRANSPORT_UNSPECIFIED | Unspecified transport. |
PSTN | The call was transported over PSTN (Public Switched Telephone Network). |
CLIENT | The call was transported over an Enfonica Client (WebRTC). |
SIP | The call was transported over SIP. |
NumberLocation¶
Location information for a phone number.
Fields | |
---|---|
region_code | string CLDR region code of the country/region. See http://cldr.unicode.org/ and http://www.unicode.org/cldr/charts/30/supplemental/territory_information.html for details. Example: "AU" for Australia. |
administrative_area | string If known, the highest administrative subdivision of a country or region. For example, this can be a state, a territory, a province, an oblast, or a prefecture. |
locality | string If known, the locality associated with the phone number. Generally refers to the city/town portion of the address. Examples: AU suburb, US city, IT comune, UK post town. |
coordinates | google.type.LatLng If known, the approximate coordinates of the location. |
CallRecordingConfig¶
The configuration of how a call is recorded and transcribed.
You need to comply with certain laws and regulations, including those regarding obtaining consent to record. Enfonica recommends that you consult with your legal counsel to make sure that you are complying with all applicable laws in connection with communications you record or store using Enfonica.
Fields | |
---|---|
trigger | CallRecordingTrigger Whether to record the call, and the event that should trigger recording to start. Defaults to DISABLED. |
post_processing[] | PostProcessing What post processing to perform on the recording. Defaults to NONE. |
recording_ready_uri | string The absolute URI where the recording ready webhook should be sent. |
transcribe | TranscribeOption Whether to transcribe the call. If transcription is enabled, call recording must also be enabled. Defaults to DISABLED. |
transcription_ready_uri | string The absolute URI where the transcription ready webhook should be sent. |
CallRecordingConfig.CallRecordingTrigger¶
The trigger to start call recording.
Enums | |
---|---|
CALL_RECORDING_TRIGGER_UNSPECIFIED | Unspecified recording trigger. |
DISABLED | Recording is disabled. |
ANSWER | Recording will begin when the call is answered. |
BRIDGE | Recording will begin when the call is bridged. This won't include any messages or menus played before the call was bridged. This is useful if you want to record only conversations. |
PostProcessing¶
Post processing options.
Enums | |
---|---|
POST_PROCESSING_UNSPECIFIED | Unspecified post processing. |
TRIM_SILENCE | Trim silence from the start and end of the audio. |
TranscribeOption¶
How transcription should operate.
Enums | |
---|---|
TRANSCRIBE_OPTION_UNSPECIFIED | Unspecified transcribe option. |
DISABLED | Transcription is disabled. |
DEFAULT | Transcribe using Enfonica's default transcription provider. |
CreateCallRequest¶
Request to create a new call.
Fields | |
---|---|
parent | string Required. The project under which to create the call in the form projects/* . |
call | Call Required. The call resource to be created. |
GetCallRequest¶
The GetCall request call.
Fields | |
---|---|
name | string Required. The resource name of the Call to retrieve. Must be of the form projects/*/calls/* . |
ListCallsRequest¶
The ListCalls request call.
Fields | |
---|---|
parent | string Required. The resource name of the parent of which to list calls. Must be of the form projects/* . |
page_size | int32 The maximum number of Calls to return in the response. Default value of 10 and maximum value of 100. |
page_token | string A pagination token returned from a previous call to ListCalls that indicates where this listing should continue from. |
filter | string Filter string to specify which results should be returned. The following fields can be filtered: - createTime - to - from - state - direction - transport For example: createTime >= '2021-01-01T06:00:00.0Z' AND createTime < '2021-02-01' AND state = COMPLETED OR state = BUSY AND to = '+61' OR from = '+61' Note that OR has higher precendence than AND. |
ListCallsResponse¶
The ListCalls response call.
Fields | |
---|---|
calls[] | Call A possibly paginated list of Calls that are direct descendants of the specified parent resource. |
next_page_token | string A pagination token returned from a previous call to ListCalls that indicates from where listing should continue. |