<!-- 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 -->
This feature was made half year ago. We would like to have inside location record address of the host where kamailio is installed. However when we installed it behind NAT we got private address in this field.
This feature introduces possibility to set a socket string which will be written into location record. It could be public address instead address on which the register request was received. The default value is NULL and it works as usual. The feature was installed on our production servers in April and since that time it works well. I would like to propose this feature to others, because it could be useful.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2498
-- Commit Summary --
* registrar: added new parameter sock_addr
-- File Changes --
M src/modules/registrar/doc/registrar_admin.xml (25)
M src/modules/registrar/registrar.c (2)
M src/modules/registrar/registrar.h (1)
M src/modules/registrar/save.c (39)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2498.patchhttps://github.com/kamailio/kamailio/pull/2498.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/2498
Module: kamailio
Branch: master
Commit: b495a00c9a6fb2e073e7bd2a2b394facc9d76ea5
URL: https://github.com/kamailio/kamailio/commit/b495a00c9a6fb2e073e7bd2a2b394fa…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-10-14T11:34:03+02:00
registrar: docs updated to reflect sock_mode parameter
---
Modified: src/modules/registrar/doc/registrar_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/b495a00c9a6fb2e073e7bd2a2b394fa…
Patch: https://github.com/kamailio/kamailio/commit/b495a00c9a6fb2e073e7bd2a2b394fa…
---
diff --git a/src/modules/registrar/doc/registrar_admin.xml b/src/modules/registrar/doc/registrar_admin.xml
index 52559a638f..4fb1e8a5e8 100644
--- a/src/modules/registrar/doc/registrar_admin.xml
+++ b/src/modules/registrar/doc/registrar_admin.xml
@@ -535,26 +535,27 @@ modparam("registrar", "sock_hdr_name", "Sock-Info")
</example>
</section>
- <section id="registrar.p.use_advertised_address">
- <title><varname>use_advertised_address</varname> (integer)</title>
+ <section id="registrar.p.sock_mode">
+ <title><varname>sock_mode</varname> (integer)</title>
<para>
- This parameter can be used to override value written into socket field when contact is saved.
- If set to 1, advertised address will be written instead local listen socket.
+ If set to 1, the server stores the advertised address in socket field,
+ instead of bind address.
</para>
<para>
- This could be useful when kamailio is installed behind NAT and it is necessary to store its public IP
- instead socket on which the register request was received.
+ This could be useful when kamailio is installed behind NAT and it is
+ necessary to store its public IP instead socket on which the register
+ request was received.
</para>
<para>
<emphasis>
- Default value is 0 (disabled).
+ Default value is 0 (store bind address).
</emphasis>
</para>
<example>
- <title>Set <varname>use_advertised_address</varname> parameter</title>
+ <title>Set <varname>sock_mode</varname> parameter</title>
<programlisting format="linespecific">
...
-modparam("registrar", "use_advertised_address", 1)
+modparam("registrar", "sock_mode", 1)
...
</programlisting>
</example>
Module: kamailio
Branch: master
Commit: e3ec71b45181c2413b4aba4e2ea5e1b371a6da56
URL: https://github.com/kamailio/kamailio/commit/e3ec71b45181c2413b4aba4e2ea5e1b…
Author: Konstantin <piligrim_pk(a)mail.ru>
Committer: GitHub <noreply(a)github.com>
Date: 2020-10-14T11:22:20+02:00
registrar: added option to store advertised address in socket field (#2498)
* registrar: added new parameter sock_addr
- override socket address on which the register request was received
- default is NULL - store local socket address
- usefull when kamailio is behind NAT and it is necessary to store public instead private address
* registrar: replaced dynamically allocated var with static var
Made refactoring of proposed solution.
* registrar: socket field in location db will be initialized by advertise address from listen parameter
According to code review recommendations I changed my solution - removed new config file parameter and
use advertise address from listen parameter to initialized received socket which is written to
location db inside registration record.
* registrar: added additional check socket bind_address for null
* registrar: introduced config parameter to enable/disable socket advertised address feature
---
Modified: src/modules/registrar/doc/registrar_admin.xml
Modified: src/modules/registrar/registrar.c
Modified: src/modules/registrar/registrar.h
Modified: src/modules/registrar/save.c
---
Diff: https://github.com/kamailio/kamailio/commit/e3ec71b45181c2413b4aba4e2ea5e1b…
Patch: https://github.com/kamailio/kamailio/commit/e3ec71b45181c2413b4aba4e2ea5e1b…
<!-- 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 -->
- [*] Commit message has the format required by CONTRIBUTING guide
- [*] Commits are split per component (core, individual modules, libs, utils, ...)
- [*] Each component has a single commit (if not, squash them into one commit)
- [*] 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)
- [*] 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 -->
This PR adds crypto_hmac_sha256() function that can be used for JWT (JSON Web Token) authentication.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2505
-- Commit Summary --
* crypto: add crypto_hmac_sha256() function
-- File Changes --
M src/modules/crypto/crypto_mod.c (115)
M src/modules/crypto/doc/crypto_admin.xml (24)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2505.patchhttps://github.com/kamailio/kamailio/pull/2505.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/2505
<!-- 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
- [ ] 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)
- [ ] 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 -->
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2500
-- Commit Summary --
* Make the FLAGS declaration slightly clearer
-- File Changes --
M etc/kamailio.cfg (3)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2500.patchhttps://github.com/kamailio/kamailio/pull/2500.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/2500