# REST Resource: projects.sipDomains

## Resource: SipDomain

The SipDomain resource.

<div class="highlight"><span class="filename">JSON representation</span><pre><code><span class="p">{</span>
  <span class="s2">&quot;name&quot;</span><span class="p">: </span><span class="kd">string</span><span class="p">,</span>
  <span class="s2">&quot;sipDomainId&quot;</span><span class="p">: </span><span class="kd">string</span><span class="p">,</span>
  <span class="s2">&quot;displayName&quot;</span><span class="p">: </span><span class="kd">string</span><span class="p">,</span>
  <span class="s2">&quot;allowRegister&quot;</span><span class="p">: </span><span class="kd">boolean</span><span class="p">,</span>
  <span class="s2">&quot;callTerminationMode&quot;</span><span class="p">: </span><span class="kd">enum (</span><a href="#sipdomainterminationmode"><strong><span class="kd">TerminationMode</span></strong></a><span class="kd">)</span><span class="p">,</span>
  <span class="s2">&quot;callTerminationHandlerUris&quot;</span><span class="p">: </span><span class="p">[</span>
    <span class="kd">string</span>
  <span class="p">]</span><span class="p">,</span>
  <span class="s2">&quot;cidrBlocks&quot;</span><span class="p">: </span><span class="p">[</span>
    <span class="p">{</span>
      <span class="kd">object (</span><a href="#cidrblock"><strong><span class="kd">CidrBlock</span></strong></a><span class="kd">)</span>
    <span class="p">}</span>
  <span class="p">]</span><span class="p">,</span>
  <span class="s2">&quot;callRecording&quot;</span><span class="p">: </span><span class="p">{</span>
    <span class="kd">object (</span><a href="/docs/cloud-voice/api-reference/rest/v1beta1/CallRecordingConfig/"><strong><span class="kd">CallRecordingConfig</span></strong></a><span class="kd">)</span>
  <span class="p">}</span><span class="p">,</span>
  <span class="s2">&quot;type&quot;</span><span class="p">: </span><span class="kd">enum (</span><a href="#sipdomaindomaintype"><strong><span class="kd">DomainType</span></strong></a><span class="kd">)</span><span class="p">,</span>
  <span class="s2">&quot;channelLimit&quot;</span><span class="p">: </span><span class="kd">number (</span><a href="https://developers.google.com/protocol-buffers/docs/proto3#json" target="_blank"><strong><span class="kd">int32</span></strong></a><span class="kd">)</span><span class="p">,</span>
  <span class="s2">&quot;teamsDirectRoutingStatus&quot;</span><span class="p">: </span><span class="p">{</span>
    <span class="kd">object (</span><a href="#teamsdirectroutingstatus"><strong><span class="kd">TeamsDirectRoutingStatus</span></strong></a><span class="kd">)</span>
  <span class="p">}</span><span class="p">,</span>
  <span class="s2">&quot;fqdn&quot;</span><span class="p">: </span><span class="kd">string</span><span class="p">,</span>
  <span class="s2">&quot;createTime&quot;</span><span class="p">: </span><span class="kd">string (</span><a href="https://developers.google.com/protocol-buffers/docs/proto3#json" target="_blank"><strong><span class="kd">Timestamp</span></strong></a><span class="kd">)</span><span class="p">,</span>
  <span class="s2">&quot;deleteTime&quot;</span><span class="p">: </span><span class="kd">string (</span><a href="https://developers.google.com/protocol-buffers/docs/proto3#json" target="_blank"><strong><span class="kd">Timestamp</span></strong></a><span class="kd">)</span><span class="p">,</span>
  <span class="s2">&quot;domainOptional&quot;</span><span class="p">: </span><span class="kd">boolean</span>
<span class="p">}</span></code></pre></div>

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">sipDomainId</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">displayName</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">allowRegister</span> | <span class="e-code">boolean</span><br/>Whether REGISTER is supported for users.
<span class="e-code">callTerminationMode</span> | <span class="e-code">enum ([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">callTerminationHandlerUris[]</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">cidrBlocks[]</span> | <span class="e-code">object ([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">callRecording</span> | <span class="e-code">object ([CallRecordingConfig](/docs/cloud-voice/api-reference/rest/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">enum ([DomainType](#sipdomaindomaintype))</span><br/>Immutable. The type of SIP domain. Defaults to STANDARD. Can only be set on Create.
<span class="e-code">channelLimit</span> | <span class="e-code">number (<a href="https://developers.google.com/protocol-buffers/docs/proto3#json" target="_blank">int32</a> format)</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">teamsDirectRoutingStatus</span> | <span class="e-code">object ([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">createTime</span> | <span class="e-code">string (<a href="https://developers.google.com/protocol-buffers/docs/proto3#json" target="_blank">Timestamp</a> format)</span><br/>Output only. The creation time of the sip domain.
<span class="e-code">deleteTime</span> | <span class="e-code">string (<a href="https://developers.google.com/protocol-buffers/docs/proto3#json" target="_blank">Timestamp</a> format)</span><br/>Output only. The deletion time of the sip domain, if it has been deleted.
<span class="e-code">domainOptional</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/>

## 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.

## CidrBlock

Repesents a block of IPv4 addresses.

<div class="highlight"><span class="filename">JSON representation</span><pre><code><span class="p">{</span>
  <span class="s2">&quot;displayName&quot;</span><span class="p">: </span><span class="kd">string</span><span class="p">,</span>
  <span class="s2">&quot;cidrBlock&quot;</span><span class="p">: </span><span class="kd">string</span>
<span class="p">}</span></code></pre></div>

Fields | &nbsp;
--|--
<span class="e-code">displayName</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">cidrBlock</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.

## TeamsDirectRoutingStatus

The Teams Direct Routing Status.

<div class="highlight"><span class="filename">JSON representation</span><pre><code><span class="p">{</span>
  <span class="s2">&quot;verified&quot;</span><span class="p">: </span><span class="kd">boolean</span>
<span class="p">}</span></code></pre></div>

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.

## Methods

Methods | &nbsp;
--|--
<span class="e-code">[create](/docs/cloud-voice/api-reference/rest/v1beta1/projects.sipDomains/create/)</span> | <span class="e-code">POST /v1beta1/{parent}/sipDomains</span><br/>Creates a sip domain.<br/><br/>The caller must have `voice.sipDomains.create` permission on the project.
<span class="e-code">[get](/docs/cloud-voice/api-reference/rest/v1beta1/projects.sipDomains/get/)</span> | <span class="e-code">GET /v1beta1/{name}</span><br/>Retrieves a sip domain identified by the supplied resource name.<br/><br/>The caller must have `voice.sipDomains.get` permission on the project.
<span class="e-code">[list](/docs/cloud-voice/api-reference/rest/v1beta1/projects.sipDomains/list/)</span> | <span class="e-code">GET /v1beta1/{parent}/sipDomains</span><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.
<span class="e-code">[update](/docs/cloud-voice/api-reference/rest/v1beta1/projects.sipDomains/update/)</span> | <span class="e-code">PATCH /v1beta1/{sip_domain.name}</span><br/>Updates a sip domain.<br/><br/>The caller must have `voice.sipDomains.update` permission on the project.
<span class="e-code">[delete](/docs/cloud-voice/api-reference/rest/v1beta1/projects.sipDomains/delete/)</span> | <span class="e-code">DELETE /v1beta1/{name}</span><br/>Performs a soft-delete of the specified SIP domain.<br/><br/>The caller must have `voice.sipDomains.delete` permission on the project.
<span class="e-code">[verifyTeamsDirectRouting](/docs/cloud-voice/api-reference/rest/v1beta1/projects.sipDomains/verifyTeamsDirectRouting/)</span> | <span class="e-code">POST /v1beta1/{sip_domain}:verifyTeamsDirectRouting</span><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.

