<!-- Kamailio Pull Request Template -->
<!--
IMPORTANT:
- for detailed contributing guidelines, read:
https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md
- pull requests must be done to master branch, unless they are backports
of fixes from master branch to a stable branch
- backports to stable branches must be done with 'git cherry-pick -x ...'
- code is contributed under BSD for core and main components (tm, sl, auth, tls)
- code is contributed GPLv2 or a compatible license for the other components
- GPL code is contributed with OpenSSL licensing exception
-->
#### Pre-Submission Checklist
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [x] Commit message has the format required by CONTRIBUTING guide
- [x] Commits are split per component (core, individual modules, libs, utils, ...)
- [x] Each component has a single commit (if not, squash them into one commit)
- [x] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change
- [ ] Small bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [ ] PR should be backported to stable branches
- [x] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2426
-- Commit Summary --
* ims_usrloc_pcscf: added a reverse searchin get_pcontact
* ims_registrar_pcscf: update_contacts get received from req
* ims_qos: extend get_pcontact with the new parameter.
* ims_ipsec_pcscf: extend get_pcontact with the new parameter.
-- File Changes --
M src/modules/ims_ipsec_pcscf/cmd.c (7)
M src/modules/ims_ipsec_pcscf/doc/ims_ipsec_pcscf_admin.xml (5)
M src/modules/ims_qos/cdpeventprocessor.c (2)
M src/modules/ims_qos/ims_qos_mod.c (2)
M src/modules/ims_qos/rx_aar.c (2)
M src/modules/ims_registrar_pcscf/notify.c (2)
M src/modules/ims_registrar_pcscf/save.c (20)
M src/modules/ims_registrar_pcscf/service_routes.c (8)
M src/modules/ims_usrloc_pcscf/udomain.c (20)
M src/modules/ims_usrloc_pcscf/udomain.h (2)
M src/modules/ims_usrloc_pcscf/usrloc.h (2)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2426.patchhttps://github.com/kamailio/kamailio/pull/2426.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/2426
Module: kamailio
Branch: master
Commit: e10dc0db1b890d6ae2067f2fbff803ba8f816b68
URL: https://github.com/kamailio/kamailio/commit/e10dc0db1b890d6ae2067f2fbff803b…
Author: Aleksandar Yosifov <alexyosifov(a)gmail.com>
Committer: Henning Westerholt <hw(a)skalatan.de>
Date: 2020-08-12T20:44:08+02:00
ims_ipsec_pcscf: extend get_pcontact with the new parameter.
- added a new bitwise value for _cflags in ipsec_forward.
- performing a reverse search for a contact in ipsec_forward
if the new flag IPSEC_REVERSE_SEARCH is set.
---
Modified: src/modules/ims_ipsec_pcscf/cmd.c
Modified: src/modules/ims_ipsec_pcscf/doc/ims_ipsec_pcscf_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/e10dc0db1b890d6ae2067f2fbff803b…
Patch: https://github.com/kamailio/kamailio/commit/e10dc0db1b890d6ae2067f2fbff803b…
---
diff --git a/src/modules/ims_ipsec_pcscf/cmd.c b/src/modules/ims_ipsec_pcscf/cmd.c
index 16a62f8e6e..e63e9315de 100644
--- a/src/modules/ims_ipsec_pcscf/cmd.c
+++ b/src/modules/ims_ipsec_pcscf/cmd.c
@@ -76,6 +76,7 @@ extern usrloc_api_t ul;
extern struct tm_binds tmb;
#define IPSEC_SEND_FORCE_SOCKET 0x01 /* if set - set send force socket for request messages */
+#define IPSEC_REVERSE_SEARCH 0x02 /* if set - start seraching from the last element */
int bind_ipsec_pcscf(ipsec_pcscf_api_t* api) {
if(!api){
@@ -663,7 +664,7 @@ int ipsec_create(struct sip_msg* m, udomain_t* d)
ul.lock_udomain(d, &ci.via_host, ci.via_port, ci.via_prot);
- if (ul.get_pcontact(d, &ci, &pcontact) != 0) {
+ if (ul.get_pcontact(d, &ci, &pcontact, 0) != 0) {
LM_ERR("Contact doesn't exist\n");
goto cleanup;
}
@@ -802,7 +803,7 @@ int ipsec_forward(struct sip_msg* m, udomain_t* d, int _cflags)
ul.lock_udomain(d, &ci.via_host, ci.via_port, ci.via_prot);
- if (ul.get_pcontact(d, &ci, &pcontact) != 0) {
+ if (ul.get_pcontact(d, &ci, &pcontact, _cflags & IPSEC_REVERSE_SEARCH) != 0) {
LM_ERR("Contact doesn't exist\n");
goto cleanup;
}
@@ -946,7 +947,7 @@ int ipsec_destroy(struct sip_msg* m, udomain_t* d)
ul.lock_udomain(d, &ci.via_host, ci.via_port, ci.via_prot);
- if (ul.get_pcontact(d, &ci, &pcontact) != 0) {
+ if (ul.get_pcontact(d, &ci, &pcontact, 0) != 0) {
LM_ERR("Contact doesn't exist\n");
goto cleanup;
}
diff --git a/src/modules/ims_ipsec_pcscf/doc/ims_ipsec_pcscf_admin.xml b/src/modules/ims_ipsec_pcscf/doc/ims_ipsec_pcscf_admin.xml
index 95b44f2c90..3d2a19efc9 100644
--- a/src/modules/ims_ipsec_pcscf/doc/ims_ipsec_pcscf_admin.xml
+++ b/src/modules/ims_ipsec_pcscf/doc/ims_ipsec_pcscf_admin.xml
@@ -243,8 +243,9 @@ ipsec_create("location");
stores the contacts.
</para>
<para>
- <emphasis>flags</emphasis> - Set send force socket for request messages.
- If 1 - set force socket for request messages. Useful for ipsec and TCP.
+ <emphasis>flags</emphasis> - bitwise flag:
+ 0x01 - set force socket for request messages. Useful for ipsec and TCP.
+ 0x02 - reverse search for a contact in the memory. Useful when contact alias is disabled.
This is an optional parameter, default value - 0.
</para>
</listitem>
<!-- Kamailio Pull Request Template -->
<!--
IMPORTANT:
- for detailed contributing guidelines, read:
https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md
- pull requests must be done to master branch, unless they are backports
of fixes from master branch to a stable branch
- backports to stable branches must be done with 'git cherry-pick -x ...'
- code is contributed under BSD for core and main components (tm, sl, auth, tls)
- code is contributed GPLv2 or a compatible license for the other components
- GPL code is contributed with OpenSSL licensing exception
-->
#### Pre-Submission Checklist
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [X] Commit message has the format required by CONTRIBUTING guide
- [X] Commits are split per component (core, individual modules, libs, utils, ...)
- [X] Each component has a single commit (if not, squash them into one commit)
- [X] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change
- [X] Small bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [ ] PR should be backported to stable branches
- [ ] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
`ctx` was not getting initialized with the result of `run_top_route()` execution preventing `drop();` to work in the `siptrace:msg` event route
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2431
-- Commit Summary --
* siptrace: fix run_top_route() call to set ctx
-- File Changes --
M src/modules/siptrace/siptrace.c (2)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2431.patchhttps://github.com/kamailio/kamailio/pull/2431.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/2431