Class OverSIP::SIP::Response

An instance of the OverSIP::SIP::Response class contains a parsed SIP response.

Parent class

OverSIP::SIP::Response inherits all the methods of OverSIP::SIP::Message.

Class instance methods

status_code

Gets the status code (Fixnum) of the response.

Example

response.status_code
#=> 200

reason_phrase

Gets the reason phrase (String) of the response.

Example

response.reason_phrase
#=> "OK"

request

The OverSIP::SIP::Request instance this received response is associated to.

tvars

Transaction variables. A Hash for storing custom key / values associated to the client transaction initiated by OverSIP when forwarding the SIP request this response is associated to.

Example

request.tvars[:time] = Time.now

proxy = ::OverSIP::SIP::Proxy.new

proxy.on_success_response do |response|
  log_info "2XX response for a request sent at #{response.tvars[:time]}"
end

proxy.route request