lib/oversip/sip/proxy.rb in oversip-2.0.0 vs lib/oversip/sip/proxy.rb in oversip-2.0.1
- old
+ new
@@ -185,11 +185,11 @@
return if @num_target and @num_target > 1
add_rr_path = false
# NOTE: As per RFC 6665 the proxy MUST add Record-Route to in-dialog NOTIFY's.
- if (@request.initial? and @request.record_routing_aware?) or @request.sip_method == :NOTIFY
+ if (@request.initial? and @request.record_routing_aware?) or @request.sip_method == :NOTIFY or @conf[:record_route_all]
do_record_routing = @conf[:do_record_routing]
# Request has no previous RR/Path and current proxy performs record-routing.
# So add RR/Path.
if ! @request.in_rr && do_record_routing
@@ -268,11 +268,11 @@
end
else
@request.in_rr = :rr
# The request comes via UDP or via a connection made by the client.
if @request.connection.class.outbound_listener?
- @request.insert_header "Record-Route", @request.connection.class.record_route
+ @request.insert_header "Record-Route", "<sip:" << @request.connection_outbound_flow_token << @request.connection.class.outbound_record_route_fragment
# The request comes via a TCP/TLS connection made by OverSIP.
else
@request.insert_header "Record-Route", @request.connection.record_route
end
end
@@ -319,6 +319,6 @@
end
end # class Proxy
-end
\ No newline at end of file
+end