lib/tropo-webapi-ruby/tropo-webapi-ruby.rb
def transfer(params={}, &block)
      if block_given?
        create_nested_hash('transfer', params)
        instance_exec(&block)
        @response[:tropo] << @nested_hash
        @nested_hash = nil
        @nested_name = nil
      else
        hash = build_action('transfer', params)
        @response[:tropo] << hash
      end
      render_response if @building.nil?
    end
##
# Transfers an already answered call to another destination / phone number. 
# Call may be transferred to another phone number or SIP address, which is set through the "to" parameter and is in URL format. 
# Supported formats include:
#  tel: classic phone number (See RFC 2896), must be proceeded by a + and the country code (ie - +14155551212 for a US #)
#  sip: SIP protocol address
#
# When this method is called the following occurs:
#  The audio file specified in playvalue is played to the existing call. This could be "hold music", a ring-back sound, etc. The audio file is played up to playrepeat times.
#  While audio is playing, a new call is initiated to the specified "to" address using the callerID specified.
#  If answerOnMedia is true, the audio from the new call is connected to the existing call immediately.
#  The system waits for an answer or other event from the new call up to the timeout.
#  If the call successfully completes within the timeout, the existing call and new call will be connected, onSuccess will be called, and the transfer call will return a success event.
#  If the call fails before the timeout, onCallFailure will be called and the method will return an onCallFailure event.
#  If the call fails due to the timeout elapsing, onTimeout will be called and the method will return a timeout event
#
# @overload transfer(params)
#   @param [Hash] params the options to create a transfer action request with
#   @option params [required, String or Array] :to the new destination for the incoming call as a URL
#   @option params [optional, String] :from set the from id for the session when redirecting
#   @option params [optional, Integer] :ringRepeat (1) This specifies the number of times the audio file specified in the ring event will repeat itself.
#   @option params [required, String] :name this is the key used to identify the result of an operation, so you can differentiate between multiple results
#   @option params [optional, Boolean] :required (true) determines whether Tropo should move on to the next verb - if true, Tropo will only move on if the current operation completed
#   @option params [optional, Float] :timeout (30) amount of time Tropo will wait--in seconds--for the other party to answer the call
#   @option params [optional, Float] :interdigitTimeout (5.0) defines how long to wait between key presses to determine the user has stopped entering input
#   @option params [optional, String or Array] :allowSignals allows you to assign a signal to record which can be used with REST to interrupt the function 
#   @option params [optional, Boolean or Hash] :machineDetection (false) determines if a call is coming from machine or human
#   @option params [optional, Object] :on adds event callback to enable "ring" event, which allows you to play an audio file or say something while the outbound call rings
#   @option params [optional, Boolean] :answerOnMedia (false) if true, the call will be concisdered answered and audio will being playing as soon as media is received (ringing, busy, etc)
#   @option params [optional, Hash] :headers A set of key/values to apply as customer SIP headers to the outgoing call
#   @option params [optional, Object] :choices when used with transfer, this defines the terminator
#   @option params [optional, Boolean] :playTones (true) Controls whether or not each party can hear the tone generated when a key on the phone is pressed by the other party.
#   @option params [optional, String] :voice (allison) Specifies the default voice to be used when speaking text back to a user.
#   @option params [optional, String] :callbackUrl Configures a URL for a webhook for CDRs to be sent at the completion of the call.
#   @option params [optional, String] :promptLogSecurity Controls whether Tropo logs the text to speech string used by the method. Possible values are "none" (the default) and "suppress", which disables output logging for this method
#   @option params [optional, String] :label Set by you, an arbitrary label for this call. The label you set will appear in your CDR, allowing you to track a CDR by a string you define
# @overload transfer(params, &block)
#   @param [Hash] params the options to create a transfer action request with
#   @param [Block] takes a block so that you may trigger actions, such as a say, on a specific event
#   @option params [required, String or Array] :to the new destination for the incoming call as a URL
#   @option params [optional, String] :from set the from id for the session when redirecting
#   @option params [optional, Integer] :ringRepeat (1) This specifies the number of times the audio file specified in the ring event will repeat itself.
#   @option params [required, String] :name this is the key used to identify the result of an operation, so you can differentiate between multiple results
#   @option params [optional, Boolean] :required (true) determines whether Tropo should move on to the next verb - if true, Tropo will only move on if the current operation completed
#   @option params [optional, Float] :timeout (30) amount of time Tropo will wait--in seconds--for the other party to answer the call
#   @option params [optional, Float] :interdigitTimeout (5.0) defines how long to wait between key presses to determine the user has stopped entering input
#   @option params [optional, String or Array] :allowSignals allows you to assign a signal to record which can be used with REST to interrupt the function 
#   @option params [optional, Boolean or Hash] :machineDetection (false) determines if a call is coming from machine or human
#   @option params [optional, Object] :on adds event callback to enable "ring" event, which allows you to play an audio file or say something while the outbound call rings
#   @option params [optional, Boolean] :answerOnMedia (false) if true, the call will be concisdered answered and audio will being playing as soon as media is received (ringing, busy, etc)
#   @option params [optional, Hash] :headers A set of key/values to apply as customer SIP headers to the outgoing call
#   @option params [optional, Object] :choices when used with transfer, this defines the terminator
#   @option params [optional, Boolean] :playTones (true) Controls whether or not each party can hear the tone generated when a key on the phone is pressed by the other party.
#   @option params [optional, String] :voice (allison) Specifies the default voice to be used when speaking text back to a user.
#   @option params [optional, String] :callbackUrl Configures a URL for a webhook for CDRs to be sent at the completion of the call.
#   @option params [optional, String] :promptLogSecurity Controls whether Tropo logs the text to speech string used by the method. Possible values are "none" (the default) and "suppress", which disables output logging for this method
#   @option params [optional, String] :label Set by you, an arbitrary label for this call. The label you set will appear in your CDR, allowing you to track a CDR by a string you define
# @return [nil, String]
Transfers an already answered call to another destination / phone number.
Call may be transferred to another phone number or SIP address, which is set through the "to" parameter and is in URL format.
Supported formats include:
tel: classic phone number (See RFC 2896), must be proceeded by a + and the country code
sip: SIP protocol address

