Module: OverSIP::SIP::RFC3263

Defined in:
lib/oversip/sip/rfc3263.rb

Defined Under Namespace

Classes: MultiTargets, Query, SrvRandomizedTargets, SrvTargets, SrvWeightTarget, Target

Constant Summary collapse

UDP =

Some constans for efficience.

"udp"
TCP =
"tcp"
TLS =
"tls"
SIP =
" sip"
SIPS =
"sips"
SIP_D2U =
"SIP+D2U"
SIP_D2T =
"SIP+D2T"
SIPS_D2T =
"SIPS+D2T"
TRANSPORT_TO_SERVICE =
{ :tls=>SIPS_D2T, :tcp=>SIP_D2T, :udp=>SIP_D2U }

Class Method Summary collapse

Class Method Details

.module_initObject



96
97
98
99
100
101
# File 'lib/oversip/sip/rfc3263.rb', line 96

def self.module_init
  nameservers = ::OverSIP.configuration[:core][:nameservers]
  ::EM::Udns.nameservers = nameservers  if nameservers
  @@resolver = ::EM::Udns::Resolver.new
  ::OverSIP::SIP::RFC3263::Query.class_init
end

.resolverObject



109
110
111
# File 'lib/oversip/sip/rfc3263.rb', line 109

def self.resolver
  @@resolver
end

.runObject



104
105
106
# File 'lib/oversip/sip/rfc3263.rb', line 104

def self.run
  ::EM::Udns.run @@resolver
end