Module: kamailio
Branch: master
Commit: 8bba208fe6ae7ccb4c92362b8c33f1530b9f56da
URL: https://github.com/kamailio/kamailio/commit/8bba208fe6ae7ccb4c92362b8c33f15…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2019-03-21T14:09:43+01:00
etc/kamailio.cfg: no connect for forwarding requests withing dialog
- connections should be opened during the dialog creation and given that
tcp/tls source port is is most of the cases ephemeral, trying to connect
back fails
---
Modified: etc/kamailio.cfg
---
Diff: https://github.com/kamailio/kamailio/commit/8bba208fe6ae7ccb4c92362b8c33f15…
Patch: https://github.com/kamailio/kamailio/commit/8bba208fe6ae7ccb4c92362b8c33f15…
---
diff --git a/etc/kamailio.cfg b/etc/kamailio.cfg
index 6136926265..9b8cc526f7 100644
--- a/etc/kamailio.cfg
+++ b/etc/kamailio.cfg
@@ -556,6 +556,10 @@ route[RELAY] {
route[REQINIT] {
# no connect for sending replies
set_reply_no_connect();
+ if(has_totag()) {
+ # no connect for requests within dialog
+ set_forward_no_connect();
+ }
#!ifdef WITH_ANTIFLOOD
# flood detection from same IP and traffic ban for a while
@@ -826,7 +830,7 @@ route[NATMANAGE] {
}
if(isbflagset(FLB_NATB)) {
- # message in a dialog involving NAT traversal - no connect
+ # no connect message in a dialog involving NAT traversal
set_forward_no_connect();
}
#!endif
### Description
The `advertise` option in a `listen` parameter seems to only allow the following syntax:
`advertise ip_or_host:port`
The `advertise ip_or_host` syntax is not allowed and gives the following error:
> CRITICAL: <core> [core/cfg.y:3507]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 49, column 1-6: ip address, interface name or hostname expected
This can be blocking when using DNS SRV features in order to retrieve both host and port to send the SIP messages: when a port is present in the record-route/via headers no DNS SRV are done.
So it prevents from doing some DNS-based load-balancing / failover things.
### Troubleshooting
We get the same behaviour with using the deprecated `advertised_address` parameter: default port is set by Kamailio (because it is not possible to force a _null_ value for `advertised_port`) in the _Via_ header (but does not seem to affect the _R-R_ header).
The advertised address can only be forced for the _Record-Route_ header using the `record_route_advertised_address` function in the script.
### Additional Information
Tested with last Kamailio release on Debian 9.8
```
version: kamailio 5.2.1 (x86_64/linux)
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, 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_BLACKLIST, HAVE_RESOLV_RES
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 6.3.0
```
--
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/issues/1884
Am Mittwoch, 20. März 2019, 18:14:38 CET schrieb Valentin Christoph:
(add sr-dev list to CC)
Hello Christoph,
thank you in advance for the contribution.
> We had implemented a few additions for third party registration, based on
> kamailio 5.1.0 IMS modules.
>
> * either service info OR original REGISTER request or original 200 OK
> can be added as body to the 3rd party Registration Request, if indicated by
> the HSS in the user data
> * change: S-CSCF does not check for TEL URI, before it sends P-Associated
> URI to AS (SIP URIs are also sent)
>
> We would like to provide a pull request within the next days or week to have
> the changes as basis for a change in release 5.3.x.
>
> Drawback: probably our solution would need to be slightly modified, because
> we removed the check for TEL URI, if the S-CSCF sends the P-Associated-URI
> header to the AS in the 3rd party register request (maybe introduce a
> module parameter?).
>
> Any comments? Would it be reviewed and maybe taken for 5.3?
As the patch set is not yet available I can't comment much on the change right
now.
If your additions or extensions cause an in-compatible change to the existing
behavior, the addition of a module parameter to control this is indeed
recommended. Another option (e.g. if you extend a module function) is to
provide a new version of the function with the new or changed behavior.
We will review all pull requests. :-) If they add new functionality or extend
existing functionality in a meaningful way they will be usually merged into
git master. This is then the base for the next stable release 5.3.
Looking forward to your pull request,
Henning
--
Henning Westerholt - https://skalatan.de/blog/
Kamailio services - https://skalatan.de/services