When this method is called the following occurs:
The audio file specified in playvalue is played to the existing call. This could be "hold music", a ring-back sound, etc. The audio file is played up to playrepeat times.
While audio is playing, a new call is initiated to the specified "to" address using the callerID specified.
If answerOnMedia is true, the audio from the new call is connected to the existing call immediately.
The system waits for an answer or other event from the new call up to the timeout.
If the call successfully completes within the timeout, the existing call and new call will be connected, onSuccess will be called, and the transfer call will return a success event.
If the call fails before the timeout, onCallFailure will be called and the method will return an onCallFailure event.
If the call fails due to the timeout elapsing, onTimeout will be called and the method will return a timeout event
Transfers an already answered call to another destination / phone number . Call may be transferred to another phone number or SIP address which is set through the " to " parameter and is in URL format . Supported formats include : tel : classic phone number ( See RFC 2896 ) must be proceeded by a + and the country code sip : SIP protocol address When this method is called the following occurs : The audio file specified in playvalue is played to the existing call . This could be " hold music " a ring - back sound etc . The audio file is played up to playrepeat times . While audio is playing a new call is initiated to the specified " to " address using the callerID specified . If answerOnMedia is true the audio from the new call is connected to the existing call immediately . The system waits for an answer or other event from the new call up to the timeout . If the call successfully completes within the timeout the existing call and new call will be connected onSuccess will be called and the transfer call will return a success event . If the call fails before the timeout onCallFailure will be called and the method will return an onCallFailure event . If the call fails due to the timeout elapsing onTimeout will be called and the method will return a timeout event
def transfer(params={}, &block)
      if block_given?
        create_nested_hash('transfer', params)
        instance_exec(&block)
        @response[:tropo] << @nested_hash
        @nested_hash = nil
        @nested_name = nil
      else
        hash = build_action('transfer', params)
        @response[:tropo] << hash
      end
      render_response if @building.nil?
    end
