oversip 1.1.0.beta2 → 1.1.0.beta3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/bin/oversip CHANGED
@@ -5,6 +5,8 @@ unless RUBY_VERSION >= "1.9.2"
5
5
  raise ::LoadError, "OverSIP requires Ruby version >= 1.9.2 (current version is #{RUBY_VERSION})"
6
6
  end
7
7
 
8
+ $LOAD_PATH.insert 0, File.expand_path(File.join(File.dirname(__FILE__), "../", "lib"))
9
+
8
10
  # When OverSIP is executed automaticaly via the system init (i.e. after booting the host)
9
11
  # the Encoding.default_external is US_ASCII which causes fails when reading daat from
10
12
  # some files (i.e. the cacert.pem file which contains no valid US_ASCII symbols). So
@@ -23,12 +25,13 @@ require "oversip"
23
25
  module OverSIP
24
26
 
25
27
  class Executable
28
+ extend ::OverSIP::Logger
26
29
 
27
30
  @log_id = "executable"
28
31
 
29
32
  def self.run
33
+ $0 = ::File.basename(__FILE__)
30
34
  ::OverSIP::Logger.load_methods
31
- extend ::OverSIP::Logger
32
35
 
33
36
  # Options by default.
34
37
  options = {
@@ -48,6 +51,8 @@ module OverSIP
48
51
 
49
52
  opts.on("-p", "--process-name NAME", "Change the running process name, also affects to syslogger process and Posix Message Queue name (default 'oversip')") do |value|
50
53
  options[:process_name] = value
54
+ $0 = options[:process_name]
55
+ ::OverSIP::Logger.load_methods
51
56
  end
52
57
 
53
58
  opts.on("--config-dir DIR", "Absolute path to the directory with user configuration files (default '/etc/oversip/')") do |value|
@@ -166,13 +171,11 @@ module OverSIP
166
171
 
167
172
  # Set the command name (as it appears in "ps" output) to given --process_name option (-p)
168
173
  # or to the script filename otherwise.
169
- $0 = options[:process_name] || ::File.basename(__FILE__)
170
-
171
- ::OverSIP.master_name = $0
174
+ ::OverSIP.master_name = options[:process_name] || ::File.basename(__FILE__)
175
+ $0 = ::OverSIP.master_name
172
176
  log_system_info "master process name: #{::OverSIP.master_name}"
173
177
 
174
178
  ::OverSIP::Config.load options[:config_dir], options[:config_file]
175
- log_system_info "applied configuration:"
176
179
  ::OverSIP::Config.print options[:colorize]
177
180
 
178
181
  log_system_info "creating Posix Message Queue for communicating master and syslogger processes"
data/etc/oversip.conf CHANGED
@@ -22,9 +22,9 @@ core:
22
22
  nameservers: null
23
23
 
24
24
  # Syslog facility. Can be "user", "local0"..."local7".
25
- # By default "user".
25
+ # By default "daemon".
26
26
  #
27
- syslog_facility: user
27
+ syslog_facility: daemon
28
28
 
29
29
  # Syslog level. Can be "debug", "info", "notice", "warn", "error", "crit".
30
30
  # By default "info".
data/etc/server.rb CHANGED
@@ -31,213 +31,208 @@ end
31
31
 
32
32
 
33
33
 
34
- ### OverSIP Events:
34
+ ### OverSIP System Events:
35
35
 
36
36
 
37
- module OverSIP
38
-
39
- ### System Events:
40
-
41
-
42
- # This method is called once the OverSIP reactor has been started.
43
- #
44
- # def SystemEvents.on_started
45
- # [...]
46
- # end
37
+ # This method is called once the OverSIP reactor has been started.
38
+ #
39
+ # def (OverSIP::SystemEvents).on_started
40
+ # [...]
41
+ # end
47
42
 
48
43
 
49
- # This method is called when a USR1 signal is received by OverSIP main
50
- # process and allows the user to set custom code to be executed
51
- # or reloaded.
52
- #
53
- # def SystemEvents.on_user_reload
54
- # [...]
55
- # end
44
+ # This method is called when a USR1 signal is received by OverSIP main
45
+ # process and allows the user to set custom code to be executed
46
+ # or reloaded.
47
+ #
48
+ # def (OverSIP::SystemEvents).on_user_reload
49
+ # [...]
50
+ # end
56
51
 
57
52
 
58
53
 
59
54
 
60
- ### SIP Events:
55
+ ### OverSIP SIP Events:
61
56
 
62
57
 
63
- # This method is called when a SIP request is received.
64
- #
65
- def SipEvents.on_request request
58
+ # This method is called when a SIP request is received.
59
+ #
60
+ def (OverSIP::SipEvents).on_request request
66
61
 
67
- log_info "#{request.sip_method} from #{request.from.uri} (UA: #{request.header("User-Agent")}) to #{request.ruri} via #{request.transport.upcase} #{request.source_ip} : #{request.source_port}"
62
+ log_info "#{request.sip_method} from #{request.from.uri} (UA: #{request.header("User-Agent")}) to #{request.ruri} via #{request.transport.upcase} #{request.source_ip} : #{request.source_port}"
68
63
 
69
- # Check Max-Forwards value (max 10).
70
- return unless request.check_max_forwards 10
64
+ # Check Max-Forwards value (max 10).
65
+ return unless request.check_max_forwards 10
71
66
 
72
- # Assume all the traffic is from clients and help them with NAT issues
73
- # by forcing rport usage and Outbound mechanism.
74
- request.fix_nat
67
+ # Assume all the traffic is from clients and help them with NAT issues
68
+ # by forcing rport usage and Outbound mechanism.
69
+ request.fix_nat
75
70
 
76
- # In-dialog requests.
77
- if request.in_dialog?
78
- if request.loose_route
79
- log_debug "proxying in-dialog #{request.sip_method}"
80
- request.proxy(:proxy_in_dialog).route
81
- else
82
- unless request.sip_method == :ACK
83
- log_notice "forbidden in-dialog request without top Route pointing to us => 403"
84
- request.reply 403, "forbidden in-dialog request without top Route pointing to us"
85
- else
86
- log_notice "ignoring not loose routing ACK"
87
- end
88
- end
89
- return
90
- end
91
-
92
- # Initial requests.
93
-
94
- # Check that the request does not contain a top Route pointing to another server.
71
+ # In-dialog requests.
72
+ if request.in_dialog?
95
73
  if request.loose_route
74
+ log_debug "proxying in-dialog #{request.sip_method}"
75
+ proxy = ::OverSIP::SIP::Proxy.new :proxy_in_dialog
76
+ proxy.route request
77
+ else
96
78
  unless request.sip_method == :ACK
97
- log_notice "pre-loaded Route not allowed here => 403"
98
- request.reply 403, "Pre-loaded Route not allowed"
79
+ log_notice "forbidden in-dialog request without top Route pointing to us => 403"
80
+ request.reply 403, "forbidden in-dialog request without top Route pointing to us"
99
81
  else
100
- log_notice "ignoring ACK initial request"
82
+ log_notice "ignoring not loose routing ACK"
101
83
  end
102
- return
103
84
  end
85
+ return
86
+ end
104
87
 
105
- if MyExampleApp::SIP_USE_MODULE_REGISTRAR_WITHOUT_PATH
106
- # Extract the Outbound flow token from the RURI.
107
- OverSIP::SIP::Modules::RegistrarWithoutPath.extract_outbound_from_ruri request
108
- end
88
+ # Initial requests.
109
89
 
110
- # The request goes to a client using Outbound through OverSIP.
111
- if request.incoming_outbound_requested?
112
- log_info "routing initial request to an Outbound client"
90
+ # Check that the request does not contain a top Route pointing to another server.
91
+ if request.loose_route
92
+ unless request.sip_method == :ACK
93
+ log_notice "pre-loaded Route not allowed here => 403"
94
+ request.reply 403, "Pre-loaded Route not allowed"
95
+ else
96
+ log_notice "ignoring ACK initial request"
97
+ end
98
+ return
99
+ end
113
100
 
114
- proxy = request.proxy(:proxy_to_users)
101
+ if MyExampleApp::SIP_USE_MODULE_REGISTRAR_WITHOUT_PATH
102
+ # Extract the Outbound flow token from the RURI.
103
+ OverSIP::SIP::Modules::RegistrarWithoutPath.extract_outbound_from_ruri request
104
+ end
115
105
 
116
- proxy.on_success_response do |response|
117
- log_info "incoming Outbound on_success_response: #{response.status_code} '#{response.reason_phrase}'"
118
- end
106
+ # The request goes to a client using Outbound through OverSIP.
107
+ if request.incoming_outbound_requested?
108
+ log_info "routing initial request to an Outbound client"
119
109
 
120
- proxy.on_failure_response do |response|
121
- log_info "incoming Outbound on_failure_response: #{response.status_code} '#{response.reason_phrase}'"
122
- end
110
+ proxy = ::OverSIP::SIP::Proxy.new :proxy_to_users
123
111
 
124
- # on_error() occurs when no SIP response was received fom the peer and, instead, we
125
- # got some other internal error (timeout, connection error, DNS error....).
126
- proxy.on_error do |status, reason|
127
- log_notice "incoming Outbound on_error: #{status} '#{reason}'"
128
- end
112
+ proxy.on_success_response do |response|
113
+ log_info "incoming Outbound on_success_response: #{response.status_code} '#{response.reason_phrase}'"
114
+ end
129
115
 
130
- # Route the request and return.
131
- proxy.route
132
- return
116
+ proxy.on_failure_response do |response|
117
+ log_info "incoming Outbound on_failure_response: #{response.status_code} '#{response.reason_phrase}'"
133
118
  end
134
119
 
135
- # An initial request with us (OverSIP) as final destination, ok, received, bye...
136
- if request.destination_myself?
137
- log_info "request for myself => 404"
138
- request.reply 404, "Ok, I'm here"
139
- return
120
+ # on_error() occurs when no SIP response was received fom the peer and, instead, we
121
+ # got some other internal error (timeout, connection error, DNS error....).
122
+ proxy.on_error do |status, reason|
123
+ log_notice "incoming Outbound on_error: #{status} '#{reason}'"
140
124
  end
141
125
 
142
- # An outgoing initial request.
143
- case request.sip_method
126
+ # Route the request and return.
127
+ proxy.route request
128
+ return
129
+ end
144
130
 
145
- when :INVITE, :MESSAGE, :OPTIONS, :SUBSCRIBE, :PUBLISH
131
+ # An initial request with us (OverSIP) as final destination, ok, received, bye...
132
+ if request.destination_myself?
133
+ log_info "request for myself => 404"
134
+ request.reply 404, "Ok, I'm here"
135
+ return
136
+ end
146
137
 
147
- if MyExampleApp::SIP_USE_MODULE_USER_ASSERTION
148
- ::OverSIP::SIP::Modules::UserAssertion.add_pai request
149
- end
138
+ # An outgoing initial request.
139
+ case request.sip_method
150
140
 
151
- proxy = request.proxy(:proxy_out)
141
+ when :INVITE, :MESSAGE, :OPTIONS, :SUBSCRIBE, :PUBLISH
152
142
 
153
- proxy.on_provisional_response do |response|
154
- log_info "on_provisional_response: #{response.status_code} '#{response.reason_phrase}'"
155
- end
143
+ if MyExampleApp::SIP_USE_MODULE_USER_ASSERTION
144
+ ::OverSIP::SIP::Modules::UserAssertion.add_pai request
145
+ end
156
146
 
157
- proxy.on_success_response do |response|
158
- log_info "on_success_response: #{response.status_code} '#{response.reason_phrase}'"
159
- end
147
+ proxy = ::OverSIP::SIP::Proxy.new :proxy_out
160
148
 
161
- proxy.on_failure_response do |response|
162
- log_info "on_failure_response: #{response.status_code} '#{response.reason_phrase}'"
163
- end
149
+ proxy.on_provisional_response do |response|
150
+ log_info "on_provisional_response: #{response.status_code} '#{response.reason_phrase}'"
151
+ end
164
152
 
165
- proxy.on_error do |status, reason|
166
- log_notice "on_error: #{status} '#{reason}'"
167
- end
153
+ proxy.on_success_response do |response|
154
+ log_info "on_success_response: #{response.status_code} '#{response.reason_phrase}'"
155
+ end
168
156
 
169
- proxy.route
170
- return
157
+ proxy.on_failure_response do |response|
158
+ log_info "on_failure_response: #{response.status_code} '#{response.reason_phrase}'"
159
+ end
171
160
 
172
- when :REGISTER
161
+ proxy.on_error do |status, reason|
162
+ log_notice "on_error: #{status} '#{reason}'"
163
+ end
173
164
 
174
- if MyExampleApp::SIP_USE_MODULE_REGISTRAR_WITHOUT_PATH
175
- # Contact mangling for the case in which the registrar does not support Path.
176
- ::OverSIP::SIP::Modules::RegistrarWithoutPath.add_outbound_to_contact request
177
- end
165
+ proxy.route request
166
+ return
178
167
 
179
- proxy = request.proxy(:proxy_out)
168
+ when :REGISTER
180
169
 
181
- proxy.on_success_response do |response|
182
- if MyExampleApp::SIP_USE_MODULE_REGISTRAR_WITHOUT_PATH
183
- # Undo changes done to the Contact header provided by the client, so it receives
184
- # the same value in the 200 response from the registrar.
185
- ::OverSIP::SIP::Modules::RegistrarWithoutPath.remove_outbound_from_contact response
186
- end
170
+ if MyExampleApp::SIP_USE_MODULE_REGISTRAR_WITHOUT_PATH
171
+ # Contact mangling for the case in which the registrar does not support Path.
172
+ ::OverSIP::SIP::Modules::RegistrarWithoutPath.add_outbound_to_contact request
173
+ end
187
174
 
188
- if MyExampleApp::SIP_USE_MODULE_USER_ASSERTION
189
- # The registrar replies 200 after a REGISTER with credentials so let's assert
190
- # the current SIP user to this connection.
191
- ::OverSIP::SIP::Modules::UserAssertion.assert_connection response
192
- end
193
- end
175
+ proxy = ::OverSIP::SIP::Proxy.new :proxy_out
194
176
 
195
- proxy.on_failure_response do |response|
196
- if MyExampleApp::SIP_USE_MODULE_USER_ASSERTION
197
- # We don't add PAI for re-REGISTER, so 401 will be replied, and after it let's
198
- # revoke the current user assertion (will be re-added upon REGISTER with credentials).
199
- ::OverSIP::SIP::Modules::UserAssertion.revoke_assertion response
200
- end
177
+ proxy.on_success_response do |response|
178
+ if MyExampleApp::SIP_USE_MODULE_REGISTRAR_WITHOUT_PATH
179
+ # Undo changes done to the Contact header provided by the client, so it receives
180
+ # the same value in the 200 response from the registrar.
181
+ ::OverSIP::SIP::Modules::RegistrarWithoutPath.remove_outbound_from_contact response
201
182
  end
202
183
 
203
- proxy.route
204
- return
184
+ if MyExampleApp::SIP_USE_MODULE_USER_ASSERTION
185
+ # The registrar replies 200 after a REGISTER with credentials so let's assert
186
+ # the current SIP user to this connection.
187
+ ::OverSIP::SIP::Modules::UserAssertion.assert_connection response
188
+ end
189
+ end
205
190
 
206
- else
191
+ proxy.on_failure_response do |response|
192
+ if MyExampleApp::SIP_USE_MODULE_USER_ASSERTION
193
+ # We don't add PAI for re-REGISTER, so 401 will be replied, and after it let's
194
+ # revoke the current user assertion (will be re-added upon REGISTER with credentials).
195
+ ::OverSIP::SIP::Modules::UserAssertion.revoke_assertion response
196
+ end
197
+ end
207
198
 
208
- log_info "method #{request.sip_method} not implemented => 501"
209
- request.reply 501, "Not Implemented"
210
- return
199
+ proxy.route request
200
+ return
211
201
 
212
- end
213
- end
202
+ else
214
203
 
204
+ log_info "method #{request.sip_method} not implemented => 501"
205
+ request.reply 501, "Not Implemented"
206
+ return
215
207
 
208
+ end
209
+ end
216
210
 
217
211
 
218
- ### WebSocket Events:
219
212
 
220
213
 
221
- # This method is called when a new WebSocket connection is being requested.
222
- # Here you can inspect the connection and the HTTP GET request. If you
223
- # decide not to accept this connection then call to:
224
- #
225
- # connection.http_reject(status_code, reason_phrase=nil, extra_headers=nil)
226
- #
227
- # You can also set variables for this connection via the connection.cvars
228
- # Hash. Later you can access to this Hash in SIP request from this connection
229
- # by accessing to request.cvars attribute.
230
- #
231
- # def WebSocketEvents.on_connection connection, http_request
232
- # [...]
233
- # end
214
+ ### OverSIP WebSocket Events:
234
215
 
235
216
 
236
- # This method is called when a WebSocket connection is closed.
237
- #
238
- # def WebSocketEvents.on_connection_closed connection
239
- # [...]
240
- # end
217
+ # This method is called when a new WebSocket connection is being requested.
218
+ # Here you can inspect the connection and the HTTP GET request. If you
219
+ # decide not to accept this connection then call to:
220
+ #
221
+ # connection.http_reject(status_code, reason_phrase=nil, extra_headers=nil)
222
+ #
223
+ # You can also set variables for this connection via the connection.cvars
224
+ # Hash. Later you can access to this Hash in SIP requests from this connection
225
+ # by retrieving request.cvars attribute.
226
+ #
227
+ # def (OverSIP::WebSocketEvents).on_connection connection, http_request
228
+ # [...]
229
+ # end
241
230
 
242
231
 
243
- end # module OverSIP
232
+ # This method is called when a WebSocket connection is closed. The connection
233
+ # is given as first argument along with a second argument "client_closed" which
234
+ # is _true_ in case the WebSocket connection was closed by the client.
235
+ #
236
+ # def (OverSIP::WebSocketEvents).on_connection_closed connection, client_closed
237
+ # [...]
238
+ # end
@@ -32,7 +32,7 @@ module OverSIP
32
32
  log_system_notice "on_connection() event is not defined"
33
33
  end
34
34
 
35
- def self.on_connection_closed connection
35
+ def self.on_connection_closed connection, client_closed
36
36
  log_system_notice "on_connection_closed() event is not defined"
37
37
  end
38
38
 
@@ -2,6 +2,6 @@ module OverSIP
2
2
 
3
3
  class Error < ::StandardError ; end
4
4
  class ConfigurationError < Error ; end
5
- class LogicError < Error ; end
5
+ class RuntimeError < Error ; end
6
6
 
7
7
  end
@@ -552,7 +552,7 @@ module OverSIP::Launcher
552
552
  ::OverSIP.stud_pids ||= []
553
553
  ::OverSIP.stud_pids << pid
554
554
 
555
- log_system_info "spawned stud server (PID #{pid}) listening into #{listen_ip} : #{listen_port}"
555
+ log_system_info "spawned stud server (PID #{pid}) listening on #{listen_ip} : #{listen_port}"
556
556
  end
557
557
 
558
558
 
@@ -5,17 +5,6 @@ module OverSIP
5
5
  # attribute.
6
6
  module Logger
7
7
 
8
- SYSLOG_POSIXMQ_MAPPING = {
9
- "debug" => 0,
10
- "info" => 1,
11
- "notice" => 2,
12
- "warn" => 3,
13
- "error" => 4,
14
- "crit" => 5,
15
- "alert" => 6,
16
- "emerg" => 7
17
- }
18
-
19
8
  def self.init_logger_mq group=nil
20
9
  @@logger_mq = ::OverSIP::PosixMQ.create_queue({
21
10
  :name => ::OverSIP.syslogger_mq_name,
@@ -28,8 +17,17 @@ module OverSIP
28
17
 
29
18
 
30
19
  def self.load_methods
20
+ # When not yet daemonized, also log to syslog.
21
+ if not ::OverSIP.daemonized?
22
+ ::Syslog.close if ::Syslog.opened?
23
+
24
+ syslog_options = ::Syslog::LOG_PID | ::Syslog::LOG_NDELAY
25
+ syslog_facility = ::OverSIP::Syslog::SYSLOG_FACILITY_MAPPING[::OverSIP.configuration[:core][:syslog_facility]] rescue ::Syslog::LOG_DAEMON
26
+ ::Syslog.open(::OverSIP.master_name, syslog_options, syslog_facility)
27
+ end
28
+
31
29
  begin
32
- @@threshold = SYSLOG_POSIXMQ_MAPPING[::OverSIP.configuration[:core][:syslog_level]]
30
+ @@threshold = ::OverSIP::Syslog::SYSLOG_SEVERITY_MAPPING[::OverSIP.configuration[:core][:syslog_level]]
33
31
  rescue
34
32
  @@threshold = 0 # debug.
35
33
  end
@@ -38,7 +36,7 @@ module OverSIP
38
36
 
39
37
  @@congested = false
40
38
 
41
- SYSLOG_POSIXMQ_MAPPING.each do |level, level_value|
39
+ ::OverSIP::Syslog::SYSLOG_SEVERITY_MAPPING.each do |level, level_value|
42
40
  method_str = "
43
41
  def log_system_#{level}(msg)
44
42
  "
@@ -49,27 +47,33 @@ module OverSIP
49
47
  begin
50
48
  unless @@logger_mq.trysend ::OverSIP::Logger.syslog_system_msg2str(#{level_value}, msg, log_id), 0
51
49
  @@congested = true
52
- EM.add_timer(1) do
50
+ ::EM.add_timer(1) do
53
51
  @@logger_mq.trysend ::OverSIP::Logger.syslog_system_msg2str(4, \"logger message queue was full, some logs have been lost\", log_id), 1
54
52
  @@congested = false
55
53
  end
56
54
  end
57
- rescue Errno::EMSGSIZE
55
+ rescue ::Errno::EMSGSIZE
58
56
  @@logger_mq.trysend ::OverSIP::Logger.syslog_system_msg2str(4, \"too long message could not be logged\", log_id), 1 rescue nil
59
- rescue => e
57
+ rescue ::Exception => e
60
58
  @@logger_mq.trysend ::OverSIP::Logger.syslog_system_msg2str(4, \"unexpected logging error (\#{e.class}: \#{e.message})\", log_id), 1 rescue nil
61
59
  end
62
60
  "
63
61
  end
64
62
 
65
- unless ::OverSIP.daemonized?
63
+ if not ::OverSIP.daemonized?
66
64
  if %w{debug info notice}.include? level
67
65
  method_str << "
68
66
  puts ::OverSIP::Logger.fg_system_msg2str('#{level}', msg, log_id)
67
+ if not ::OverSIP.syslogger_ready?
68
+ ::OverSIP::Syslog.log ::OverSIP::Logger.syslog_system_msg2str(#{level_value}, msg, log_id)
69
+ end
69
70
  "
70
71
  else
71
72
  method_str << "
72
73
  $stderr.puts ::OverSIP::Logger.fg_system_msg2str('#{level}', msg, log_id)
74
+ if not ::OverSIP.syslogger_ready?
75
+ ::OverSIP::Syslog.log ::OverSIP::Logger.syslog_system_msg2str(#{level_value}, msg, log_id)
76
+ end
73
77
  "
74
78
  end
75
79
  end
@@ -80,21 +84,21 @@ module OverSIP
80
84
 
81
85
 
82
86
  if ::OverSIP.syslogger_ready?
83
- # User/script logs.
87
+ # User logs.
84
88
  method_str = "
85
89
  def log_#{level}(msg)
86
90
  return false if @@threshold > #{level_value} || @@congested
87
91
  begin
88
92
  unless @@logger_mq.trysend ::OverSIP::Logger.syslog_user_msg2str(#{level_value}, msg, log_id), 0
89
93
  @@congested = true
90
- EM.add_timer(1) do
94
+ ::EM.add_timer(1) do
91
95
  @@logger_mq.trysend ::OverSIP::Logger.syslog_user_msg2str(4, \"logger message queue was full, some logs have been lost\", log_id), 1
92
96
  @@congested = false
93
97
  end
94
98
  end
95
- rescue Errno::EMSGSIZE
99
+ rescue ::Errno::EMSGSIZE
96
100
  @@logger_mq.trysend ::OverSIP::Logger.syslog_user_msg2str(4, \"too long message could not be logged\", log_id), 1 rescue nil
97
- rescue => e
101
+ rescue ::Exception => e
98
102
  @@logger_mq.trysend ::OverSIP::Logger.syslog_user_msg2str(4, \"unexpected logging error (\#{e.class}: \#{e.message})\", log_id), 1 rescue nil
99
103
  end
100
104
  end
@@ -133,11 +137,11 @@ module OverSIP
133
137
  def self.syslog_user_msg2str(level_value, msg, log_id)
134
138
  case msg
135
139
  when ::String
136
- level_value.to_s << "<" << log_id << "> script: " << msg
140
+ level_value.to_s << "<" << log_id << "> [user] " << msg
137
141
  when ::Exception
138
- "#{level_value}<#{log_id}> script: #{msg.message} (#{msg.class })\n#{(msg.backtrace || [])[0..3].join("\n")}"
142
+ "#{level_value}<#{log_id}> [user] #{msg.message} (#{msg.class })\n#{(msg.backtrace || [])[0..3].join("\n")}"
139
143
  else
140
- level_value.to_s << "<" << log_id << "> script: " << msg.inspect
144
+ level_value.to_s << "<" << log_id << "> [user] " << msg.inspect
141
145
  end
142
146
  end
143
147
 
@@ -110,7 +110,7 @@ module OverSIP
110
110
  ::Process::GID.change_privilege(orig_gid) if mq_group
111
111
 
112
112
  if mq.attr.maxmsg == mq_attr.maxmsg and mq.attr.msgsize == mq_attr.msgsize
113
- log_system_debug "maxmsg=#{mq.attr.maxmsg}, msgsize=#{mq.attr.msgsize}" if $oversip_debug
113
+ log_system_info "maxmsg=#{mq.attr.maxmsg}, msgsize=#{mq.attr.msgsize}"
114
114
  else
115
115
  log_system_warn "maxmsg=#{mq.attr.maxmsg}, msgsize=#{mq.attr.msgsize}, " \
116
116
  "but recommended values are maxmsg=#{mq_attr.maxmsg}, msgsize=#{mq_attr.msgsize}"
@@ -25,7 +25,6 @@ module OverSIP::SIP
25
25
  get_body
26
26
 
27
27
  when :finished
28
- # Invoke the custom logic for requests.
29
28
  if @msg.request?
30
29
  process_request
31
30
  else
@@ -35,7 +35,6 @@ module OverSIP::SIP
35
35
  get_body
36
36
 
37
37
  when :finished
38
- # Invoke the custom logic for requests.
39
38
  if @msg.request?
40
39
  process_request
41
40
  else
@@ -15,7 +15,7 @@ module OverSIP::SIP
15
15
  return
16
16
  end
17
17
 
18
- log_system_debug "connection from the TLS tunnel " << remote_desc
18
+ log_system_debug ("connection from the TLS tunnel " << remote_desc) if $oversip_debug
19
19
 
20
20
  # Create an Outbound (RFC 5626) flow token for this connection.
21
21
  @outbound_flow_token = ::OverSIP::SIP::TransportManager.add_outbound_connection self
@@ -15,7 +15,6 @@ module OverSIP::SIP
15
15
  parse_message
16
16
 
17
17
  when :finished
18
- # Invoke the custom logic for requests.
19
18
  if @msg.request?
20
19
  process_request
21
20
  else
@@ -163,6 +163,14 @@ module OverSIP::SIP
163
163
  end
164
164
  end
165
165
 
166
+ # Close the connection from which the SIP request/response has been
167
+ # received.
168
+ def close_connection
169
+ return false if @transport == :udp
170
+ @connection.close_connection
171
+ true
172
+ end
173
+
166
174
  end # class Message
167
175
 
168
176
  end
@@ -73,8 +73,8 @@ module OverSIP::SIP
73
73
 
74
74
 
75
75
  def process_request
76
- # Create a new Logic instance for this request (unless it's a retransmission of the request,
77
- # a CANCEL or an ACK for a final non-2XX response).
76
+ # Run the user provided OverSIP::SipEvents.on_request() callback (unless the request
77
+ # it's a retransmission, a CANCEL or an ACK for a final non-2XX response).
78
78
  unless check_transaction
79
79
  begin
80
80
  # Create the antiloop identifier for this request.
@@ -90,7 +90,7 @@ module OverSIP::SIP
90
90
  @msg.tvars = {}
91
91
  @msg.cvars = @cvars
92
92
 
93
- # Run the user provided OverSIP::SipEvents.on_request() callback.
93
+ # Run the callback.
94
94
  ::OverSIP::SipEvents.on_request @msg
95
95
  rescue ::Exception => e
96
96
  log_system_error "error calling OverSIP::WebSocketEvents.on_request() => 500:"
@@ -33,17 +33,6 @@ module OverSIP::SIP
33
33
  end
34
34
 
35
35
 
36
- # Returns a Proxy instance. The user MUST call route() and optionally set the callbacks
37
- # before calling route().
38
- def proxy proxy_name=:default_proxy
39
- if (proxy_conf = ::OverSIP.proxies[proxy_name.to_sym])
40
- ::OverSIP::SIP::Proxy.new self, proxy_conf
41
- else
42
- raise ::OverSIP::LogicError, "proxy '#{proxy_name}' is not defined"
43
- end
44
- end
45
-
46
-
47
36
  def loose_route
48
37
  num_removes = 0
49
38
  has_preloaded_route_with_ob_param = false
@@ -11,7 +11,7 @@ module OverSIP::SIP
11
11
 
12
12
  def self.add_outbound_to_contact request
13
13
  unless request.sip_method == :REGISTER
14
- raise ::OverSIP::LogicError, "request must be a REGISTER"
14
+ raise ::OverSIP::RuntimeError, "request must be a REGISTER"
15
15
  end
16
16
 
17
17
  if request.contact and request.connection_outbound_flow_token
@@ -52,7 +52,7 @@ module OverSIP::SIP
52
52
 
53
53
  def self.remove_outbound_from_contact message
54
54
  unless message.is_a? ::OverSIP::SIP::Message
55
- raise ::OverSIP::LogicError, "message must be a OverSIP::SIP::Request or OverSIP::SIP::Response"
55
+ raise ::OverSIP::RuntimeError, "message must be a OverSIP::SIP::Request or OverSIP::SIP::Response"
56
56
  end
57
57
 
58
58
  if (contacts = message.headers["Contact"])
@@ -16,7 +16,7 @@ module OverSIP::SIP
16
16
  when ::OverSIP::SIP::Response
17
17
  request = message.request
18
18
  else
19
- raise ::OverSIP::LogicError, "message must be a OverSIP::SIP::Request or OverSIP::SIP::Response"
19
+ raise ::OverSIP::RuntimeError, "message must be a OverSIP::SIP::Request or OverSIP::SIP::Response"
20
20
  end
21
21
 
22
22
  # Don't do this stuf for UDP or for outbound connections.
@@ -38,7 +38,7 @@ module OverSIP::SIP
38
38
  when ::OverSIP::SIP::Response
39
39
  request = message.request
40
40
  else
41
- raise ::OverSIP::LogicError, "message must be a OverSIP::SIP::Request or OverSIP::SIP::Response"
41
+ raise ::OverSIP::RuntimeError, "message must be a OverSIP::SIP::Request or OverSIP::SIP::Response"
42
42
  end
43
43
 
44
44
  request.connection.asserted_user = false
@@ -4,25 +4,11 @@ module OverSIP::SIP
4
4
 
5
5
  include ::OverSIP::Logger
6
6
 
7
- def initialize request, proxy_conf
8
- @request = request
9
- @proxy_conf = proxy_conf
10
- @log_id = "Proxy #{proxy_conf[:name]} #{request.via_branch_id}"
11
-
12
- # Create the server transaction if it doesn't exist yet.
13
- @server_transaction = @request.server_transaction or case @request.sip_method
14
- # Here it can arrive an INVITE, ACK-for-2XX and any method but CANCEL.
15
- when :INVITE
16
- InviteServerTransaction.new @request
17
- when :ACK
18
- else
19
- NonInviteServerTransaction.new @request
20
- end
21
- @request.server_transaction ||= @server_transaction
22
-
23
- # Set this core layer to the server transaction.
24
- @request.server_transaction.core = self if @request.server_transaction
25
- end # initialize
7
+ def initialize proxy_name=:default_proxy
8
+ unless (@proxy_conf = ::OverSIP.proxies[proxy_name.to_sym])
9
+ raise ::OverSIP::RuntimeError, "proxy '#{proxy_name}' is not defined in Proxies Configuration file"
10
+ end
11
+ end
26
12
 
27
13
 
28
14
  def on_provisional_response &block
@@ -55,7 +41,27 @@ module OverSIP::SIP
55
41
  end
56
42
 
57
43
 
58
- def route dst_host=nil, dst_port=nil, dst_transport=nil
44
+ def route request, dst_host=nil, dst_port=nil, dst_transport=nil
45
+ unless (@request = request).is_a? ::OverSIP::SIP::Request
46
+ raise ::OverSIP::RuntimeError, "request must be a OverSIP::SIP::Request instance"
47
+ end
48
+
49
+ @log_id = "Proxy #{@proxy_conf[:name]} #{@request.via_branch_id}"
50
+
51
+ # Create the server transaction if it doesn't exist yet.
52
+ @server_transaction = @request.server_transaction or case @request.sip_method
53
+ # Here it can arrive an INVITE, ACK-for-2XX and any method but CANCEL.
54
+ when :INVITE
55
+ InviteServerTransaction.new @request
56
+ when :ACK
57
+ else
58
+ NonInviteServerTransaction.new @request
59
+ end
60
+ @request.server_transaction ||= @server_transaction
61
+
62
+ # Set this core layer to the server transaction.
63
+ @request.server_transaction.core = self if @request.server_transaction
64
+
59
65
  # NOTE: Routing can be based on incoming request for an Outbound (RFC 5626) connection
60
66
  # or based on normal RFC 3263 procedures.
61
67
 
@@ -179,7 +185,7 @@ module OverSIP::SIP
179
185
 
180
186
 
181
187
  def receive_response response
182
- log_system_debug "received response #{response.status_code}"
188
+ log_system_debug "received response #{response.status_code}" if $oversip_debug
183
189
 
184
190
  response.delete_header_top "Via"
185
191
 
@@ -0,0 +1,58 @@
1
+ module OverSIP
2
+
3
+ module Syslog
4
+
5
+ SYSLOG_FACILITY_MAPPING = {
6
+ "kern" => ::Syslog::LOG_KERN,
7
+ "user" => ::Syslog::LOG_USER,
8
+ "daemon" => ::Syslog::LOG_DAEMON,
9
+ "local0" => ::Syslog::LOG_LOCAL0,
10
+ "local1" => ::Syslog::LOG_LOCAL1,
11
+ "local2" => ::Syslog::LOG_LOCAL2,
12
+ "local3" => ::Syslog::LOG_LOCAL3,
13
+ "local4" => ::Syslog::LOG_LOCAL4,
14
+ "local5" => ::Syslog::LOG_LOCAL5,
15
+ "local6" => ::Syslog::LOG_LOCAL6,
16
+ "local7" => ::Syslog::LOG_LOCAL7
17
+ }
18
+
19
+ SYSLOG_SEVERITY_MAPPING = {
20
+ "debug" => 0,
21
+ "info" => 1,
22
+ "notice" => 2,
23
+ "warn" => 3,
24
+ "error" => 4,
25
+ "crit" => 5,
26
+ "alert" => 6,
27
+ "emerg" => 7
28
+ }
29
+
30
+ def self.log string
31
+ level = string.getbyte 0
32
+ msg = string[1..-1].gsub(/%/,"%%").gsub(/\x00/,"")
33
+
34
+ case level
35
+ when 48 # "0" =>DEBUG
36
+ ::Syslog.debug sprintf("%7s %s", "DEBUG:", msg)
37
+ when 49 # "1" => INFO
38
+ ::Syslog.info sprintf("%7s %s", "INFO:", msg)
39
+ when 50 # "2" => NOTICE
40
+ ::Syslog.notice sprintf("%7s %s", "NOTICE:", msg)
41
+ when 51 # "3" => WARN
42
+ ::Syslog.warning sprintf("%7s %s", "WARN:", msg)
43
+ when 52 # "4" => ERR
44
+ ::Syslog.err sprintf("%7s %s", "ERROR:", msg)
45
+ when 53 # "5" => CRIT
46
+ ::Syslog.crit sprintf("%7s %s", "CRIT:", msg)
47
+ when 54 # "6" => ALERT
48
+ ::Syslog.alert sprintf("%7s %s", "ALERT:", msg)
49
+ when 55 # "7" => EMERG
50
+ ::Syslog.emerg sprintf("%7s %s", "EMERG:", msg)
51
+ else # Shouldn't occur.
52
+ ::Syslog.err sprintf("%7s %s", "UNKNOWN:", msg)
53
+ end
54
+ end
55
+
56
+ end
57
+
58
+ end
@@ -1,8 +1,3 @@
1
- # Ruby built-in libraries.
2
-
3
- require "syslog"
4
-
5
-
6
1
  # Ruby external gems.
7
2
 
8
3
  gem "eventmachine-le", ">= 1.1.2"
@@ -21,46 +16,10 @@ module OverSIP
21
16
 
22
17
  module SysLoggerProcess
23
18
 
24
- SYSLOG_FACILITY_MAPPING = {
25
- "kern" => ::Syslog::LOG_KERN,
26
- "user" => ::Syslog::LOG_USER,
27
- "daemon" => ::Syslog::LOG_DAEMON,
28
- "local0" => ::Syslog::LOG_LOCAL0,
29
- "local1" => ::Syslog::LOG_LOCAL1,
30
- "local2" => ::Syslog::LOG_LOCAL2,
31
- "local3" => ::Syslog::LOG_LOCAL3,
32
- "local4" => ::Syslog::LOG_LOCAL4,
33
- "local5" => ::Syslog::LOG_LOCAL5,
34
- "local6" => ::Syslog::LOG_LOCAL6,
35
- "local7" => ::Syslog::LOG_LOCAL7
36
- }
37
-
38
19
  class SysLoggerWatcher < ::EM::PosixMQ::Watcher
39
20
 
40
21
  def receive_message string, priority
41
- level = string.getbyte 0
42
- msg = string[1..-1].gsub(/%/,"%%").gsub(/\x00/,"")
43
-
44
- case level
45
- when 48 # "0" =>DEBUG
46
- ::Syslog.debug sprintf("%7s %s", "DEBUG:", msg)
47
- when 49 # "1" => INFO
48
- ::Syslog.info sprintf("%7s %s", "INFO:", msg)
49
- when 50 # "2" => NOTICE
50
- ::Syslog.notice sprintf("%7s %s", "NOTICE:", msg)
51
- when 51 # "3" => WARN
52
- ::Syslog.warning sprintf("%7s %s", "WARN:", msg)
53
- when 52 # "4" => ERR
54
- ::Syslog.err sprintf("%7s %s", "ERROR:", msg)
55
- when 53 # "5" => CRIT
56
- ::Syslog.crit sprintf("%7s %s", "CRIT:", msg)
57
- when 54 # "6" => ALERT
58
- ::Syslog.alert sprintf("%7s %s", "ALERT:", msg)
59
- when 55 # "7" => EMERG
60
- ::Syslog.emerg sprintf("%7s %s", "EMERG:", msg)
61
- else # Shouldn't occur.
62
- ::Syslog.err sprintf("%7s %s", "UNKNOWN:", msg)
63
- end
22
+ ::OverSIP::Syslog.log string
64
23
  end
65
24
 
66
25
  end # class SysLoggerWatcher
@@ -68,8 +27,12 @@ module OverSIP
68
27
  def self.run options={}
69
28
  $0 = ::OverSIP.master_name + "_syslogger"
70
29
 
30
+ # Close Ruby Syslog open in the main process before forking.
31
+ ::Syslog.close
32
+
33
+ # Run a new Ruby Syslog.
71
34
  syslog_options = ::Syslog::LOG_PID | ::Syslog::LOG_NDELAY
72
- syslog_facility = SYSLOG_FACILITY_MAPPING[::OverSIP.configuration[:core][:syslog_facility]]
35
+ syslog_facility = ::OverSIP::Syslog::SYSLOG_FACILITY_MAPPING[::OverSIP.configuration[:core][:syslog_facility]]
73
36
  ::Syslog.open(::OverSIP.master_name, syslog_options, syslog_facility)
74
37
 
75
38
  ppid = ::Process.ppid
@@ -87,7 +50,7 @@ module OverSIP
87
50
  # Change process permissions if requested.
88
51
  ::OverSIP::Launcher.set_user_group(options[:user], options[:group])
89
52
 
90
- rescue => e
53
+ rescue ::Exception => e
91
54
  ::Syslog.crit sprintf("%7s %s", "CRIT:", "<syslogger> #{e.class}: #{e}")
92
55
  ::Syslog.crit sprintf("%7s %s", "CRIT:", "<syslogger> syslogger process terminated")
93
56
  exit! 1
@@ -6,7 +6,7 @@ module OverSIP
6
6
  MAJOR = 1
7
7
  MINOR = 1
8
8
  TINY = 0
9
- DEVEL = "beta2" # Set to nil for stable releases.
9
+ DEVEL = "beta3" # Set to nil for stable releases.
10
10
  end
11
11
 
12
12
  PROGRAM_NAME = "OverSIP"
@@ -20,6 +20,7 @@ module OverSIP::WebSocket
20
20
  attr_accessor :ws_protocol, :ws_app_klass
21
21
  attr_reader :connection_log_id, :remote_ip_type, :remote_ip, :remote_port
22
22
  attr_reader :cvars # A Hash for storing user provided data.
23
+ attr_accessor :ws_locally_closed
23
24
 
24
25
 
25
26
  def initialize
@@ -72,7 +73,7 @@ module OverSIP::WebSocket
72
73
 
73
74
  if @ws_handshake_done
74
75
  begin
75
- ::OverSIP::WebSocketEvents.on_connection_closed self
76
+ ::OverSIP::WebSocketEvents.on_connection_closed self, !@ws_locally_closed
76
77
  rescue ::Exception => e
77
78
  log_system_error "error calling OverSIP::WebSocketEvents.on_connection_closed():"
78
79
  log_system_error e
@@ -24,6 +24,7 @@ module OverSIP::WebSocket
24
24
 
25
25
  def close_connection status=nil, reason=nil
26
26
  @ws_framing.send_close_frame status, reason
27
+ @connection.ws_locally_closed = true
27
28
  end
28
29
 
29
30
 
@@ -535,7 +535,7 @@ module OverSIP::WebSocket
535
535
  end
536
536
 
537
537
  unless in_reply_to_close
538
- log_system_notice "sending close frame: status=#{status.inspect}, reason=#{reason.inspect}"
538
+ log_system_debug "sending close frame: status=#{status.inspect}, reason=#{reason.inspect}" if $oversip_debug
539
539
  else
540
540
  log_system_debug "sending reply close frame: status=#{status.inspect}, reason=#{reason.inspect}" if $oversip_debug
541
541
  end
@@ -572,15 +572,21 @@ module OverSIP::WebSocket
572
572
  @connection.ignore_incoming_data
573
573
  @connection.send_data frame
574
574
 
575
- unless in_reply_to_close
575
+ # NOTE: Don't do it since it "seems" that the connection has been closed
576
+ # by the client.
577
+ #unless in_reply_to_close
576
578
  # Let's some time for the client to send us a close frame (it will
577
579
  # be ignored anyway) before closing the TCP connection.
578
- ::EM.add_timer(0.2) do
579
- @connection.close_connection_after_writing
580
- end
581
- else
582
- @connection.close_connection_after_writing
583
- end
580
+ # NOTE: Don't do it since it "seems" that the connection has been closed
581
+ # by the client.
582
+ #::EM.add_timer(0.2) do
583
+ #@connection.close_connection_after_writing
584
+ #end
585
+ #else
586
+ #@connection.close_connection_after_writing
587
+ #end
588
+
589
+ @connection.close_connection_after_writing
584
590
  true
585
591
  end
586
592
 
data/lib/oversip.rb CHANGED
@@ -12,11 +12,13 @@ require "tempfile"
12
12
 
13
13
  require "term/ansicolor"
14
14
  require "posix_mq"
15
+ require "syslog"
15
16
 
16
17
 
17
18
  # OverSIP files.
18
19
 
19
20
  require "oversip/version.rb"
21
+ require "oversip/syslog.rb"
20
22
  require "oversip/logger.rb"
21
23
  require "oversip/config.rb"
22
24
  require "oversip/config_validators.rb"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oversip
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0.beta2
4
+ version: 1.1.0.beta3
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-03 00:00:00.000000000 Z
12
+ date: 2012-08-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: eventmachine-le
16
- requirement: &17173880 !ruby/object:Gem::Requirement
16
+ requirement: &18084900 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 1.1.2
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *17173880
24
+ version_requirements: *18084900
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: iobuffer
27
- requirement: &17173420 !ruby/object:Gem::Requirement
27
+ requirement: &18084440 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 1.1.2
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *17173420
35
+ version_requirements: *18084440
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: em-posixmq
38
- requirement: &17172960 !ruby/object:Gem::Requirement
38
+ requirement: &18083980 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 0.2.3
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *17172960
46
+ version_requirements: *18083980
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: em-udns
49
- requirement: &17172500 !ruby/object:Gem::Requirement
49
+ requirement: &18099900 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 0.3.6
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *17172500
57
+ version_requirements: *18099900
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: escape_utils
60
- requirement: &17172040 !ruby/object:Gem::Requirement
60
+ requirement: &18099440 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: 0.2.4
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *17172040
68
+ version_requirements: *18099440
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: term-ansicolor
71
- requirement: &17171660 !ruby/object:Gem::Requirement
71
+ requirement: &18099060 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '0'
77
77
  type: :runtime
78
78
  prerelease: false
79
- version_requirements: *17171660
79
+ version_requirements: *18099060
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: posix-spawn
82
- requirement: &17171120 !ruby/object:Gem::Requirement
82
+ requirement: &18098520 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: 0.3.6
88
88
  type: :runtime
89
89
  prerelease: false
90
- version_requirements: *17171120
90
+ version_requirements: *18098520
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: rake
93
- requirement: &17170620 !ruby/object:Gem::Requirement
93
+ requirement: &18098020 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ~>
@@ -98,7 +98,7 @@ dependencies:
98
98
  version: 0.9.2
99
99
  type: :development
100
100
  prerelease: false
101
- version_requirements: *17170620
101
+ version_requirements: *18098020
102
102
  description: ! "OverSIP is an async SIP server. Built on top of Ruby EventMachine\n
103
103
  \ library it follows the Reactor Pattern, allowing thousands of concurrent connections
104
104
  and requests\n handled by a single processor in a never-blocking fashion. It
@@ -120,6 +120,7 @@ files:
120
120
  - lib/oversip/posix_mq.rb
121
121
  - lib/oversip/proxies_config.rb
122
122
  - lib/oversip/utils.rb
123
+ - lib/oversip/syslog.rb
123
124
  - lib/oversip/errors.rb
124
125
  - lib/oversip/master_process.rb
125
126
  - lib/oversip/default_server.rb