quaff 0.5.3 → 0.5.4
Sign up to get free protection for your applications and to get access to all the features.
- 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
|