Module: kamailio
Branch: master
Commit: 39c44dd769104c2cc3af6c3a11ec44287134894b
URL: https://github.com/kamailio/kamailio/commit/39c44dd769104c2cc3af6c3a11ec442…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2022-05-30T15:31:17+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/39c44dd769104c2cc3af6c3a11ec442…
Patch: https://github.com/kamailio/kamailio/commit/39c44dd769104c2cc3af6c3a11ec442…
---
diff --git a/src/modules/ims_ipsec_pcscf/README b/src/modules/ims_ipsec_pcscf/README
index f9e0d36d27..43c1886ba3 100644
--- a/src/modules/ims_ipsec_pcscf/README
+++ b/src/modules/ims_ipsec_pcscf/README
@@ -301,10 +301,14 @@ ipsec_create("location", "1");
Meaning of the parameters is as follows:
* domain - Logical domain within the registrar. If a database is used
then this must be name of the table which stores the contacts.
- flags - 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.
+ flags - 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.
+ + 0x04 - use destination URI for IPSec tunnel search. Useful for
+ routing requests within dialog.
+ This is an optional parameter, default value - 0.
Example 1.12. ipsec_forward
...
Module: kamailio
Branch: master
Commit: c0628e4e13bd95412e5f43dfe9a3e1d23aeebaaf
URL: https://github.com/kamailio/kamailio/commit/c0628e4e13bd95412e5f43dfe9a3e1d…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-05-30T15:18:35+02:00
ims_ipsec_pcscf: docs for new flag to use dst uri for ipsec tunnel search
---
Modified: src/modules/ims_ipsec_pcscf/doc/ims_ipsec_pcscf_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/c0628e4e13bd95412e5f43dfe9a3e1d…
Patch: https://github.com/kamailio/kamailio/commit/c0628e4e13bd95412e5f43dfe9a3e1d…
---
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 2ed0e2104b..d7314fa3e6 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
@@ -281,8 +281,27 @@ ipsec_create("location", "1");
</para>
<para>
<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.
+ <itemizedlist>
+ <listitem>
+ <para>
+ <emphasis>0x01</emphasis> - set force socket for request messages. Useful for ipsec and TCP.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>0x02</emphasis> - reverse search for a contact in the memory.
+ Useful when contact alias is disabled.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>0x04</emphasis> - use destination URI for IPSec tunnel search. Useful for
+ routing requests within dialog.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ <para>
This is an optional parameter, default value - 0.
</para>
</listitem>
### Description
Hello,
I have faced an issue when mhomed working well only for udp destinations, and I believe that it is a bug.
I have kamailio behind NAT with two network interfaces and I make a call from a softphone to kamailio and change $rd on kamailio side.
If kamailio forward call to the UDP destination, mhomed option chooses the correct Via and the correct interface for sending. But if the destination is tls, mhomed chooses first described listen interface from the config file (as described in the documentation.
#### The example
So in my example when I call to sip:111@kamailio_ip kamailio going to send this call to $rd="1.1.1.1" and set Via and Record-Route to 10.0.0.32 (it is ok, because IP route to 1.1.1.1 via 10.0.0.32)
when I call to sip:1111@kamailio_ip kamailio going to send this call to $rd="192.168.10.100:5061;transport=tls" BUT set Via and Record-Route to 10.0.0.32 (this is wrong because IP route to 192.168.10.100 is 192.168.10.145), but if in config file the first listen interface is 192.168.10.145, kamailio sends Via correct.
#### Networking
<img width="743" alt="image" src="https://user-images.githubusercontent.com/1487709/170417427-573f4038-b214-4…">
<img width="511" alt="image" src="https://user-images.githubusercontent.com/1487709/170417453-0a3925bf-bab4-4…">
#### Kamailio config
```
auto_aliases=yes
mhomed=1
tcp_connection_match=1 # I have tried with and without this option
listen=udp:10.0.0.32:5060
listen=tls:10.0.0.32:5061
listen=udp:192.168.10.145:5060
listen=tls:192.168.10.145:5061
.....
modparam("rr", "enable_full_lr", 1)
modparam("rr", "append_fromtag", 1)
#modparam("rr", "enable_double_rr", 2) # I have tried with and without this option
.....
# routing
if $rU == "111" {
$rd="1.1.1.1";
} else {
$rd="192.168.10.100:5061;transport=tls";
}
route(RELAY);
```
#### Reproduction
I have created a testing stand with almost default kamailio config so I can give full ssh access if you need it.
I just call from linphone to sip:111@server_ip and sip:1111@server_ip
#### SIP Traffic
<img width="554" alt="image" src="https://user-images.githubusercontent.com/1487709/170420217-882d236b-243f-4…">
```
INVITE sip:111@1.1.1.1 SIP/2.0
Record-Route: <sip:10.0.0.32;lr=on;ftag=GRIfZymtj;nat=yes>
Via: SIP/2.0/UDP 10.0.0.32;branch=z9hG4bKc662.d4fa02b9991c45869263fc4359af8d84.0
Via: SIP/2.0/UDP 10.5.7.0:52360;received=210.1.88.115;branch=z9hG4bK.mH58YeIkv;rport=35775
From: <sip:akam@10.5.7.0>;tag=GRIfZymtj
To: sip:111@130.61.43.152
CSeq: 20 INVITE
Call-ID: FR3BLskG9-
Max-Forwards: 69
Supported: replaces, outbound, gruu
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO, PRACK, UPDATE
Content-Type: application/sdp
Content-Length: 613
```
<img width="584" alt="image" src="https://user-images.githubusercontent.com/1487709/170420360-a7889e57-b072-4…">
```
INVITE sip:1111@192.168.10.100:5061;transport=tls SIP/2.0
Record-Route: <sip:10.0.0.32:5061;transport=tls;r2=on;lr=on;ftag=cIRc7nj00;nat=yes>
Record-Route: <sip:10.0.0.32;r2=on;lr=on;ftag=cIRc7nj00;nat=yes>
Via: SIP/2.0/TLS 10.0.0.32:5061;branch=z9hG4bK6a2.4ff69c3e304e238936a5528da681cd49.0
Via: SIP/2.0/UDP 10.5.7.0:52360;received=210.1.88.115;branch=z9hG4bK.BPohOzqtI;rport=35775
From: <sip:akam@10.5.7.0>;tag=cIRc7nj00
To: sip:1111@130.61.43.152
CSeq: 20 INVITE
Call-ID: 40PEbKneY0
```
### Additional Information
```
root@mhomed-tls:/etc/kamailio# kamailio -v
version: kamailio 5.5.4 (x86_64/linux)
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLOCKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled with gcc 9.3.0
```
* **Operating System**:
```
Ubuntu 20.04.4 LTS
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3124
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3124(a)github.com>
Input ik,ck keys for add_sa() function are not zero terminated that cause
- des3_ede encryption key expansion possible buffer overflow.
Also:
- sha1 authentication key expansion has been corrected.
<!-- 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 -->
- [X] 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/3121
-- Commit Summary --
* ims_ipsec_pcscf: ik and ck keys expansion fixes
-- File Changes --
M src/modules/ims_ipsec_pcscf/ipsec.c (50)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3121.patchhttps://github.com/kamailio/kamailio/pull/3121.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3121
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3121(a)github.com>
Module: kamailio
Branch: master
Commit: 6e7b6cfabba6774627f942d7f02e1adf62bf7797
URL: https://github.com/kamailio/kamailio/commit/6e7b6cfabba6774627f942d7f02e1ad…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-05-24T12:21:53+02:00
auth_identity: docs - type for accept_pem_certs param
---
Modified: src/modules/auth_identity/doc/auth_identity_params.xml
---
Diff: https://github.com/kamailio/kamailio/commit/6e7b6cfabba6774627f942d7f02e1ad…
Patch: https://github.com/kamailio/kamailio/commit/6e7b6cfabba6774627f942d7f02e1ad…
---
diff --git a/src/modules/auth_identity/doc/auth_identity_params.xml b/src/modules/auth_identity/doc/auth_identity_params.xml
index a252bbed6b..aefb49cdd0 100644
--- a/src/modules/auth_identity/doc/auth_identity_params.xml
+++ b/src/modules/auth_identity/doc/auth_identity_params.xml
@@ -190,11 +190,11 @@ modparam("auth_identity","cainfo_path","/etc/ssl/certs/ca-certificates.crt")
</section>
<section id="accept_pem_certs">
- <title><varname>accept_pem_certs</varname> ([0|1])</title>
+ <title><varname>accept_pem_certs</varname> (int)</title>
<para>Note: this parameter is for verifier service.</para>
<para>
Enables the acquired certificate processing if it is in PEM
- format.
+ format. Value can be 0 or 1.
</para>
<para>
This parameter is optional. The default value is "0".
<!-- 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 -->
Implement reuse of IPSec tunnels when UEs are re-registering or de-registering, optimizing tunnel creations and key exchanges, and (hopefully) performance. This is a refactored version of PR #3029. I hope that all the issues @alexyosifov found have been fixed.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3094
-- Commit Summary --
* ims_ipsec_pcscf: fix issues with UEs and ipsec tunnel
-- File Changes --
M src/modules/ims_ipsec_pcscf/cmd.c (151)
M src/modules/ims_ipsec_pcscf/ims_ipsec_pcscf_mod.c (12)
M src/modules/ims_ipsec_pcscf/ipsec.c (29)
D src/modules/ims_ipsec_pcscf/port_gen.c (227)
D src/modules/ims_ipsec_pcscf/port_gen.h (41)
M src/modules/ims_ipsec_pcscf/sec_agree.c (33)
M src/modules/ims_ipsec_pcscf/spi_gen.c (112)
M src/modules/ims_ipsec_pcscf/spi_gen.h (6)
M src/modules/ims_ipsec_pcscf/spi_list.c (62)
M src/modules/ims_ipsec_pcscf/spi_list.h (12)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3094.patchhttps://github.com/kamailio/kamailio/pull/3094.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3094
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3094(a)github.com>
Module: kamailio
Branch: master
Commit: 59fd5cd7053df2941aa6df7270ed7a021ce1f62d
URL: https://github.com/kamailio/kamailio/commit/59fd5cd7053df2941aa6df7270ed7a0…
Author: Kristiyan Peychev <97663519+kristiyan-peychev-flolive(a)users.noreply.github.com>
Committer: GitHub <noreply(a)github.com>
Date: 2022-05-24T10:39:47+02:00
IMS, P-CSCF: fix issues with UEs and ipsec tunnel (#3094)
* ims_ipsec_pcscf: fix issues with UEs and ipsec tunnel
UEs were not sending certain replies through the ipsec tunnel
* ims_ipsec_pcscf: fix issues pointed out in code review
Remove error logs which were not errors at all.
Fix issue in clean_spi_list where the free SPI list would get completely wiped.
* ims_ipsec_pcscf: lower log severity from error to info
Co-authored-by: Teodor Mihov <teodor.mihov(a)flolive.net>
---
Modified: src/modules/ims_ipsec_pcscf/cmd.c
Modified: src/modules/ims_ipsec_pcscf/doc/ims_ipsec_pcscf_admin.xml
Modified: src/modules/ims_ipsec_pcscf/ims_ipsec_pcscf_mod.c
Modified: src/modules/ims_ipsec_pcscf/ipsec.c
Modified: src/modules/ims_ipsec_pcscf/sec_agree.c
Modified: src/modules/ims_ipsec_pcscf/spi_gen.c
Modified: src/modules/ims_ipsec_pcscf/spi_gen.h
Modified: src/modules/ims_ipsec_pcscf/spi_list.c
Modified: src/modules/ims_ipsec_pcscf/spi_list.h
Removed: src/modules/ims_ipsec_pcscf/port_gen.c
Removed: src/modules/ims_ipsec_pcscf/port_gen.h
---
Diff: https://github.com/kamailio/kamailio/commit/59fd5cd7053df2941aa6df7270ed7a0…
Patch: https://github.com/kamailio/kamailio/commit/59fd5cd7053df2941aa6df7270ed7a0…
Kamailio v5.6.0 is out – it comes with 7 new modules and a considerable
set of improvements touching again more than 90 existing modules.
You can read detailed release notes at:
  * https://www.kamailio.org/w/kamailio-v5-6-0-release-notes/
Many thanks to all developers and community members that made possible
this release.
v5.6.0 brings more flexibility and optimizations across many components,
plenty of new variables and transformations, load balancer enhancements,
generic iterators for SIP headers and body lines, alternative http
client, NATS PubSub connector, improvements to STIR/SHAKEN, IMS/VoLTE,
rtpengine and tls as well as more functions exported to KEMI interface
... just to list only a few here. Enjoy Kamailio v5.5.0!
Thank you for flying Kamailio!
Daniel
--
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - Online: June 20-23, 2022
* https://www.asipto.com/sw/kamailio-advanced-training-online/
Hello,
with some effort directed lately to convert the wiki content to markdown
files and host them on github, it's time to now to nail down the path to
release nest major release for Kamailio, respectively v5.6.0.
What's new in this major release as well as upgrade guidelines have to
be built, but I hope to be done in time to release Kamailio v5.6.0
either on Monday, June 23, 2022 or on Wednesday, June 25, 2022. Should
anyone consider a different release planning, let's discuss it.
If anyone wants to help with them, the content has to be added to the
github wiki repository:
 * https://github.com/kamailio/kamailio-wiki
If not there, new files have to be created and linked from the main page.
The wiki is built with mkdocs into html and made available for browsing at:
 * https://kamailio.org/wikidocs/
Cheers,
Daniel
--
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - Online: June 20-23, 2022
* https://www.asipto.com/sw/kamailio-advanced-training-online/
### Description
I noticed at least one regression while testing out kamailio 5.6.0: the same configuration yields a different result after upgrading from 5.5.4. More specifically, this xlog line/statement:
```
xlog("L_CRIT", "vn is $vn(cli_164_src_noccgr), to int is $(vn(cli_164_src_noccgr){s.int})\n");
```
Prints the following in syslog for `$vn(cli_164_src_noccgr) = "2152157200"`:
* On 5.5.4: `vn is 2152157200, to int is 2152157200`
* On 5.6.0~rc1: `vn is 2152157200, to int is`
I've only tested this with a couple of values and it doesn't always happen, for example for `$vn(cli_164_src_noccgr) = "2103260000"` the issue doesn't manifest.
Only thing I could think of is 2103260000 can be represented (unsigned) by 31 bits, whereas you need 32 bits for 2152157200? I skimmed over pv_trans.c and there weren't any obvious commits that could take the blame, at least not to me. Perhaps this is a compiler/glibc thing?
### Troubleshooting
#### Reproduction
Try the transformation above with various values for the pseudovariable being transformed, I guess.
<!--
If the issue can be reproduced, describe how it can be done.
-->
### Additional Information
```
version: kamailio 5.6.0-rc1 (x86_64/linux)
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLOCKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled with gcc 10.2.1
```
* **Operating System**:
```
Linux sbcprov0-stage-lhe0-cn1 5.10.0-10-amd64 #1 SMP Debian 5.10.84-1 (2021-12-08) x86_64 GNU/Linux
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3116
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3116(a)github.com>
benign const qualifiers in inline functions
<!-- 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
- [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/3120
-- Commit Summary --
* core: const correctness
-- File Changes --
M src/core/ip_addr.h (12)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3120.patchhttps://github.com/kamailio/kamailio/pull/3120.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3120
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3120(a)github.com>
Hello,
this seems to be caused from 7c347e244cf761d0:
dialog.c: In function ‘ki_dlg_get_var’:
dialog.c:1552:51: error: ‘k’ undeclared (first use in this function)
1552 | val = ki_dlg_get_var_helper(msg, &sc, &sf, &st, &k);
| ^
dialog.c:1552:51: note: each undeclared identifier is reported only once for each function it appears in
dialog.c:1552:35: warning: passing argument 2 of ‘ki_dlg_get_var_helper’ from incompatible pointer type [-Wincompatible-pointer-types]
1552 | val = ki_dlg_get_var_helper(msg, &sc, &sf, &st, &k);
| ^~~
[..]
make[2]: *** [../../Makefile.rules:100: dialog.o] Error 1
Cheers,
Henning
From: Henning Westerholt <notifications(a)github.com>
Sent: Friday, May 20, 2022 6:42 PM
To: Kamailio Devel List <sr-dev(a)lists.sip-router.org>
Cc: Ci activity <ci_activity(a)noreply.github.com>
Subject: [kamailio/kamailio] Run failed: build - master (130ce1b)
[GitHub]
[kamailio/kamailio] build workflow run
[https://github.githubassets.com/images/email/icons/actions.png]
build: Some jobs were not successful
View workflow run<https://github.com/kamailio/kamailio/actions/runs/2359532599>
[build (bullseye, gcc)]
build / build (bullseye, gcc)
Failed in 2 minutes and 29 seconds
[annotations for build / build (bullseye, gcc)]11 <https://github.com/kamailio/kamailio/actions/runs/2359532599>
[build (bullseye, clang)]
build / build (bullseye, clang)
Cancelled
[annotations for build / build (bullseye, clang)]2 <https://github.com/kamailio/kamailio/actions/runs/2359532599>
[build (sid, gcc)]
build / build (sid, gcc)
Failed in 2 minutes and 35 seconds
[annotations for build / build (sid, gcc)]13 <https://github.com/kamailio/kamailio/actions/runs/2359532599>
[build (sid, clang)]
build / build (sid, clang)
Cancelled
[annotations for build / build (sid, clang)]2 <https://github.com/kamailio/kamailio/actions/runs/2359532599>
—
You are receiving this because this workflow ran on your branch.
Manage your GitHub Actions notifications<https://github.com/settings/notifications>
GitHub, Inc. ・88 Colin P Kelly Jr Street ・San Francisco, CA 94107
Module: kamailio
Branch: master
Commit: 3efc0c1093ed3c9b5a11e40e4ccc65c93f4627a4
URL: https://github.com/kamailio/kamailio/commit/3efc0c1093ed3c9b5a11e40e4ccc65c…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2022-05-20T13:31:17+02:00
modules: readme files regenerated - registrar ... [skip ci]
---
Modified: src/modules/registrar/README
---
Diff: https://github.com/kamailio/kamailio/commit/3efc0c1093ed3c9b5a11e40e4ccc65c…
Patch: https://github.com/kamailio/kamailio/commit/3efc0c1093ed3c9b5a11e40e4ccc65c…
---
diff --git a/src/modules/registrar/README b/src/modules/registrar/README
index 22483876ad..bf0a663710 100644
--- a/src/modules/registrar/README
+++ b/src/modules/registrar/README
@@ -96,6 +96,7 @@ Bogdan-Andre Iancu
4.9. reg_fetch_contacts(domain, uri, profile)
4.10. reg_free_contacts(profile)
4.11. reg_send_reply()
+ 4.12. reg_from_user(ultable, uri, mode)
5. Event Routes
@@ -162,8 +163,9 @@ Bogdan-Andre Iancu
1.43. reg_fetch_contacts usage
1.44. reg_free_contacts usage
1.45. reg_send_reply usage
- 1.46. event_route[usrloc:contact-expired] usage
- 1.47. $ulc(name) usage
+ 1.46. reg_from_user usage
+ 1.47. event_route[usrloc:contact-expired] usage
+ 1.48. $ulc(name) usage
Chapter 1. Admin Guide
@@ -230,6 +232,7 @@ Chapter 1. Admin Guide
4.9. reg_fetch_contacts(domain, uri, profile)
4.10. reg_free_contacts(profile)
4.11. reg_send_reply()
+ 4.12. reg_from_user(ultable, uri, mode)
5. Event Routes
@@ -991,6 +994,7 @@ kamcmd cfg.set_now_int registrar use_expired_contacts 0
4.9. reg_fetch_contacts(domain, uri, profile)
4.10. reg_free_contacts(profile)
4.11. reg_send_reply()
+ 4.12. reg_from_user(ultable, uri, mode)
4.1. save(domain, [, flags [, uri]])
@@ -1293,6 +1297,30 @@ save("location", "0x2");
reg_send_reply();
...
+4.12. reg_from_user(ultable, uri, mode)
+
+ The function returns true if the SIP message comes from the user
+ identified by 'uri' parameter by matching the associated location
+ records. The matching is done with the field 'received' if it is set,
+ otherwise with the contact address.
+
+ Meaning of the parameters is as follows:
+ * ultable - user location table (e.g., 'location')
+ * uri - SIP URI to identify the location records to match against.
+ * mode - matching mode (int) - host part (IP address) is matched
+ always. If mode has bit 1 set (value 1), then the port is matched
+ as well. If mode has bit 2 set (value 2), then the protocol is
+ matched as well.
+
+ This function can be used from ANY_ROUTE.
+
+ Example 1.46. reg_from_user usage
+...
+if(reg_from_user("location", "sip:alice@server.com", "0")) {
+ # message coming from where 'alice' sent before a REGISTER request
+}
+...
+
5. Event Routes
5.1. event_route[usrloc:contact-expired]
@@ -1302,7 +1330,7 @@ reg_send_reply();
Executed when a contact in location table has expired. The variable
$ulc(exp=>...) is filled with the attributes of the expired contact.
- Example 1.46. event_route[usrloc:contact-expired] usage
+ Example 1.47. event_route[usrloc:contact-expired] usage
...
event_route[usrloc:contact-expired] {
xlog("expired contact for $ulc(exp=>aor)\n");
@@ -1376,7 +1404,7 @@ event_route[usrloc:contact-expired] {
The pseudo-variable accepts positive index value to access a specific
contact record.
- Example 1.47. $ulc(name) usage
+ Example 1.48. $ulc(name) usage
...
if(reg_fetch_contacts("location", "$fu", "caller"))
{
Module: kamailio
Branch: master
Commit: f0bf4cebef916887cd5196dce0521d4784904ab8
URL: https://github.com/kamailio/kamailio/commit/f0bf4cebef916887cd5196dce0521d4…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-05-20T13:26:00+02:00
registrar: docs for reg_from_user() function
---
Modified: src/modules/registrar/doc/registrar_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/f0bf4cebef916887cd5196dce0521d4…
Patch: https://github.com/kamailio/kamailio/commit/f0bf4cebef916887cd5196dce0521d4…
---
diff --git a/src/modules/registrar/doc/registrar_admin.xml b/src/modules/registrar/doc/registrar_admin.xml
index d8a3c88b57..c402ab4b20 100644
--- a/src/modules/registrar/doc/registrar_admin.xml
+++ b/src/modules/registrar/doc/registrar_admin.xml
@@ -1813,6 +1813,52 @@ save("location", "0x2");
...
reg_send_reply();
...
+</programlisting>
+ </example>
+ </section>
+ <section id="registrar.f.reg_from_user">
+ <title>
+ <function moreinfo="none">reg_from_user(ultable, uri, mode)</function>
+ </title>
+ <para>
+ The function returns true if the SIP message comes from the user
+ identified by 'uri' parameter by matching the associated location
+ records. The matching is done with the field 'received' if it is set,
+ otherwise with the contact address.
+ </para>
+ <para>Meaning of the parameters is as follows:</para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <emphasis>ultable</emphasis> - user location table (e.g., 'location')
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>uri</emphasis> - SIP URI to identify the location records
+ to match against.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>mode</emphasis> - matching mode (int) - host part (IP address)
+ is matched always. If mode has bit 1 set (value 1), then the port is
+ matched as well. If mode has bit 2 set (value 2), then the protocol
+ is matched as well.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ This function can be used from ANY_ROUTE.
+ </para>
+ <example>
+ <title><function>reg_from_user</function> usage</title>
+ <programlisting format="linespecific">
+...
+if(reg_from_user("location", "sip:alice@server.com", "0")) {
+ # message coming from where 'alice' sent before a REGISTER request
+}
+...
</programlisting>
</example>
</section>
It seems that TOPOS is not working properly on RE-INVITE and stop masking IP and contact on some RE-INVITE.
When a RE-INVITE is send with Kamailio IP as Request-URI TOPOS is not operating.
Note : we are using the HTABLE trick to rewrite $ru and match the call but we would need to have TOPOS re-evaluating the dialog once done.
We use a standard configuration with 2 modifications.
1) in route[DISPATCH] to set the HTABLE
if(is_method("INVITE")) {
$sht(ct=>$ci::$ft) = $sel(contact.uri);
}
2) in route[WITHINDLG] to find the call if R-URI = myself
if(has_totag() && uri==myself) {
if($sht(ct=>$ci::$ft) != $null && $T_reply_code > 400) $shtex(ct=>$ci::$ft) = 10 ;
if($sht(ct=>$ci::$tt) != $null) {
$ru = $sht(ct=>$ci::$tt);
if (is_method("BYE")) $shtex(ct=>$ci::$tt) = 10 ;
route(RELAY);
}
}
As you can see in the PCAP the RE-INVITE goes directly to calling stating with the Contact not updated and the 200 OK is also sent to called party with wrong Contact info too.
[topos-issue.zip](https://github.com/kamailio/kamailio/files/8730489/topos-i…
This behavior breaks the BYE procedure.
Any advice ?
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3118
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3118(a)github.com>