瀏覽代碼

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

Peter Dunkley 12 年之前
父節點
當前提交
acc9e5a3dd
共有 1 個文件被更改,包括 15 次插入0 次删除
  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) {