Class OverSIP::SIP::Connection
An OverSIP::SIP::Connection instance involves a TCP/TLS connection initiated by a SIP client against OverSIP or a TCP/TLS connection initiated by OverSIP against a remote SIP peer.
Class instance methods
close
Closes the connection.
Example
connection.close
open?
Returns true if the connection is still open, false otherwise.
remote_ip_type
Gets the remote IP type (:ipv4 or :ipv6 Symbols) of the connection.
Example
connection.remote_ip_type
#=> :ipv4
remote_ip
Gets the remote IP (String) of the connection.
Example
connection.remote_ip
#=> "1.2.3.4"
remote_port
Gets the remote port (Fixnum) of the connection.
Example
connection.remote_port
#=> 25681
transport
Gets the SIP transport (:tcp or :tls Symbols) of the connection.
Example
connection.transport
#=> :tcp
cvars
Connection variables. A Hash for storing custom key / values associated to this connection that can be later retrieved from SIP requests arriving through this TCP/TLS connection via the cvars instance method of the OverSIP::SIP::Request class.
Example
connection.cvars[:user_id] = "alice"
connection.cvars
#=> {:user_id => "alice"}