Hello,

 

I’m running Kamailio Version 5.3.2 on Ubuntu 20.04. Here my build information:

 

version: kamailio 5.3.2 (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_BLACKLIST, 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.2.1

 

I have the following configuration set in my kamalio.cfg file:

 

##!define WITH_MYSQL

##!define WITH_AUTH

##!define WITH_USRLOCDB

##!define WITH_TLS

##!define WITH_HOMER

##!define WITH_WEBSOCKETS

##!define WITH_ANTIFLOOD

##!define WITH_IPV6

##!define WITH_BRIDGE_ON_FAIL

##!define WITH_LOCALHOST_WS

##!define WITH_LOCALHOST_SIP

 

#!substdef "!MY_SIP_PORT!5060!g"

#!substdef "!MY_SIPS_PORT!5061!g"

#!substdef "!MY_WS_PORT!8088!g"

#!substdef "!MY_WSS_PORT!8089!g"

 

#!substdef "!MY_LOG_FACILITY!LOG_DAEMON!g"

 

#!substdef "!MY_IP4_ADDR!172.16.0.57!g"

#!substdef "!IP4_LOCALHOST!127.0.0.1!g"

#!substdef "!MY_WS4_ADDR!tcp:MY_IP4_ADDR:MY_WS_PORT!g"

#!substdef "!MY_WSS4_ADDR!tls:MY_IP4_ADDR:MY_WSS_PORT!g"

#!substdef "!LOCALHOST_WS4_ADDR!tcp:IP4_LOCALHOST:MY_WS_PORT!g"

#!substdef "!LOCALHOST_WSS4_ADDR!tls:IP4_LOCALHOST:MY_WSS_PORT!g"

 

#!ifdef WITH_IPV6

#!substdef "!MY_IP6_ADDR![fe80::d6e4:2f5f:e5b7:7dff]!g"

#!substdef "!IP6_LOCALHOST![::1]!g"

#!substdef "!MY_WS6_ADDR!tcp:MY_IP6_ADDR:MY_WS_PORT!g"

#!substdef "!MY_WSS6_ADDR!tls:MY_IP6_ADDR:MY_WSS_PORT!g"

#!substdef "!LOCALHOST_WS6_ADDR!tcp:IP6_LOCALHOST:MY_WS_PORT!g"

#!substdef "!LOCALHOST_WSS6_ADDR!tls:IP6_LOCALHOST:MY_WSS_PORT!g"

#!endif

 

#!substdef "!MY_DOMAIN!rtpengine.kombea.io!g"

debug=10         // debug level (cmd line: -dddddddddd)

children=4

#fork=yes

force_rport=yes // Add recieved port to VIA

#log_stderror=no        // (cmd line: -E)

 

// Uncomment these lines to enter debugging mode

fork=no

log_stderror=yes

 

check_via=no    // (cmd. line: -v)

dns=no          // (cmd. line: -r)

rev_dns=no      // (cmd. line: -R)

 

log_facility=MY_LOG_FACILITY

 

// Define the listening ports and addresses

port=MY_SIP_PORT

tls_port_no=MY_SIPS_PORT

 

 

// Define TCP parameters

tcp_children=4

tcp_no_connect=no

tcp_rd_buf_size=16384

tcp_max_connections=2048

tcp_connection_lifetime=3605

disable_tcp=no

#!ifdef WITH_TLS

enable_tls=yes

#!endif

 

 

listen=MY_IP4_ADDR

#!ifdef WITH_LOCALHOST_SIP

listen=IP4_LOCALHOST

#!endif

#!ifdef WITH_IPV6

listen=MY_IP6_ADDR

#!ifdef WITH_LOCALHOST_SIP

listen=IP6_LOCALHOST

#!endif

#!endif

 

#!ifdef WITH_WEBSOCKETS

listen=MY_WS4_ADDR

#!ifdef WITH_LOCALHOST_WS

listen=LOCALHOST_WS4_ADDR

#!endif

#!ifdef WITH_IPV6

listen=MY_WS6_ADDR

#!ifdef WITH_LOCALHOST_WS

listen=LOCALHOST_WS6_ADDR

#!endif

#!endif

#!ifdef WITH_TLS

listen=MY_WSS4_ADDR

#!ifdef WITH_LOCALHOST_WS

listen=LOCALHOST_WSS4_ADDR

#!endif

#!ifdef WITH_IPV6

listen=MY_WSS6_ADDR

#!ifdef WITH_LOCALHOST_WS

listen=LOCALHOST_WSS6_ADDR

#!endif

#!endif

#!endif

#!endif

 

force_rport=yes // Add received port to VIA

 

loadmodule "pv.so"          // Pseudo-Variable support

loadmodule "xlog.so"        // Formatted logging support

loadmodule "sl.so"          // Stateless request handling

loadmodule "siputils.so"    // SIP utility helpers

loadmodule "sanity.so"      // Sanity check

loadmodule "maxfwd.so"      // Support for Max-Forward header

loadmodule "textops.so"     // Text operations on SIP messages

loadmodule "textopsx.so"    // Extended Text operations on SIP messages

loadmodule "sdpops.so"      // SDP operations

loadmodule "nathelper.so"   // NAT traversal helpers

loadmodule "rr.so"          // Record Route handling

loadmodule "outbound.so"    // Outbound support

loadmodule "path.so"        // Path handling

 

#!ifdef WITH_TLS

loadmodule "tls.so"         // TLS Support

#!endif

 

#!ifdef WITH_WEBSOCKETS

loadmodule "xhttp.so"       // XHTTP support

loadmodule "websocket.so"   // WebSocket support

#!endif

loadmodule "rtpengine.so"   // RTPEngine control

 

#!ifdef WITH_DEBUG

loadmodule "debugger.so"

#!endif

 

When I start Kamailio, I see the following in the output to stderr:

 

Listening on

             udp: 172.16.0.57:5060

             tcp: 172.16.0.57:5060

Aliases:

             tcp: VRTPENGINE:5060

             udp: VRTPENGINE:5060

 

WARNING: no fork mode

 0(6299) INFO: <core> [core/tcp_main.c:5042]: init_tcp(): using epoll_lt as the io watch method (auto detected)

 

Here’s the problem:

 

When I connect via UDP, everything works fine. I can connect and see all SIP traffic.

 

However, if I try to connect via TCP, I see the initial SYN packet in attempting to establish a connection.

 

Kamailio responds with an [RST,ACK] message and the TCP connection is never established. No further TCP traffic is sent.

 

Any ideas on what I’m doing wrong?

 

Peter H. Manley, Ph.D.

Chief Software Architect

KomBea Corporation

3400 North Ashton Blvd, Suite 470

Lehi, Utah 84043

www.kombea.com

 

Office:+1.801.610.5808

Mobile +1.801.243.7773