# Service enfonica.voice.v1beta1.SipDomains

## Methods

| CreateSipDomain |
| -- |
| <span class="e-code">rpc CreateSipDomain(<span class="e-code">[CreateSipDomainRequest](#createsipdomainrequest)</span>) returns (<span class="e-code">[SipDomain](#resource-sipdomain)</span>)</span><br/><br/>Creates a sip domain.<br/><br/>The caller must have `voice.sipDomains.create` permission on the project. |

| DeleteSipDomain |
| -- |
| <span class="e-code">rpc DeleteSipDomain(<span class="e-code">[DeleteSipDomainRequest](#deletesipdomainrequest)</span>) returns (<span class="e-code">[SipDomain](#resource-sipdomain)</span>)</span><br/><br/>Performs a soft-delete of the specified SIP domain.<br/><br/>The caller must have `voice.sipDomains.delete` permission on the project. |

| GetSipDomain |
| -- |
| <span class="e-code">rpc GetSipDomain(<span class="e-code">[GetSipDomainRequest](#getsipdomainrequest)</span>) returns (<span class="e-code">[SipDomain](#resource-sipdomain)</span>)</span><br/><br/>Retrieves a sip domain identified by the supplied resource name.<br/><br/>The caller must have `voice.sipDomains.get` permission on the project. |

| ListSipDomains |
| -- |
| <span class="e-code">rpc ListSipDomains(<span class="e-code">[ListSipDomainsRequest](#listsipdomainsrequest)</span>) returns (<span class="e-code">[ListSipDomainsResponse](#listsipdomainsresponse)</span>)</span><br/><br/>Lists all SipDomains. List returns sip domain sorted by create_time descending.<br/><br/>The caller must have `voice.sipDomains.list` permission on the project. |

| UpdateSipDomain |
| -- |
| <span class="e-code">rpc UpdateSipDomain(<span class="e-code">[UpdateSipDomainRequest](#updatesipdomainrequest)</span>) returns (<span class="e-code">[SipDomain](#resource-sipdomain)</span>)</span><br/><br/>Updates a sip domain.<br/><br/>The caller must have `voice.sipDomains.update` permission on the project. |

| VerifyTeamsDirectRouting |
| -- |
| <span class="e-code">rpc VerifyTeamsDirectRouting(<span class="e-code">[VerifyTeamsDirectRoutingRequest](#verifyteamsdirectroutingrequest)</span>) returns (<span class="e-code">[VerifyTeamsDirectRoutingResponse](#verifyteamsdirectroutingresponse)</span>)</span><br/><br/>Verifies the SIP domain with Teams Direct Routing by applying a verification string provided by Office 365.<br/><br/>The caller must have `voice.sipDomains.update` permission on the project. |

## Resource: SipDomain

The SipDomain resource.

Fields | &nbsp;
--|--
<span class="e-code">name</span> | <span class="e-code">string</span><br/>Resource name of the sip domain. It must match the pattern `projects/{project_id}/sipDomains/{sip_domain_id}`
<span class="e-code">sip_domain_id</span> | <span class="e-code">string</span><br/>Output only. The subdomain component of the SIP domain. This is the {sip_domain_id} value from `name` and is a convenience field. The FQDN of the SIP domain will be <sip_domain_id> prepended to the base domain, such as sip.enfonica.com.<br/><br/>This value must be globally unique.<br/><br/>This must be lowercase alpha-numeric or hyphens and must start and end with an alpha-numeric character, and must be a minimum of 2 and maximum of 30 characters. This is captured in the following regular expression: ^[a-z0-9][a-z0-9-]{0,28}[a-z0-9]$
<span class="e-code">display_name</span> | <span class="e-code">string</span><br/>The display name of the sip domain for use in the UI. Max length 100 characters.
<span class="e-code">allow_register</span> | <span class="e-code">boolean</span><br/>Whether REGISTER is supported for users.
<span class="e-code">call_termination_mode</span> | <span class="e-code">[TerminationMode](#sipdomainterminationmode)</span><br/>How call termination will be handled. This can be configured to act as a simple SIP trunk, or as a programmable SIP domain.
<span class="e-code">call_termination_handler_uris[]</span> | <span class="e-code">string</span><br/>List of URIs in priority order that will be executed for call termination. This is only used when call_termination_mode is PROGRAMMABLE.<br/><br/>The first URI is the primary, and the subsequent URIs are used in order if the previous URIs fail.<br/><br/>The following URIs are supported: - absolute `http` and `https` URIs.<br/><br/>Additional URIs may be supported in the future.<br/><br/>Maximum 5 URIs.<br/><br/>At least one entry must be specified when call_termination_mode is PROGRAMMABLE.
<span class="e-code">cidr_blocks[]</span> | <span class="e-code">[CidrBlock](#cidrblock)</span><br/>A list of up to 100 IP blocks that are permitted to use this SIP domain.<br/><br/>How authorization works changes based on this whitelist and users: - If this list is empty and there are no users defined, the SIP domain cannot be used. - If this list is specified and there are no users defined, any IP that matches the whitelist can place calls without authentication. - If this list is specified and users are defined, user authentication is required and can only occur when their IP matches this whitelist.<br/><br/>If you have requested Enfonica to set `domain_optional` to true, then you cannot modify this field and it becomes read-only.<br/><br/>
<span class="e-code">call_recording</span> | <span class="e-code">[CallRecordingConfig](/docs/cloud-voice/api-reference/rpc/enfonica.voice.v1beta1/CallRecordingConfig/)</span><br/>The configuration of call recording and transcription. If not set, then call recording is disabled.
<span class="e-code">type</span> | <span class="e-code">[DomainType](#sipdomaindomaintype)</span><br/>Immutable. The type of SIP domain. Defaults to STANDARD. Can only be set on Create.
<span class="e-code">channel_limit</span> | <span class="e-code">int32</span><br/>The maximum number of simultaneous calls allowed over this SIP domain. This is only applicable to Teams Direct Routing, and is ignored for other types of SIP domains. Note that support for other types of SIP domains may be added in the future.<br/><br/>For Teams Direct Routing, you will be billed based on your channel limit. To avoid being billed, you must delete the SIP domain.<br/><br/>For Teams Direct Routing: Valid values: 1 to 100. Defaults to 1.
<span class="e-code">teams_direct_routing_status</span> | <span class="e-code">[TeamsDirectRoutingStatus](#teamsdirectroutingstatus)</span><br/>Output only. The status of Teams Direct Routing. Only set if type is TEAMS_DIRECT_ROUTING.
<span class="e-code">fqdn</span> | <span class="e-code">string</span><br/>Output only. The FQDN associated with this SIP domain.
<span class="e-code">create_time</span> | <span class="e-code"><a href="https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#timestamp" target="_blank">google.protobuf.Timestamp</a></span><br/>Output only. The creation time of the sip domain.
<span class="e-code">delete_time</span> | <span class="e-code"><a href="https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#timestamp" target="_blank">google.protobuf.Timestamp</a></span><br/>Output only. The deletion time of the sip domain, if it has been deleted.
<span class="e-code">domain_optional</span> | <span class="e-code">boolean</span><br/>Output only. For call termination, whether specifying the domain name is optional. This flag must be enabled by Enfonica support.<br/><br/>If true, then calls can be made to Enfonica SIP IP addresses without specifying the domain name. The IP networks in `cidr_blocks` are used to match calls to this SIP domain. Having this functionality enabled also prohibits you from modifying `cidr_blocks`. To modify `cidr_blocks` with this functionality enabled, you must contact Enfonica support.<br/><br/>If false (default), calls must be made using the domain name and you have full access to modify `cidr_blocks`.<br/><br/>

## 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 | &nbsp;
--|--
<span class="e-code">trigger</span> | <span class="e-code">[CallRecordingTrigger](/docs/cloud-voice/api-reference/rpc/enfonica.voice.v1beta1/CallRecordingConfig.CallRecordingTrigger/)</span><br/>Whether to record the call, and the event that should trigger recording to start. Defaults to DISABLED.
<span class="e-code">post_processing[]</span> | <span class="e-code">[PostProcessing](/docs/cloud-voice/api-reference/rpc/enfonica.voice.v1beta1/PostProcessing/)</span><br/>What post processing to perform on the recording. Defaults to NONE.
<span class="e-code">recording_ready_uri</span> | <span class="e-code">string</span><br/>The absolute URI where the recording ready webhook should be sent.
<span class="e-code">transcribe</span> | <span class="e-code">[TranscribeOption](/docs/cloud-voice/api-reference/rpc/enfonica.voice.v1beta1/TranscribeOption/)</span><br/>Whether to transcribe the call. If transcription is enabled, call recording must also be enabled. Defaults to DISABLED.
<span class="e-code">transcription_ready_uri</span> | <span class="e-code">string</span><br/>The absolute URI where the transcription ready webhook should be sent.

## CidrBlock

Repesents a block of IPv4 addresses.

Fields | &nbsp;
--|--
<span class="e-code">display_name</span> | <span class="e-code">string</span><br/>The display name of this CIDR block. May be up to 100 characters in length.
<span class="e-code">cidr_block</span> | <span class="e-code">string</span><br/>The block of IPv4 addresses in CIDR notation.

## SipDomain.DomainType

Type of SIP domain.

Enums | &nbsp;
--|--
<span class="e-code">DOMAIN_TYPE_UNSPECIFIED</span> | Unspecified domain type.
<span class="e-code">DOMAIN_TYPE_STANDARD</span> | Standard SIP domain.
<span class="e-code">DOMAIN_TYPE_TEAMS_DIRECT_ROUTING</span> | SIP domain configured for interoperability with Microsoft Teams Direct Routing. For Teams Direct Routing SIP domains, the following behavior changes apply: - `cidr_blocks` is read-only and will be auto-populated. - the LoadBalancer sub-resource is read-only and will be auto-populated. - `domain_optional` will always be false. - `channel_limit` applies and you will be billed.

## SipDomain.TerminationMode

Call termination modes.

Enums | &nbsp;
--|--
<span class="e-code">TERMINATION_MODE_UNSPECIFIED</span> | Unspecified termination mode.
<span class="e-code">TERMINATION_MODE_DISABLED</span> | Call termination is not permitted.
<span class="e-code">PSTN_TRUNK</span> | Calls to this SIP domain will be routed over the PSTN.
<span class="e-code">PROGRAMMABLE</span> | Calls to this SIP domain will be handled by a VoiceML endpoint.

## TeamsDirectRoutingStatus

The Teams Direct Routing Status.

Fields | &nbsp;
--|--
<span class="e-code">verified</span> | <span class="e-code">boolean</span><br/>Whether verification has been performed to verify the ownership of the SIP domain with Office 365.

## CallRecordingConfig.CallRecordingTrigger

The trigger to start call recording.

Enums | &nbsp;
--|--
<span class="e-code">CALL_RECORDING_TRIGGER_UNSPECIFIED</span> | Unspecified recording trigger.
<span class="e-code">DISABLED</span> | Recording is disabled.
<span class="e-code">ANSWER</span> | Recording will begin when the call is answered.
<span class="e-code">BRIDGE</span> | 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 | &nbsp;
--|--
<span class="e-code">POST_PROCESSING_UNSPECIFIED</span> | Unspecified post processing.
<span class="e-code">TRIM_SILENCE</span> | Trim silence from the start and end of the audio.

## TranscribeOption

How transcription should operate.

Enums | &nbsp;
--|--
<span class="e-code">TRANSCRIBE_OPTION_UNSPECIFIED</span> | Unspecified transcribe option.
<span class="e-code">DISABLED</span> | Transcription is disabled.
<span class="e-code">DEFAULT</span> | Transcribe using Enfonica's default transcription provider.

## CreateSipDomainRequest

Request to create a new sip domain.

Fields | &nbsp;
--|--
<span class="e-code">parent</span> | <span class="e-code">string</span><br/>Required. The project under which to create the sip domain in the form `projects/*`.
<span class="e-code">sip_domain</span> | <span class="e-code">[SipDomain](#resource-sipdomain)</span><br/>Required. The sip domain resource to be created.
<span class="e-code">sip_domain_id</span> | <span class="e-code">string</span><br/>Required. The subdomain component of the SIP domain. This is the {sip_domain_id} value from `name` and can only be set on create. The FQDN of the SIP domain will be <sip_domain_id>.sip.enfonica.com.<br/><br/>This value must be globally unique. If the identifier already exists, the create method will fail with ALREADY_EXISTS.<br/><br/>This must be lowercase alpha-numeric or hyphens and must start and end with an alpha-numeric character, and must be a minimum of 2 and maximum of 30 characters. This is captured in the following regular expression: ^[a-z0-9][a-z0-9-]{0,28}[a-z0-9]$ Can only be set on create.

## GetSipDomainRequest

The GetSipDomain request message.

Fields | &nbsp;
--|--
<span class="e-code">name</span> | <span class="e-code">string</span><br/>Required. The resource name of the sip domain to retrieve. Must be of the form `projects/*/sipDomains/*`.

## ListSipDomainsRequest

The ListSipDomains request.

Fields | &nbsp;
--|--
<span class="e-code">parent</span> | <span class="e-code">string</span><br/>Required. The project under which to list sip domain, in the form `projects/*`.
<span class="e-code">page_size</span> | <span class="e-code">int32</span><br/>The maximum number of sip domain to return in the response. Default value of 10 and maximum value of 100.
<span class="e-code">page_token</span> | <span class="e-code">string</span><br/>A pagination token returned from a previous call to `ListSipDomains` that indicates where this listing should continue from.
<span class="e-code">show_deleted</span> | <span class="e-code">boolean</span><br/>Whether to include deleted sip domains in the response. Defaults to false.

## ListSipDomainsResponse

The ListSipDomains response.

Fields | &nbsp;
--|--
<span class="e-code">sip_domains[]</span> | <span class="e-code">[SipDomain](#resource-sipdomain)</span><br/>A possibly paginated list of sip domain that are direct descendants of the specified parent resource.
<span class="e-code">next_page_token</span> | <span class="e-code">string</span><br/>A pagination token returned from a previous call to `ListSipDomains` that indicates from where listing should continue.

## UpdateSipDomainRequest

The request message for updating a SIP domain's properties.

Fields | &nbsp;
--|--
<span class="e-code">sip_domain</span> | <span class="e-code">[SipDomain](#resource-sipdomain)</span><br/>Required. The new definition of the SipDomain.
<span class="e-code">update_mask</span> | <span class="e-code"><a href="https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask" target="_blank">google.protobuf.FieldMask</a></span><br/>Fields to be updated.

## DeleteSipDomainRequest

The DeleteSipDomain request message.

Fields | &nbsp;
--|--
<span class="e-code">name</span> | <span class="e-code">string</span><br/>Required. The resource name of the sip domain to be deleted. Must be of the form `projects/*/sipDomains/*`.

## VerifyTeamsDirectRoutingRequest

The VerifyTeamsDirectRouting request message.

Fields | &nbsp;
--|--
<span class="e-code">sip_domain</span> | <span class="e-code">string</span><br/>Required. The resource name of the SIP domain to verify. Must be of the form `projects/*/sipDomains/*`.
<span class="e-code">txt_record_value</span> | <span class="e-code">string</span><br/>Required. The value of the DNS TXT verification. Maximum length of 100 characters. Must match the pattern `^[a-zA-Z0-9=]+$`.

## VerifyTeamsDirectRoutingResponse

The VerifyTeamsDirectRouting response message.

This type has no fields.

