[sr-dev] git:pd/outbound: modules_k/rr: add flow token to Record-Route: headers when needed

Peter Dunkley peter.dunkley at crocodile-rcs.com
Sun Dec 30 20:27:51 CET 2012


Module: sip-router
Branch: pd/outbound
Commit: acc9e5a3dde72aedbb1eeba561987c5faf80800f
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=acc9e5a3dde72aedbb1eeba561987c5faf80800f

Author: Peter Dunkley <peter.dunkley at crocodile-rcs.com>
Committer: Peter Dunkley <peter.dunkley at crocodile-rcs.com>
Date:   Sun Dec 30 17:56:55 2012 +0000

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

---

 modules_k/rr/record.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/modules_k/rr/record.c b/modules_k/rr/record.c
index 839f497..5e2c418 100644
--- a/modules_k/rr/record.c
+++ b/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) {




More information about the sr-dev mailing list