quaff 0.5.3 → 0.5.4
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/message.rb +2 -2
- data/lib/sip_parser.rb +2 -2
- metadata +1 -1
data/lib/message.rb
CHANGED
@@ -6,7 +6,7 @@ class SipMessage
|
|
6
6
|
def initialize method=nil, status_code=nil, reason=nil,
|
7
7
|
req_uri=nil, body="", headers={}
|
8
8
|
@headers = headers
|
9
|
-
@method, @status_code, @reason, @
|
9
|
+
@method, @status_code, @reason, @requri = method, status_code, reason, req_uri
|
10
10
|
@body = body
|
11
11
|
@headers['Content-Length'] = [body.length]
|
12
12
|
end
|
@@ -47,7 +47,7 @@ class SipMessage
|
|
47
47
|
def to_s
|
48
48
|
msg = ""
|
49
49
|
if type == :request
|
50
|
-
msg << "#{@method} #{@
|
50
|
+
msg << "#{@method} #{@requri} SIP/2.0\r\n"
|
51
51
|
else
|
52
52
|
msg << "SIP/2.0 #{@status_code} #{@reason}\r\n"
|
53
53
|
end
|
data/lib/sip_parser.rb
CHANGED
@@ -260,9 +260,9 @@ module Quaff
|
|
260
260
|
def to_s
|
261
261
|
paramstr = @params.collect {|k, v| if (v == true) then ";#{k}" else ";#{k}=#{v}" end}.join("")
|
262
262
|
if @is_nameaddr
|
263
|
-
|
263
|
+
"#{@displayname} <#{@uri}>#{paramstr}"
|
264
264
|
else
|
265
|
-
|
265
|
+
"#{@uri}#{paramstr}"
|
266
266
|
end
|
267
267
|
end
|
268
268
|
end
|