Re: [sr-dev] [kamailio/kamailio] nat_traversal: TCP transport support (#2564)

2020-11-28 Thread sergey-safarov
yes, this also option.
Now I want to try keep NAT related function on the frontend proxy.
If no luck, then will try to send OPTION from the registrator.

-- 
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2564#issuecomment-735278191___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] nat_traversal: TCP transport support (#2564)

2020-11-28 Thread Daniel-Constantin Mierla
If you use `path` module in the proxy, then the keepalives from registrar go 
through it.

-- 
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2564#issuecomment-735275322___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] nat_traversal: TCP transport support (#2564)

2020-11-28 Thread sergey-safarov
Thanks, Daniel.
in my use case, the registrar and frontend proxy is different nodes.

-- 
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2564#issuecomment-735274193___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] nat_traversal: TCP transport support (#2564)

2020-11-28 Thread Daniel-Constantin Mierla
If you handle registrations on the same system, then the usrloc (starting with 
v5.4) can send SIP OPTIONS keepalive to any contact, no matter is udp/tcp/tls.

-- 
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2564#issuecomment-735273458___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] nat_traversal: TCP transport support (#2564)

2020-11-28 Thread sergey-safarov
Thank you Federico, looks a `tcp_keepalive_enable` is an appropriate function 
for this use case.

-- 
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2564#issuecomment-735269448___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] nat_traversal: TCP transport support (#2564)

2020-11-28 Thread sergey-safarov
Closed #2564.

-- 
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2564#event-4048178961___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] nat_traversal: TCP transport support (#2564)

2020-11-28 Thread sergey-safarov
If the client does not send TCP keep-alive SIP message or TCP session timer on 
NAT router is too low then we have an issue.

As a workaround, I can use the operation system keepalive on the server-side.
```
net.ipv4.tcp_keepalive_time = 75
```

-- 
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2564#issuecomment-735247057___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio/kamailio] nat_traversal: TCP transport support (#2564)

2020-11-28 Thread Juha Heinanen
sergey-safarov writes:

> In this case, the TCP session may be expired on the NAT device, and
> future calls to the user phone not possible.

Usually clients generate TCP keepalives and there is no need for
Kamailio proxy to do anything.

-- Juha

___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio/kamailio] nat_traversal: TCP transport support (#2564)

2020-11-28 Thread sergey-safarov
### Description

Typical client device located behind NAT. If the customer use TLS or TCP 
transport then `nat_keepalive` cannot be used.
Details at 
[nat_traversal.c#L1389-L1391](https://github.com/kamailio/kamailio/blob/master/src/modules/nat_traversal/nat_traversal.c#L1389-L1391)

In this case, the TCP session may be expired on the NAT device, and future 
calls to the user phone not possible.

### Expected behavior
Send keep-alive messages for clients connected via TLS and TCP transport after 
`nat_keepalive` function call.

 Actual observed behavior
Keep-alive messages do not send if phone connected via using TLS or TCP 
transport.

### Additional Information

  * **Kamailio Version** - output of `kamailio -v`

```
[root@localhost kamailio]# kamailio -v
version: kamailio 5.5.0-dev3 (x86_64/linux) e9624b
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: e9624b 
compiled on 04:01:18 Nov 10 2020 with gcc 8.3.1
```

* **Operating System**:

```
[root@localhost kamailio]# cat /etc/os-release 
NAME="CentOS Linux"
VERSION="8 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Linux 8 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://www.centos.org/";
BUG_REPORT_URL="https://bugs.centos.org/";

CENTOS_MANTISBT_PROJECT="CentOS-8"
CENTOS_MANTISBT_PROJECT_VERSION="8"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="8"
```


-- 
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/2564___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] nat_traversal: TCP transport support (#2564)

2020-11-28 Thread Federico Cabiddu
You can use tcpops tcp_enable_keepalive (
http://www.kamailio.org/docs/modules/devel/modules/tcpops.html#tcpops.f.tcp_keepalive_enable)
to enable tcp keepalive per connection.

On Sat, 28 Nov 2020, 16:47 sergey-safarov,  wrote:

> If the client does not send TCP keep-alive SIP message or TCP session
> timer on NAT router is too low then we have an issue.
>
> As a workaround, I can use the operation system keepalive on the
> server-side.
>
> net.ipv4.tcp_keepalive_time = 75
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> ,
> or unsubscribe
> 
> .
> ___
> Kamailio (SER) - Development Mailing List
> sr-dev@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
>
___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev