lib/twilio-ruby/rest/trunking/v1/trunk.rb in twilio-ruby-5.40.0 vs lib/twilio-ruby/rest/trunking/v1/trunk.rb in twilio-ruby-5.40.1

- old
+ new

@@ -46,10 +46,14 @@ # will be recorded. The only way to change recording parameters is on a # sub-resource of a Trunk after it has been created. # e.g.`/Trunks/[Trunk_SID]/Recording -XPOST -d'Mode=record-from-answer'`. See # [Recording](https://www.twilio.com/docs/sip-trunking#recording) for more # information. + # @param [trunk.TransferSetting] transfer_mode The call transfer settings for the + # trunk. Can be: `enable-all`, `sip-only` and `disable-all`. See + # [Transfer](https://www.twilio.com/docs/sip-trunking/call-transfer) for more + # information. # @param [Boolean] secure 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. @@ -57,17 +61,18 @@ # 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. # @return [TrunkInstance] Created TrunkInstance - def create(friendly_name: :unset, domain_name: :unset, disaster_recovery_url: :unset, disaster_recovery_method: :unset, recording: :unset, secure: :unset, cnam_lookup_enabled: :unset) + def create(friendly_name: :unset, domain_name: :unset, disaster_recovery_url: :unset, disaster_recovery_method: :unset, recording: :unset, transfer_mode: :unset, secure: :unset, cnam_lookup_enabled: :unset) data = Twilio::Values.of({ 'FriendlyName' => friendly_name, 'DomainName' => domain_name, 'DisasterRecoveryUrl' => disaster_recovery_url, 'DisasterRecoveryMethod' => disaster_recovery_method, 'Recording' => recording, + 'TransferMode' => transfer_mode, 'Secure' => secure, 'CnamLookupEnabled' => cnam_lookup_enabled, }) payload = @version.create('POST', @uri, data: data) @@ -249,10 +254,14 @@ # Can be: `do-not-record`, `record-from-ringing`, `record-from-answer`. If set to # `record-from-ringing` or `record-from-answer`, all calls going through the trunk # will be recorded. See # [Recording](https://www.twilio.com/docs/sip-trunking#recording) for more # information. + # @param [trunk.TransferSetting] transfer_mode The call transfer settings for the + # trunk. Can be: `enable-all`, `sip-only` and `disable-all`. See + # [Transfer](https://www.twilio.com/docs/sip-trunking/call-transfer) for more + # information. # @param [Boolean] secure 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. @@ -260,17 +269,18 @@ # 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. # @return [TrunkInstance] Updated TrunkInstance - def update(friendly_name: :unset, domain_name: :unset, disaster_recovery_url: :unset, disaster_recovery_method: :unset, recording: :unset, secure: :unset, cnam_lookup_enabled: :unset) + def update(friendly_name: :unset, domain_name: :unset, disaster_recovery_url: :unset, disaster_recovery_method: :unset, recording: :unset, transfer_mode: :unset, secure: :unset, cnam_lookup_enabled: :unset) data = Twilio::Values.of({ 'FriendlyName' => friendly_name, 'DomainName' => domain_name, 'DisasterRecoveryUrl' => disaster_recovery_url, 'DisasterRecoveryMethod' => disaster_recovery_method, 'Recording' => recording, + 'TransferMode' => transfer_mode, 'Secure' => secure, 'CnamLookupEnabled' => cnam_lookup_enabled, }) payload = @version.update('POST', @uri, data: data) @@ -383,10 +393,11 @@ 'disaster_recovery_method' => payload['disaster_recovery_method'], 'disaster_recovery_url' => payload['disaster_recovery_url'], 'friendly_name' => payload['friendly_name'], 'secure' => payload['secure'], 'recording' => payload['recording'], + 'transfer_mode' => payload['transfer_mode'], 'cnam_lookup_enabled' => payload['cnam_lookup_enabled'], 'auth_type' => payload['auth_type'], 'auth_type_set' => payload['auth_type_set'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), @@ -452,10 +463,16 @@ def recording @properties['recording'] end ## + # @return [trunk.TransferSetting] The call transfer settings for the trunk + def transfer_mode + @properties['transfer_mode'] + end + + ## # @return [Boolean] Whether Caller ID Name (CNAM) lookup is enabled for the trunk def cnam_lookup_enabled @properties['cnam_lookup_enabled'] end @@ -536,10 +553,14 @@ # Can be: `do-not-record`, `record-from-ringing`, `record-from-answer`. If set to # `record-from-ringing` or `record-from-answer`, all calls going through the trunk # will be recorded. See # [Recording](https://www.twilio.com/docs/sip-trunking#recording) for more # information. + # @param [trunk.TransferSetting] transfer_mode The call transfer settings for the + # trunk. Can be: `enable-all`, `sip-only` and `disable-all`. See + # [Transfer](https://www.twilio.com/docs/sip-trunking/call-transfer) for more + # information. # @param [Boolean] secure 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. @@ -547,16 +568,17 @@ # 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. # @return [TrunkInstance] Updated TrunkInstance - def update(friendly_name: :unset, domain_name: :unset, disaster_recovery_url: :unset, disaster_recovery_method: :unset, recording: :unset, secure: :unset, cnam_lookup_enabled: :unset) + def update(friendly_name: :unset, domain_name: :unset, disaster_recovery_url: :unset, disaster_recovery_method: :unset, recording: :unset, transfer_mode: :unset, secure: :unset, cnam_lookup_enabled: :unset) context.update( friendly_name: friendly_name, domain_name: domain_name, disaster_recovery_url: disaster_recovery_url, disaster_recovery_method: disaster_recovery_method, recording: recording, + transfer_mode: transfer_mode, secure: secure, cnam_lookup_enabled: cnam_lookup_enabled, ) end \ No newline at end of file