Browse Source

modules_k/rr: add flow token to Record-Route: headers when needed

Peter Dunkley 12 years ago
parent
commit
acc9e5a3dd
1 changed files with 15 additions and 0 deletions
  1. 15 0
      modules_k/rr/record.c

+ 15 - 0
modules_k/rr/record.c

@@ -289,6 +289,11 @@ int record_route(struct sip_msg* _m, str *params)
 			LM_ERR("failed to extract username\n");
 			return -1;
 		}
+	} else if (rr_obb.use_outbound && rr_obb.use_outbound(_m)) {
+		if (rr_obb.encode_flow_token(&user, _m->rcv) != 0) {
+			LM_ERR("encoding outbound flow token\n");
+			return -1;
+		}
 	}
 
 	if (append_fromtag) {
@@ -373,6 +378,11 @@ int record_route_preset(struct sip_msg* _m, str* _data)
 			LM_ERR("failed to extract username\n");
 			return -1;
 		}
+	} else if (rr_obb.use_outbound && rr_obb.use_outbound(_m)) {
+		if (rr_obb.encode_flow_token(&user, _m->rcv) != 0) {
+			LM_ERR("encoding outbound flow token\n");
+			return -1;
+		}
 	}
 
 	if (append_fromtag) {
@@ -590,6 +600,11 @@ int record_route_advertised_address(struct sip_msg* _m, str* _data)
 			LM_ERR("failed to extract username\n");
 			return -1;
 		}
+	} else if (rr_obb.use_outbound && rr_obb.use_outbound(_m)) {
+		if (rr_obb.encode_flow_token(&user, _m->rcv) != 0) {
+			LM_ERR("encoding outbound flow token\n");
+			return -1;
+		}
 	}
 
 	if (append_fromtag) {