github.com/twilio/twilio-go@v1.20.1/rest/trunking/v1/docs/TrunksApi.md (about) 1 # TrunksApi 2 3 All URIs are relative to *https://trunking.twilio.com* 4 5 Method | HTTP request | Description 6 ------------- | ------------- | ------------- 7 [**CreateTrunk**](TrunksApi.md#CreateTrunk) | **Post** /v1/Trunks | 8 [**DeleteTrunk**](TrunksApi.md#DeleteTrunk) | **Delete** /v1/Trunks/{Sid} | 9 [**FetchTrunk**](TrunksApi.md#FetchTrunk) | **Get** /v1/Trunks/{Sid} | 10 [**ListTrunk**](TrunksApi.md#ListTrunk) | **Get** /v1/Trunks | 11 [**UpdateTrunk**](TrunksApi.md#UpdateTrunk) | **Post** /v1/Trunks/{Sid} | 12 13 14 15 ## CreateTrunk 16 17 > TrunkingV1Trunk CreateTrunk(ctx, optional) 18 19 20 21 22 23 ### Path Parameters 24 25 This endpoint does not need any path parameter. 26 27 ### Other Parameters 28 29 Other parameters are passed through a pointer to a CreateTrunkParams struct 30 31 32 Name | Type | Description 33 ------------- | ------------- | ------------- 34 **FriendlyName** | **string** | A descriptive string that you create to describe the resource. It can be up to 64 characters long. 35 **DomainName** | **string** | The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and `-` and must end with `pstn.twilio.com`. See [Termination Settings](https://www.twilio.com/docs/sip-trunking#termination) for more information. 36 **DisasterRecoveryUrl** | **string** | The URL we should call using the `disaster_recovery_method` if an error occurs while sending SIP traffic towards the configured Origination URL. We retrieve TwiML from the URL and execute the instructions like any other normal TwiML call. See [Disaster Recovery](https://www.twilio.com/docs/sip-trunking#disaster-recovery) for more information. 37 **DisasterRecoveryMethod** | **string** | The HTTP method we should use to call the `disaster_recovery_url`. Can be: `GET` or `POST`. 38 **TransferMode** | **string** | 39 **Secure** | **bool** | Whether Secure Trunking is enabled for the trunk. If enabled, all calls going through the trunk will be secure using SRTP for media and TLS for signaling. If disabled, then RTP will be used for media. See [Secure Trunking](https://www.twilio.com/docs/sip-trunking#securetrunking) for more information. 40 **CnamLookupEnabled** | **bool** | Whether Caller ID Name (CNAM) lookup should be enabled for the trunk. If enabled, all inbound calls to the SIP Trunk from the United States and Canada automatically perform a CNAM Lookup and display Caller ID data on your phone. See [CNAM Lookups](https://www.twilio.com/docs/sip-trunking#CNAM) for more information. 41 **TransferCallerId** | **string** | 42 43 ### Return type 44 45 [**TrunkingV1Trunk**](TrunkingV1Trunk.md) 46 47 ### Authorization 48 49 [accountSid_authToken](../README.md#accountSid_authToken) 50 51 ### HTTP request headers 52 53 - **Content-Type**: application/x-www-form-urlencoded 54 - **Accept**: application/json 55 56 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 57 [[Back to Model list]](../README.md#documentation-for-models) 58 [[Back to README]](../README.md) 59 60 61 ## DeleteTrunk 62 63 > DeleteTrunk(ctx, Sid) 64 65 66 67 68 69 ### Path Parameters 70 71 72 Name | Type | Description 73 ------------- | ------------- | ------------- 74 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 75 **Sid** | **string** | The unique string that we created to identify the Trunk resource to delete. 76 77 ### Other Parameters 78 79 Other parameters are passed through a pointer to a DeleteTrunkParams struct 80 81 82 Name | Type | Description 83 ------------- | ------------- | ------------- 84 85 ### Return type 86 87 (empty response body) 88 89 ### Authorization 90 91 [accountSid_authToken](../README.md#accountSid_authToken) 92 93 ### HTTP request headers 94 95 - **Content-Type**: Not defined 96 - **Accept**: Not defined 97 98 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 99 [[Back to Model list]](../README.md#documentation-for-models) 100 [[Back to README]](../README.md) 101 102 103 ## FetchTrunk 104 105 > TrunkingV1Trunk FetchTrunk(ctx, Sid) 106 107 108 109 110 111 ### Path Parameters 112 113 114 Name | Type | Description 115 ------------- | ------------- | ------------- 116 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 117 **Sid** | **string** | The unique string that we created to identify the Trunk resource to fetch. 118 119 ### Other Parameters 120 121 Other parameters are passed through a pointer to a FetchTrunkParams struct 122 123 124 Name | Type | Description 125 ------------- | ------------- | ------------- 126 127 ### Return type 128 129 [**TrunkingV1Trunk**](TrunkingV1Trunk.md) 130 131 ### Authorization 132 133 [accountSid_authToken](../README.md#accountSid_authToken) 134 135 ### HTTP request headers 136 137 - **Content-Type**: Not defined 138 - **Accept**: application/json 139 140 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 141 [[Back to Model list]](../README.md#documentation-for-models) 142 [[Back to README]](../README.md) 143 144 145 ## ListTrunk 146 147 > []TrunkingV1Trunk ListTrunk(ctx, optional) 148 149 150 151 152 153 ### Path Parameters 154 155 This endpoint does not need any path parameter. 156 157 ### Other Parameters 158 159 Other parameters are passed through a pointer to a ListTrunkParams struct 160 161 162 Name | Type | Description 163 ------------- | ------------- | ------------- 164 **PageSize** | **int** | How many resources to return in each list page. The default is 50, and the maximum is 1000. 165 **Limit** | **int** | Max number of records to return. 166 167 ### Return type 168 169 [**[]TrunkingV1Trunk**](TrunkingV1Trunk.md) 170 171 ### Authorization 172 173 [accountSid_authToken](../README.md#accountSid_authToken) 174 175 ### HTTP request headers 176 177 - **Content-Type**: Not defined 178 - **Accept**: application/json 179 180 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 181 [[Back to Model list]](../README.md#documentation-for-models) 182 [[Back to README]](../README.md) 183 184 185 ## UpdateTrunk 186 187 > TrunkingV1Trunk UpdateTrunk(ctx, Sidoptional) 188 189 190 191 192 193 ### Path Parameters 194 195 196 Name | Type | Description 197 ------------- | ------------- | ------------- 198 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 199 **Sid** | **string** | The unique string that we created to identify the OriginationUrl resource to update. 200 201 ### Other Parameters 202 203 Other parameters are passed through a pointer to a UpdateTrunkParams struct 204 205 206 Name | Type | Description 207 ------------- | ------------- | ------------- 208 **FriendlyName** | **string** | A descriptive string that you create to describe the resource. It can be up to 64 characters long. 209 **DomainName** | **string** | The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and `-` and must end with `pstn.twilio.com`. See [Termination Settings](https://www.twilio.com/docs/sip-trunking#termination) for more information. 210 **DisasterRecoveryUrl** | **string** | The URL we should call using the `disaster_recovery_method` if an error occurs while sending SIP traffic towards the configured Origination URL. We retrieve TwiML from the URL and execute the instructions like any other normal TwiML call. See [Disaster Recovery](https://www.twilio.com/docs/sip-trunking#disaster-recovery) for more information. 211 **DisasterRecoveryMethod** | **string** | The HTTP method we should use to call the `disaster_recovery_url`. Can be: `GET` or `POST`. 212 **TransferMode** | **string** | 213 **Secure** | **bool** | Whether Secure Trunking is enabled for the trunk. If enabled, all calls going through the trunk will be secure using SRTP for media and TLS for signaling. If disabled, then RTP will be used for media. See [Secure Trunking](https://www.twilio.com/docs/sip-trunking#securetrunking) for more information. 214 **CnamLookupEnabled** | **bool** | Whether Caller ID Name (CNAM) lookup should be enabled for the trunk. If enabled, all inbound calls to the SIP Trunk from the United States and Canada automatically perform a CNAM Lookup and display Caller ID data on your phone. See [CNAM Lookups](https://www.twilio.com/docs/sip-trunking#CNAM) for more information. 215 **TransferCallerId** | **string** | 216 217 ### Return type 218 219 [**TrunkingV1Trunk**](TrunkingV1Trunk.md) 220 221 ### Authorization 222 223 [accountSid_authToken](../README.md#accountSid_authToken) 224 225 ### HTTP request headers 226 227 - **Content-Type**: application/x-www-form-urlencoded 228 - **Accept**: application/json 229 230 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 231 [[Back to Model list]](../README.md#documentation-for-models) 232 [[Back to README]](../README.md) 233