github.com/twilio/twilio-go@v1.20.1/rest/voice/v1/docs/ByocTrunksApi.md (about) 1 # ByocTrunksApi 2 3 All URIs are relative to *https://voice.twilio.com* 4 5 Method | HTTP request | Description 6 ------------- | ------------- | ------------- 7 [**CreateByocTrunk**](ByocTrunksApi.md#CreateByocTrunk) | **Post** /v1/ByocTrunks | 8 [**DeleteByocTrunk**](ByocTrunksApi.md#DeleteByocTrunk) | **Delete** /v1/ByocTrunks/{Sid} | 9 [**FetchByocTrunk**](ByocTrunksApi.md#FetchByocTrunk) | **Get** /v1/ByocTrunks/{Sid} | 10 [**ListByocTrunk**](ByocTrunksApi.md#ListByocTrunk) | **Get** /v1/ByocTrunks | 11 [**UpdateByocTrunk**](ByocTrunksApi.md#UpdateByocTrunk) | **Post** /v1/ByocTrunks/{Sid} | 12 13 14 15 ## CreateByocTrunk 16 17 > VoiceV1ByocTrunk CreateByocTrunk(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 CreateByocTrunkParams struct 30 31 32 Name | Type | Description 33 ------------- | ------------- | ------------- 34 **FriendlyName** | **string** | A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. 35 **VoiceUrl** | **string** | The URL we should call when the BYOC Trunk receives a call. 36 **VoiceMethod** | **string** | The HTTP method we should use to call `voice_url`. Can be: `GET` or `POST`. 37 **VoiceFallbackUrl** | **string** | The URL that we should call when an error occurs while retrieving or executing the TwiML from `voice_url`. 38 **VoiceFallbackMethod** | **string** | The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`. 39 **StatusCallbackUrl** | **string** | The URL that we should call to pass status parameters (such as call ended) to your application. 40 **StatusCallbackMethod** | **string** | The HTTP method we should use to call `status_callback_url`. Can be: `GET` or `POST`. 41 **CnamLookupEnabled** | **bool** | Whether Caller ID Name (CNAM) lookup is enabled for the trunk. If enabled, all inbound calls to the BYOC 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. 42 **ConnectionPolicySid** | **string** | The SID of the Connection Policy that Twilio will use when routing traffic to your communications infrastructure. 43 **FromDomainSid** | **string** | The SID of the SIP Domain that should be used in the `From` header of originating calls sent to your SIP infrastructure. If your SIP infrastructure allows users to \\\"call back\\\" an incoming call, configure this with a [SIP Domain](https://www.twilio.com/docs/voice/api/sending-sip) to ensure proper routing. If not configured, the from domain will default to \\\"sip.twilio.com\\\". 44 45 ### Return type 46 47 [**VoiceV1ByocTrunk**](VoiceV1ByocTrunk.md) 48 49 ### Authorization 50 51 [accountSid_authToken](../README.md#accountSid_authToken) 52 53 ### HTTP request headers 54 55 - **Content-Type**: application/x-www-form-urlencoded 56 - **Accept**: application/json 57 58 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 59 [[Back to Model list]](../README.md#documentation-for-models) 60 [[Back to README]](../README.md) 61 62 63 ## DeleteByocTrunk 64 65 > DeleteByocTrunk(ctx, Sid) 66 67 68 69 70 71 ### Path Parameters 72 73 74 Name | Type | Description 75 ------------- | ------------- | ------------- 76 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 77 **Sid** | **string** | The Twilio-provided string that uniquely identifies the BYOC Trunk resource to delete. 78 79 ### Other Parameters 80 81 Other parameters are passed through a pointer to a DeleteByocTrunkParams struct 82 83 84 Name | Type | Description 85 ------------- | ------------- | ------------- 86 87 ### Return type 88 89 (empty response body) 90 91 ### Authorization 92 93 [accountSid_authToken](../README.md#accountSid_authToken) 94 95 ### HTTP request headers 96 97 - **Content-Type**: Not defined 98 - **Accept**: Not defined 99 100 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 101 [[Back to Model list]](../README.md#documentation-for-models) 102 [[Back to README]](../README.md) 103 104 105 ## FetchByocTrunk 106 107 > VoiceV1ByocTrunk FetchByocTrunk(ctx, Sid) 108 109 110 111 112 113 ### Path Parameters 114 115 116 Name | Type | Description 117 ------------- | ------------- | ------------- 118 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 119 **Sid** | **string** | The Twilio-provided string that uniquely identifies the BYOC Trunk resource to fetch. 120 121 ### Other Parameters 122 123 Other parameters are passed through a pointer to a FetchByocTrunkParams struct 124 125 126 Name | Type | Description 127 ------------- | ------------- | ------------- 128 129 ### Return type 130 131 [**VoiceV1ByocTrunk**](VoiceV1ByocTrunk.md) 132 133 ### Authorization 134 135 [accountSid_authToken](../README.md#accountSid_authToken) 136 137 ### HTTP request headers 138 139 - **Content-Type**: Not defined 140 - **Accept**: application/json 141 142 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 143 [[Back to Model list]](../README.md#documentation-for-models) 144 [[Back to README]](../README.md) 145 146 147 ## ListByocTrunk 148 149 > []VoiceV1ByocTrunk ListByocTrunk(ctx, optional) 150 151 152 153 154 155 ### Path Parameters 156 157 This endpoint does not need any path parameter. 158 159 ### Other Parameters 160 161 Other parameters are passed through a pointer to a ListByocTrunkParams struct 162 163 164 Name | Type | Description 165 ------------- | ------------- | ------------- 166 **PageSize** | **int** | How many resources to return in each list page. The default is 50, and the maximum is 1000. 167 **Limit** | **int** | Max number of records to return. 168 169 ### Return type 170 171 [**[]VoiceV1ByocTrunk**](VoiceV1ByocTrunk.md) 172 173 ### Authorization 174 175 [accountSid_authToken](../README.md#accountSid_authToken) 176 177 ### HTTP request headers 178 179 - **Content-Type**: Not defined 180 - **Accept**: application/json 181 182 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 183 [[Back to Model list]](../README.md#documentation-for-models) 184 [[Back to README]](../README.md) 185 186 187 ## UpdateByocTrunk 188 189 > VoiceV1ByocTrunk UpdateByocTrunk(ctx, Sidoptional) 190 191 192 193 194 195 ### Path Parameters 196 197 198 Name | Type | Description 199 ------------- | ------------- | ------------- 200 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 201 **Sid** | **string** | The Twilio-provided string that uniquely identifies the BYOC Trunk resource to update. 202 203 ### Other Parameters 204 205 Other parameters are passed through a pointer to a UpdateByocTrunkParams struct 206 207 208 Name | Type | Description 209 ------------- | ------------- | ------------- 210 **FriendlyName** | **string** | A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. 211 **VoiceUrl** | **string** | The URL we should call when the BYOC Trunk receives a call. 212 **VoiceMethod** | **string** | The HTTP method we should use to call `voice_url` 213 **VoiceFallbackUrl** | **string** | The URL that we should call when an error occurs while retrieving or executing the TwiML requested by `voice_url`. 214 **VoiceFallbackMethod** | **string** | The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`. 215 **StatusCallbackUrl** | **string** | The URL that we should call to pass status parameters (such as call ended) to your application. 216 **StatusCallbackMethod** | **string** | The HTTP method we should use to call `status_callback_url`. Can be: `GET` or `POST`. 217 **CnamLookupEnabled** | **bool** | Whether Caller ID Name (CNAM) lookup is enabled for the trunk. If enabled, all inbound calls to the BYOC 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. 218 **ConnectionPolicySid** | **string** | The SID of the Connection Policy that Twilio will use when routing traffic to your communications infrastructure. 219 **FromDomainSid** | **string** | The SID of the SIP Domain that should be used in the `From` header of originating calls sent to your SIP infrastructure. If your SIP infrastructure allows users to \\\"call back\\\" an incoming call, configure this with a [SIP Domain](https://www.twilio.com/docs/voice/api/sending-sip) to ensure proper routing. If not configured, the from domain will default to \\\"sip.twilio.com\\\". 220 221 ### Return type 222 223 [**VoiceV1ByocTrunk**](VoiceV1ByocTrunk.md) 224 225 ### Authorization 226 227 [accountSid_authToken](../README.md#accountSid_authToken) 228 229 ### HTTP request headers 230 231 - **Content-Type**: application/x-www-form-urlencoded 232 - **Accept**: application/json 233 234 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 235 [[Back to Model list]](../README.md#documentation-for-models) 236 [[Back to README]](../README.md) 237