def transfer ( params = { } , & block ) if block_given? create_nested_hash ( 'transfer' , params ) instance_exec ( & block ) @response [ :tropo ] << @nested_hash @nested_hash = nil @nested_name = nil else hash = build_action ( 'transfer' , params ) @response [ :tropo ] << hash end render_response if @building . nil? end
Transfers an already answered call to another destination / phone number.
Transfers an already answered call to another destination / phone number .
None
nil, String
params
block
overload
transfer(params) @param [Hash] params the options to create a transfer action request with @option params [required, String or Array] :to the new destination for the incoming call as a URL @option params [optional, String] :from set the from id for the session when redirecting @option params [optional, Integer] :ringRepeat (1) This specifies the number of times the audio file specified in the ring event will repeat itself. @option params [required, String] :name this is the key used to identify the result of an operation, so you can differentiate between multiple results @option params [optional, Boolean] :required (true) determines whether Tropo should move on to the next verb - if true, Tropo will only move on if the current operation completed @option params [optional, Float] :timeout (30) amount of time Tropo will wait--in seconds--for the other party to answer the call @option params [optional, Float] :interdigitTimeout (5.0) defines how long to wait between key presses to determine the user has stopped entering input @option params [optional, String or Array] :allowSignals allows you to assign a signal to record which can be used with REST to interrupt the function @option params [optional, Boolean or Hash] :machineDetection (false) determines if a call is coming from machine or human @option params [optional, Object] :on adds event callback to enable "ring" event, which allows you to play an audio file or say something while the outbound call rings @option params [optional, Boolean] :answerOnMedia (false) if true, the call will be concisdered answered and audio will being playing as soon as media is received (ringing, busy, etc) @option params [optional, Hash] :headers A set of key/values to apply as customer SIP headers to the outgoing call @option params [optional, Object] :choices when used with transfer, this defines the terminator @option params [optional, Boolean] :playTones (true) Controls whether or not each party can hear the tone generated when a key on the phone is pressed by the other party. @option params [optional, String] :voice (allison) Specifies the default voice to be used when speaking text back to a user. @option params [optional, String] :callbackUrl Configures a URL for a webhook for CDRs to be sent at the completion of the call. @option params [optional, String] :promptLogSecurity Controls whether Tropo logs the text to speech string used by the method. Possible values are "none" (the default) and "suppress", which disables output logging for this method @option params [optional, String] :label Set by you, an arbitrary label for this call. The label you set will appear in your CDR, allowing you to track a CDR by a string you define
transfer ( params ) @param [ Hash ] params the options to create a transfer action request with @option params [ required String or Array ] : to the new destination for the incoming call as a URL @option params [ optional String ] : from set the from id for the session when redirecting @option params [ optional Integer ] : ringRepeat ( 1 ) This specifies the number of times the audio file specified in the ring event will repeat itself . @option params [ required String ] : name this is the key used to identify the result of an operation so you can differentiate between multiple results @option params [ optional Boolean ] : required ( true ) determines whether Tropo should move on to the next verb - if true Tropo will only move on if the current operation completed @option params [ optional Float ] : timeout ( 30 ) amount of time Tropo will wait -- in seconds -- for the other party to answer the call @option params [ optional Float ] : interdigitTimeout ( 5 . 0 ) defines how long to wait between key presses to determine the user has stopped entering input @option params [ optional String or Array ] : allowSignals allows you to assign a signal to record which can be used with REST to interrupt the function @option params [ optional Boolean or Hash ] : machineDetection ( false ) determines if a call is coming from machine or human @option params [ optional Object ] : on adds event callback to enable " ring " event which allows you to play an audio file or say something while the outbound call rings @option params [ optional Boolean ] : answerOnMedia ( false ) if true the call will be concisdered answered and audio will being playing as soon as media is received ( ringing busy etc ) @option params [ optional Hash ] : headers A set of key / values to apply as customer SIP headers to the outgoing call @option params [ optional Object ] : choices when used with transfer this defines the terminator @option params [ optional Boolean ] : playTones ( true ) Controls whether or not each party can hear the tone generated when a key on the phone is pressed by the other party . @option params [ optional String ] : voice ( allison ) Specifies the default voice to be used when speaking text back to a user . @option params [ optional String ] : callbackUrl Configures a URL for a webhook for CDRs to be sent at the completion of the call . @option params [ optional String ] : promptLogSecurity Controls whether Tropo logs the text to speech string used by the method . Possible values are " none " ( the default ) and " suppress " which disables output logging for this method @option params [ optional String ] : label Set by you an arbitrary label for this call . The label you set will appear in your CDR allowing you to track a CDR by a string you define
overload
transfer(params, █) @param [Hash] params the options to create a transfer action request with @param [Block] takes a block so that you may trigger actions, such as a say, on a specific event @option params [required, String or Array] :to the new destination for the incoming call as a URL @option params [optional, String] :from set the from id for the session when redirecting @option params [optional, Integer] :ringRepeat (1) This specifies the number of times the audio file specified in the ring event will repeat itself. @option params [required, String] :name this is the key used to identify the result of an operation, so you can differentiate between multiple results @option params [optional, Boolean] :required (true) determines whether Tropo should move on to the next verb - if true, Tropo will only move on if the current operation completed @option params [optional, Float] :timeout (30) amount of time Tropo will wait--in seconds--for the other party to answer the call @option params [optional, Float] :interdigitTimeout (5.0) defines how long to wait between key presses to determine the user has stopped entering input @option params [optional, String or Array] :allowSignals allows you to assign a signal to record which can be used with REST to interrupt the function @option params [optional, Boolean or Hash] :machineDetection (false) determines if a call is coming from machine or human @option params [optional, Object] :on adds event callback to enable "ring" event, which allows you to play an audio file or say something while the outbound call rings @option params [optional, Boolean] :answerOnMedia (false) if true, the call will be concisdered answered and audio will being playing as soon as media is received (ringing, busy, etc) @option params [optional, Hash] :headers A set of key/values to apply as customer SIP headers to the outgoing call @option params [optional, Object] :choices when used with transfer, this defines the terminator @option params [optional, Boolean] :playTones (true) Controls whether or not each party can hear the tone generated when a key on the phone is pressed by the other party. @option params [optional, String] :voice (allison) Specifies the default voice to be used when speaking text back to a user. @option params [optional, String] :callbackUrl Configures a URL for a webhook for CDRs to be sent at the completion of the call. @option params [optional, String] :promptLogSecurity Controls whether Tropo logs the text to speech string used by the method. Possible values are "none" (the default) and "suppress", which disables output logging for this method @option params [optional, String] :label Set by you, an arbitrary label for this call. The label you set will appear in your CDR, allowing you to track a CDR by a string you define
transfer ( params █ ) @param [ Hash ] params the options to create a transfer action request with @param [ Block ] takes a block so that you may trigger actions such as a say on a specific event @option params [ required String or Array ] : to the new destination for the incoming call as a URL @option params [ optional String ] : from set the from id for the session when redirecting @option params [ optional Integer ] : ringRepeat ( 1 ) This specifies the number of times the audio file specified in the ring event will repeat itself . @option params [ required String ] : name this is the key used to identify the result of an operation so you can differentiate between multiple results @option params [ optional Boolean ] : required ( true ) determines whether Tropo should move on to the next verb - if true Tropo will only move on if the current operation completed @option params [ optional Float ] : timeout ( 30 ) amount of time Tropo will wait -- in seconds -- for the other party to answer the call @option params [ optional Float ] : interdigitTimeout ( 5 . 0 ) defines how long to wait between key presses to determine the user has stopped entering input @option params [ optional String or Array ] : allowSignals allows you to assign a signal to record which can be used with REST to interrupt the function @option params [ optional Boolean or Hash ] : machineDetection ( false ) determines if a call is coming from machine or human @option params [ optional Object ] : on adds event callback to enable " ring " event which allows you to play an audio file or say something while the outbound call rings @option params [ optional Boolean ] : answerOnMedia ( false ) if true the call will be concisdered answered and audio will being playing as soon as media is received ( ringing busy etc ) @option params [ optional Hash ] : headers A set of key / values to apply as customer SIP headers to the outgoing call @option params [ optional Object ] : choices when used with transfer this defines the terminator @option params [ optional Boolean ] : playTones ( true ) Controls whether or not each party can hear the tone generated when a key on the phone is pressed by the other party . @option params [ optional String ] : voice ( allison ) Specifies the default voice to be used when speaking text back to a user . @option params [ optional String ] : callbackUrl Configures a URL for a webhook for CDRs to be sent at the completion of the call . @option params [ optional String ] : promptLogSecurity Controls whether Tropo logs the text to speech string used by the method . Possible values are " none " ( the default ) and " suppress " which disables output logging for this method @option params [ optional String ] : label Set by you an arbitrary label for this call . The label you set will appear in your CDR allowing you to track a CDR by a string you define