Module: kamailio
Branch: master
Commit: 2ec8e05f1297d9ed69c8cd847c9d4f5d3529d3cd
URL:
https://github.com/kamailio/kamailio/commit/2ec8e05f1297d9ed69c8cd847c9d4f5…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-03-31T09:57:11+02:00
core: use outbound tcp connection id for forward(...) if FL_USE_OTCPID is set
---
Modified: src/core/action.c
---
Diff:
https://github.com/kamailio/kamailio/commit/2ec8e05f1297d9ed69c8cd847c9d4f5…
Patch:
https://github.com/kamailio/kamailio/commit/2ec8e05f1297d9ed69c8cd847c9d4f5…
---
diff --git a/src/core/action.c b/src/core/action.c
index cfb1bf934b..d72cc97a77 100644
--- a/src/core/action.c
+++ b/src/core/action.c
@@ -385,11 +385,17 @@ int do_action(struct run_act_ctx* h, struct action* a, struct
sip_msg* msg)
#ifdef USE_TCP
else if (a->type==FORWARD_TCP_T) {
dst.proto= PROTO_TCP;
+ if(msg->msg_flags & FL_USE_OTCPID) {
+ dst.id = msg->otcpid;
+ }
}
#endif
#ifdef USE_TLS
else if (a->type==FORWARD_TLS_T) {
dst.proto= PROTO_TLS;
+ if(msg->msg_flags & FL_USE_OTCPID) {
+ dst.id = msg->otcpid;
+ }
}
#endif
#ifdef USE_SCTP