Module: kamailio
Branch: master
Commit: f1634883e64587e28df629fa902c7f4116338f2c
URL: https://github.com/kamailio/kamailio/commit/f1634883e64587e28df629fa902c7f4…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2022-06-01T14:16:40+02:00
modules: readme files regenerated - ims_ipsec_pcscf ... [skip ci]
---
Modified: src/modules/ims_ipsec_pcscf/README
---
Diff: https://github.com/kamailio/kamailio/commit/f1634883e64587e28df629fa902c7f4…
Patch: https://github.com/kamailio/kamailio/commit/f1634883e64587e28df629fa902c7f4…
---
diff --git a/src/modules/ims_ipsec_pcscf/README b/src/modules/ims_ipsec_pcscf/README
index dbbf9c55d5..4a1aba9a15 100644
--- a/src/modules/ims_ipsec_pcscf/README
+++ b/src/modules/ims_ipsec_pcscf/README
@@ -311,6 +311,9 @@ ipsec_create("location", "1");
+ 0x08 (8) - use new R-URI for IPSec tunnel search.
+ 0x10 (16) - do not look for alias parameter to set received
details.
+ + 0x20 (32) - do not reset the destination URI.
+ + 0x40 (64) - use user equipment client port as target for TCP
+ requests.
This is an optional parameter, default value - 0.
Example 1.12. ipsec_forward
Module: kamailio
Branch: master
Commit: 762fc6068a23e7afd3251be58732d054a9dadab0
URL: https://github.com/kamailio/kamailio/commit/762fc6068a23e7afd3251be58732d05…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-06-01T13:11:37+02:00
ims_ipsec_pcscf: ipsec_forward() option to use UE client port for requests over TCP
---
Modified: src/modules/ims_ipsec_pcscf/cmd.c
---
Diff: https://github.com/kamailio/kamailio/commit/762fc6068a23e7afd3251be58732d05…
Patch: https://github.com/kamailio/kamailio/commit/762fc6068a23e7afd3251be58732d05…
---
diff --git a/src/modules/ims_ipsec_pcscf/cmd.c b/src/modules/ims_ipsec_pcscf/cmd.c
index 8fa4d9cf23..35bcaa28fb 100644
--- a/src/modules/ims_ipsec_pcscf/cmd.c
+++ b/src/modules/ims_ipsec_pcscf/cmd.c
@@ -88,6 +88,8 @@ extern struct tm_binds tmb;
#define IPSEC_NOALIAS_SEARCH (1<<4)
/* if set - do not reset dst uri for IPsec forward */
#define IPSEC_NODSTURI_RESET (1<<5)
+/* if set - use user equipment client port as target for requests over TCP */
+#define IPSEC_TCPPORT_UEC (1<<6)
/* if set - delete unused tunnels before every registration */
#define IPSEC_CREATE_DELETE_UNUSED_TUNNELS 0x01
@@ -925,11 +927,20 @@ int ipsec_forward(struct sip_msg *m, udomain_t *d, int _cflags)
// for Request get the dest proto from the saved contact
dst_proto = pcontact->received_proto;
- // for Request sends from P-CSCF client port
- src_port = s->port_pc;
+ if(_cflags & IPSEC_TCPPORT_UEC) {
+ // for Request and TCP sends from P-CSCF server port, for Request and UDP sends from P-CSCF client port
+ src_port = dst_proto == PROTO_TCP ? s->port_ps : s->port_pc;
- // for Request sends to UE server port
- dst_port = s->port_us;
+ // for Request and TCP sends to UE client port, for Request and UDP sends to UE server port
+ dst_port = dst_proto == PROTO_TCP ? s->port_uc : s->port_us;
+
+ } else {
+ // for Request sends from P-CSCF client port
+ src_port = s->port_pc;
+
+ // for Request sends to UE server port
+ dst_port = s->port_us;
+ }
}
if(!(_cflags & IPSEC_NODSTURI_RESET)) {