freeswitcher 0.6.7 → 0.6.8
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/lib/fsr/listener/inbound.rb +3 -3
- data/lib/fsr/version.rb +1 -1
- metadata +2 -2
data/lib/fsr/listener/inbound.rb
CHANGED
@@ -57,9 +57,8 @@ module FSR
|
|
57
57
|
end
|
58
58
|
|
59
59
|
def authorize_and_register_for_events
|
60
|
-
FSR::Log.info "Connection
|
60
|
+
FSR::Log.info "Establishing Connection #{@host}."
|
61
61
|
say("auth #{@auth}")
|
62
|
-
FSR::Log.info "#{@host} Connected."
|
63
62
|
before_session
|
64
63
|
end
|
65
64
|
|
@@ -80,6 +79,7 @@ module FSR
|
|
80
79
|
hash_header = headers_2_hash(header)
|
81
80
|
case hash_header[:content_type]
|
82
81
|
when "command/reply"
|
82
|
+
FSR::Log.info "#{@host} Authorized!" if hash_header[:reply_text] == "+OK accepted"
|
83
83
|
return handle_reply(header, content)
|
84
84
|
when "text/event-plain"
|
85
85
|
hash_content = headers_2_hash(content).merge(:body => content.split("\n\n",2)[1].to_s)
|
@@ -87,6 +87,7 @@ module FSR
|
|
87
87
|
require "json"
|
88
88
|
hash_content = JSON.parse(content)
|
89
89
|
when "auth/request"
|
90
|
+
FSR::Log.info "#{@host} Authorizing..."
|
90
91
|
return
|
91
92
|
else
|
92
93
|
handle_request(header, content)
|
@@ -165,7 +166,6 @@ module FSR
|
|
165
166
|
# param content The content of the data
|
166
167
|
# return [header, content]
|
167
168
|
def handle_reply(header, content)
|
168
|
-
[header, content]
|
169
169
|
end
|
170
170
|
|
171
171
|
# add_event_hook adds an Event to listen for. When that Event is triggered, it will call the defined block
|
data/lib/fsr/version.rb
CHANGED