lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb in twilio-ruby-5.34.0 vs lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb in twilio-ruby-5.34.1
- old
+ new
@@ -134,12 +134,17 @@
# for the domain. If enabled, allows emergency calls on the domain from phone
# numbers with validated addresses.
# @param [Boolean] secure Whether secure SIP is enabled for the domain. If
# enabled, TLS will be enforced and SRTP will be negotiated on all incoming calls
# to this sip domain.
+ # @param [String] byoc_trunk_sid The SID of the BYOC Trunk(Bring Your Own Carrier)
+ # resource that the Sip Domain will be associated with.
+ # @param [String] emergency_caller_sid Whether an emergency caller sid is
+ # configured for the domain. If present, this phone number will be used as the
+ # callback for the emergency call.
# @return [DomainInstance] Newly created DomainInstance
- def create(domain_name: nil, friendly_name: :unset, voice_url: :unset, voice_method: :unset, voice_fallback_url: :unset, voice_fallback_method: :unset, voice_status_callback_url: :unset, voice_status_callback_method: :unset, sip_registration: :unset, emergency_calling_enabled: :unset, secure: :unset)
+ def create(domain_name: nil, friendly_name: :unset, voice_url: :unset, voice_method: :unset, voice_fallback_url: :unset, voice_fallback_method: :unset, voice_status_callback_url: :unset, voice_status_callback_method: :unset, sip_registration: :unset, emergency_calling_enabled: :unset, secure: :unset, byoc_trunk_sid: :unset, emergency_caller_sid: :unset)
data = Twilio::Values.of({
'DomainName' => domain_name,
'FriendlyName' => friendly_name,
'VoiceUrl' => voice_url,
'VoiceMethod' => voice_method,
@@ -148,10 +153,12 @@
'VoiceStatusCallbackUrl' => voice_status_callback_url,
'VoiceStatusCallbackMethod' => voice_status_callback_method,
'SipRegistration' => sip_registration,
'EmergencyCallingEnabled' => emergency_calling_enabled,
'Secure' => secure,
+ 'ByocTrunkSid' => byoc_trunk_sid,
+ 'EmergencyCallerSid' => emergency_caller_sid,
})
payload = @version.create(
'POST',
@uri,
@@ -259,12 +266,17 @@
# for the domain. If enabled, allows emergency calls on the domain from phone
# numbers with validated addresses.
# @param [Boolean] secure Whether secure SIP is enabled for the domain. If
# enabled, TLS will be enforced and SRTP will be negotiated on all incoming calls
# to this sip domain.
+ # @param [String] byoc_trunk_sid The SID of the BYOC Trunk(Bring Your Own Carrier)
+ # resource that the Sip Domain will be associated with.
+ # @param [String] emergency_caller_sid Whether an emergency caller sid is
+ # configured for the domain. If present, this phone number will be used as the
+ # callback for the emergency call.
# @return [DomainInstance] Updated DomainInstance
- def update(friendly_name: :unset, voice_fallback_method: :unset, voice_fallback_url: :unset, voice_method: :unset, voice_status_callback_method: :unset, voice_status_callback_url: :unset, voice_url: :unset, sip_registration: :unset, domain_name: :unset, emergency_calling_enabled: :unset, secure: :unset)
+ def update(friendly_name: :unset, voice_fallback_method: :unset, voice_fallback_url: :unset, voice_method: :unset, voice_status_callback_method: :unset, voice_status_callback_url: :unset, voice_url: :unset, sip_registration: :unset, domain_name: :unset, emergency_calling_enabled: :unset, secure: :unset, byoc_trunk_sid: :unset, emergency_caller_sid: :unset)
data = Twilio::Values.of({
'FriendlyName' => friendly_name,
'VoiceFallbackMethod' => voice_fallback_method,
'VoiceFallbackUrl' => voice_fallback_url,
'VoiceMethod' => voice_method,
@@ -273,10 +285,12 @@
'VoiceUrl' => voice_url,
'SipRegistration' => sip_registration,
'DomainName' => domain_name,
'EmergencyCallingEnabled' => emergency_calling_enabled,
'Secure' => secure,
+ 'ByocTrunkSid' => byoc_trunk_sid,
+ 'EmergencyCallerSid' => emergency_caller_sid,
})
payload = @version.update(
'POST',
@uri,
@@ -405,10 +419,12 @@
'voice_url' => payload['voice_url'],
'subresource_uris' => payload['subresource_uris'],
'sip_registration' => payload['sip_registration'],
'emergency_calling_enabled' => payload['emergency_calling_enabled'],
'secure' => payload['secure'],
+ 'byoc_trunk_sid' => payload['byoc_trunk_sid'],
+ 'emergency_caller_sid' => payload['emergency_caller_sid'],
}
# Context
@instance_context = nil
@params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid'], }
@@ -538,10 +554,22 @@
def secure
@properties['secure']
end
##
+ # @return [String] The SID of the BYOC Trunk resource.
+ def byoc_trunk_sid
+ @properties['byoc_trunk_sid']
+ end
+
+ ##
+ # @return [String] Whether an emergency caller sid is configured for the domain.
+ def emergency_caller_sid
+ @properties['emergency_caller_sid']
+ end
+
+ ##
# Fetch a DomainInstance
# @return [DomainInstance] Fetched DomainInstance
def fetch
context.fetch
end
@@ -570,12 +598,17 @@
# for the domain. If enabled, allows emergency calls on the domain from phone
# numbers with validated addresses.
# @param [Boolean] secure Whether secure SIP is enabled for the domain. If
# enabled, TLS will be enforced and SRTP will be negotiated on all incoming calls
# to this sip domain.
+ # @param [String] byoc_trunk_sid The SID of the BYOC Trunk(Bring Your Own Carrier)
+ # resource that the Sip Domain will be associated with.
+ # @param [String] emergency_caller_sid Whether an emergency caller sid is
+ # configured for the domain. If present, this phone number will be used as the
+ # callback for the emergency call.
# @return [DomainInstance] Updated DomainInstance
- def update(friendly_name: :unset, voice_fallback_method: :unset, voice_fallback_url: :unset, voice_method: :unset, voice_status_callback_method: :unset, voice_status_callback_url: :unset, voice_url: :unset, sip_registration: :unset, domain_name: :unset, emergency_calling_enabled: :unset, secure: :unset)
+ def update(friendly_name: :unset, voice_fallback_method: :unset, voice_fallback_url: :unset, voice_method: :unset, voice_status_callback_method: :unset, voice_status_callback_url: :unset, voice_url: :unset, sip_registration: :unset, domain_name: :unset, emergency_calling_enabled: :unset, secure: :unset, byoc_trunk_sid: :unset, emergency_caller_sid: :unset)
context.update(
friendly_name: friendly_name,
voice_fallback_method: voice_fallback_method,
voice_fallback_url: voice_fallback_url,
voice_method: voice_method,
@@ -584,9 +617,11 @@
voice_url: voice_url,
sip_registration: sip_registration,
domain_name: domain_name,
emergency_calling_enabled: emergency_calling_enabled,
secure: secure,
+ byoc_trunk_sid: byoc_trunk_sid,
+ emergency_caller_sid: emergency_caller_sid,
)
end
##
# Deletes the DomainInstance
\ No newline at end of file