We use trunk with Twilio through a SIP/TLS.
In case of sending in-dialog requests to them, Kamailio should establish an outgoing connection to the dst port 5061 (as per Route), like:
But as per tcpdump traces and logs, Kamailio does not even try to establish an outgoing connection to Twilio.
There should be no problems with routes and the network on that server, as regular telnet to Twilio shows that 5061 is open.
Script:onsend_route {
xlog("L_ERR","[$cfg(route)]*RELAY ONSEND* $rm / $du / $fs / $fsn / [$ci]\n");
}
Syslog:DEBUG <core> [core/resolve.c:1259]: srv_sip_resolvehost():
3.3.3.3:5061 proto=3
DEBUG <core> [core/resolve.c:1371]: srv_sip_resolvehost(): returning 0x55acd63a63c0 (
3.3.3.3:5061 proto=3)
ERROR <script>: [DEFAULT_SEND]*RELAY ONSEND* REFER / sip:3.3.3.3:5061;transport=tls / tls:
10.1.1.1:5061 / sip_wan_tls / [123]
DEBUG tm [../../core/forward.h:277]: msg_send_buffer(): sending to:
3.3.3.3:5061, force_socket=4, send_sock=0x7f090049b8e8
DEBUG tm [../../core/forward.h:292]: msg_send_buffer(): tcp_send failed
DEBUG tm [t_fwd.c:1568]: t_send_branch(): send to
3.3.3.3:5061 (3) failed
WARNING: tm [t_fwd.c:1588]: t_send_branch(): sending request on branch 0 failed
DEBUG tm [t_funcs.c:335]: t_relay_to(): t_forward_nonack returned error -1 (-477)
DEBUG tm [t_funcs.c:353]: t_relay_to(): -477 error reply generation delayed
DEBUG sl [sl_funcs.c:558]: sl_run_callbacks(): execute callback for event type 1
Software:- Kamailio is listening on (+udp, +tcp):
- OS is Debian 11.5
- # kamailio -v
version: kamailio 5.6.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_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
- # dpkg -l | grep ssl
ii libssl1.1:amd64 1.1.1n-0+deb11u3 amd64 Secure Sockets Layer toolkit - shared libraries
ii openssl 1.1.1n-0+deb11u3 amd64 Secure Sockets Layer toolkit - cryptographic utility
--