def receive_answer(opts = {})
      options = {
        rrs: true, # Record Record Set: Make the Route headers available via [routes] later
        rtd: true # Response Time Duration: Record the response time
      }

      receive_200(options.merge(opts)) do |recv|
        recv << doc.create_element('action') do |action|
          action << doc.create_element('ereg') do |ereg|
            ereg['regexp'] = '<sip:(.*)>.*;tag=([^;]*)'
            ereg['search_in'] = 'hdr'
            ereg['header'] = 'To:'
            ereg['assign_to'] = 'dummy,remote_addr,remote_tag'
          end
        end
      end
      # These variables will only be used if we initiate a hangup
      @reference_variables += %w(dummy remote_addr remote_tag)
    end
def receive_answer(opts = {})
      options = {
        rrs: true, # Record Record Set: Make the Route headers available via [routes] later
        rtd: true # Response Time Duration: Record the response time
      }

      receive_200(options.merge(opts)) do |recv|
        recv << doc.create_element('action') do |action|
          action << doc.create_element('ereg') do |ereg|
            ereg['regexp'] = '<sip:(.*)>.*;tag=([^;]*)'
            ereg['search_in'] = 'hdr'
            ereg['header'] = 'To:'
            ereg['assign_to'] = 'dummy,remote_addr,remote_tag'
          end
        end
      end
      # These variables will only be used if we initiate a hangup
      @reference_variables += %w(dummy remote_addr remote_tag)
    end
Sets an expectation for a SIP 200 message from the remote party
 as well as storing the record set and the response time duration

 @param [Hash] opts A set of options to modify the expectation
 @option opts [true, false] :optional Whether or not receipt of the message is optional. Defaults to false.