Module: Opensips::MI

Defined in:
lib/opensips/mi.rb,
lib/opensips/mi/command.rb,
lib/opensips/mi/version.rb,
lib/opensips/mi/transport.rb,
lib/opensips/mi/transport/fifo.rb,
lib/opensips/mi/transport/http.rb,
lib/opensips/mi/transport/xmlrpc.rb,
lib/opensips/mi/transport/abstract.rb,
lib/opensips/mi/transport/datagram.rb

Overview

OpenSIPS Managemen Interface core module

Defined Under Namespace

Modules: Transport Classes: Command, Error, ErrorHTTPReq, ErrorParams, ErrorResolveTimeout, ErrorSendTimeout

Constant Summary collapse

VERSION =
"1.1.1"

Class Method Summary collapse

Class Method Details

.connect(transport_proto, params = {}) ⇒ Object



16
17
18
19
20
21
22
23
24
25
26
# File 'lib/opensips/mi.rb', line 16

def self.connect(transport_proto, params = {})
  transp = case transport_proto
           when :datagram then Transport::Datagram.new(params)
           when :fifo then Transport::Fifo.new(params)
           when :http then Transport::HTTP.new(params)
           when :xmlrpc then Transport::Xmlrpc.new(params)
           else
             raise Error, "Unknown transport method: #{transport_proto}"
           end
  Command.new(transp)
end