- [Resource: SipTrunk](https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.sipTrunks#SipTrunk)
  - [JSON representation](https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.sipTrunks#SipTrunk.SCHEMA_REPRESENTATION)
- [Connection](https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.sipTrunks#Connection)
  - [JSON representation](https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.sipTrunks#Connection.SCHEMA_REPRESENTATION)
- [State](https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.sipTrunks#State)
- [ErrorDetails](https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.sipTrunks#ErrorDetails)
  - [JSON representation](https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.sipTrunks#ErrorDetails.SCHEMA_REPRESENTATION)
- [CertificateState](https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.sipTrunks#CertificateState)
- [SipHostname](https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.sipTrunks#SipHostname)
  - [JSON representation](https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.sipTrunks#SipHostname.SCHEMA_REPRESENTATION)
- [ProbeDetails](https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.sipTrunks#ProbeDetails)
  - [JSON representation](https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.sipTrunks#ProbeDetails.SCHEMA_REPRESENTATION)
- [ProbeStatus](https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.sipTrunks#ProbeStatus)
- [ConnectionState](https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.sipTrunks#ConnectionState)
- [HostnameErrorDetails](https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.sipTrunks#HostnameErrorDetails)
  - [JSON representation](https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.sipTrunks#HostnameErrorDetails.SCHEMA_REPRESENTATION)
- [HostnameCertificateState](https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.sipTrunks#HostnameCertificateState)
- [GoogleRootCertFile](https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.sipTrunks#GoogleRootCertFile)
- [Methods](https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.sipTrunks#METHODS_SUMMARY)

## Resource: SipTrunk

SipTrunk is the resource that represents a SIP trunk to connect to Google Telephony platform SIP trunking service.

| JSON representation |
|---|
| ``` { "name": string, "expectedHostname": [ string ], "connections": [ { object (`https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.sipTrunks#Connection`) } ], "displayName": string, "peerHostnames": [ { object (`https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.sipTrunks#SipHostname`) } ], "googleRootCertFile": enum (`https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.sipTrunks#GoogleRootCertFile`) } ``` |

| Fields ||
|---|---|
| `name` | `string` Identifier. The unique identifier of the SIP trunk. Format: `projects/<Project ID>/locations/<Location ID>/sipTrunks/<SipTrunk ID>`. |
| `expectedHostname[]` | `string` Required. The expected hostnames in the peer certificate from partner that is used for TLS authentication. |
| `connections[]` | ``object (`https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.sipTrunks#Connection`)`` Output only. Connections of the SIP trunk. |
| `displayName` | `string` Optional. Human readable alias for this trunk. |
| `peerHostnames[]` | ``object (`https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.sipTrunks#SipHostname`)`` Required. Peer hostnames of the SIP trunk. |
| `googleRootCertFile` | ``enum (`https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.sipTrunks#GoogleRootCertFile`)`` Optional. The root certificate file to use for this SIP trunk. |

## Connection

Represents a connection for SIP Trunk.

| JSON representation |
|---|
| ``` { "connectionId": string, "state": enum (`https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.sipTrunks#State`), "updateTime": string, "errorDetails": { object (`https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.sipTrunks#ErrorDetails`) } } ``` |

| Fields ||
|---|---|
| `connectionId` | `string` Output only. The unique identifier of the SIP Trunk connection. |
| `state` | ``enum (`https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.sipTrunks#State`)`` Output only. State of the connection. |
| `updateTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. When the connection status changed. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `errorDetails` | ``object (`https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.sipTrunks#ErrorDetails`)`` Output only. The error details for the connection. Only populated when authentication errors occur. |

## State

The state of Sip Trunk connection.

| Enums ||
|---|---|
| `STATE_UNSPECIFIED` | SIP Trunk connection state is Not specified. |
| `CONNECTED` | SIP Trunk connection is connected. |
| `DISCONNECTED` | SIP Trunk connection is disconnected. |
| `AUTHENTICATION_FAILED` | SIP Trunk connection has authentication error. |
| `KEEPALIVE` | SIP Trunk connection is keepalive. |

## ErrorDetails

The error details of Sip Trunk connection authentication.

| JSON representation |
|---|
| ``` { "certificateState": enum (`https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.sipTrunks#CertificateState`), "errorMessage": string } ``` |

| Fields ||
|---|---|
| `certificateState` | ``enum (`https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.sipTrunks#CertificateState`)`` Output only. The status of the certificate authentication. |
| `errorMessage` | `string` The error message provided from SIP trunking auth service |

## CertificateState

The state of Sip Trunk certificate authentication.

| Enums ||
|---|---|
| `CERTIFICATE_STATE_UNSPECIFIED` | Certificate state is not specified. |
| `CERTIFICATE_VALID` | Certificate is valid. |
| `CERTIFICATE_INVALID` | Catch all for any error not specified. |
| `CERTIFICATE_EXPIRED` | Certificate leaf node has expired. |
| `CERTIFICATE_HOSTNAME_NOT_FOUND` | There is no hostname defined to authenticate in SipTrunkingServer. |
| `CERTIFICATE_UNAUTHENTICATED` | No path found from the leaf certificate to any root. |
| `CERTIFICATE_TRUST_STORE_NOT_FOUND` | Trust store does not exist. |
| `CERTIFICATE_HOSTNAME_INVALID_FORMAT` | Hostname has invalid format. |
| `CERTIFICATE_QUOTA_EXCEEDED` | Certificate has exhausted its quota. |

## SipHostname

Represents a peer hostname for SIP Trunk.

| JSON representation |
|---|
| ``` { "peerHostname": string, "enabledSipPing": boolean, "pingInterval": string, "peerSocketAddress": string, "probeDetails": { object (`https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.sipTrunks#ProbeDetails`) }, "connectionState": enum (`https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.sipTrunks#ConnectionState`), "errorDetails": { object (`https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.sipTrunks#HostnameErrorDetails`) } } ``` |

| Fields ||
|---|---|
| `peerHostname` | `string` Required. Peer hostname name. |
| `enabledSipPing` | `boolean` Output only. Peer hostname enabled for SIP ping. |
| `pingInterval` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#duration` format)`` Output only. How often the sip ping should occur. A duration in seconds with up to nine fractional digits, ending with '`s`'. Example: `"3.5s"`. |
| `peerSocketAddress` | `string` Output only. The peer_socket address of the partner SBC pinged. |
| `probeDetails` | ``object (`https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.sipTrunks#ProbeDetails`)`` Output only. The details from the options probe. |
| `connectionState` | ``enum (`https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.sipTrunks#ConnectionState`)`` Output only. State of the connection. |
| `errorDetails` | ``object (`https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.sipTrunks#HostnameErrorDetails`)`` Output only. The error details for the connection. Only populated when authentication errors occur. |

## ProbeDetails

The probe details of Sip Trunk peer hostname.

| JSON representation |
|---|
| ``` { "optionsLatency": string, "probeStatus": enum (`https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.sipTrunks#ProbeStatus`), "initTime": string } ``` |

| Fields ||
|---|---|
| `optionsLatency` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#duration` format)`` Output only. Duration between OPTIONS send and OPTIONS 200 received. A duration in seconds with up to nine fractional digits, ending with '`s`'. Example: `"3.5s"`. |
| `probeStatus` | ``enum (`https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.sipTrunks#ProbeStatus`)`` Output only. Result of the probe. |
| `initTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. When the options probe was started. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |

## ProbeStatus

The status of sipTrunks.initiateSipOptionsPing to peer hostname.

| Enums ||
|---|---|
| `PROBE_STATUS_UNSPECIFIED` | Peer hostname ping state is not specified. |
| `PROBE_STATUS_SUCCESS` | Peer hostname ping succeeded. |
| `PROBE_STATUS_FAILED` | Peer hostname ping failed. |

## ConnectionState

The state of SBC hostname connection.

| Enums ||
|---|---|
| `CONNECTION_STATE_UNSPECIFIED` | SBC hostname connection state is Not specified. |
| `CONNECTED` | SBC hostname connection is connected. |
| `DISCONNECTED` | SBC hostname connection is disconnected. |
| `AUTHENTICATION_FAILED` | SBC hostname connection has authentication error. |
| `KEEPALIVE` | SBC hostname connection is keepalive. |

## HostnameErrorDetails

The error details of Sip Trunk hostnameconnection authentication.

| JSON representation |
|---|
| ``` { "certificateState": enum (`https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.sipTrunks#HostnameCertificateState`), "errorMessage": string } ``` |

| Fields ||
|---|---|
| `certificateState` | ``enum (`https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.sipTrunks#HostnameCertificateState`)`` Output only. The status of the certificate authentication. |
| `errorMessage` | `string` Output only. The error message provided from SIP trunking auth service |

## HostnameCertificateState

The state of Sip Trunk certificate authentication.

| Enums ||
|---|---|
| `HOSTNAME_CERTIFICATE_STATE_UNSPECIFIED` | Certificate state is not specified. |
| `VALID` | Certificate is valid. |
| `INVALID` | Catch all for any error not specified. |
| `EXPIRED` | Certificate leaf node has expired. |
| `HOSTNAME_NOT_FOUND` | There is no hostname defined to authenticate in SipTrunkingServer. |
| `UNAUTHENTICATED` | No path found from the leaf certificate to any root. |
| `TRUST_STORE_NOT_FOUND` | Trust store does not exist. |
| `HOSTNAME_INVALID_FORMAT` | Hostname has invalid format. |
| `QUOTA_EXCEEDED` | Certificate has exhausted its quota. |

## GoogleRootCertFile

The type of Google root certificate file used for mTLS.

| Enums ||
|---|---|
| `CERT_FILE_UNSPECIFIED` | Unspecified root certificate file. |
| `EXTERNAL_PRIVATE_CA` | Use external private CA. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.sipTrunks/create` | Creates a SipTrunk for a specified location. |
| ### `https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.sipTrunks/delete` | Deletes a specified SipTrunk. |
| ### `https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.sipTrunks/get` | Retrieves the specified SipTrunk. |
| ### `https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.sipTrunks/list` | Returns a list of SipTrunks in the specified location. |
| ### `https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.locations.sipTrunks/patch` | Updates the specified SipTrunk. |