[OpenSIPS-Users] how to delete contacts on dead TCP or TLS sessions?

vasilevalex alexei.vasilyev at gmail.com
Mon Jun 25 09:16:01 EDT 2018


Can anybody help, what to do with TCP and TLS contacts after restart
OpenSIPS or switching from Active to Backup server?

I'm using mid_registrar with AoR throttling mode. When Active server fails
and Backup server starts, all TCP and TLS endpoints of course detect dead
TCP connection and create new connection to Virtual IP (which is processed
by Backup server). And everything work. But after switching each AoR has 2
contacts, first - is old and dead, second is working (so it doubles userloc
table). If there are several switching Active/Backup, so each AoR will have
number of contacts equal to number of switchings.

And in OpenSIPS logs I have a lot of messages because of dead TLS sessions:

/usr/sbin/opensips[28570]: ERROR:core:tcp_connect_blocking_timeout: timeout
99600 ms elapsed from 100000 s
/usr/sbin/opensips[28570]: ERROR:proto_tls:tls_sync_connect:
tcp_blocking_connect failed
/usr/sbin/opensips[28570]: ERROR:proto_tls:proto_tls_send: connect failed
/usr/sbin/opensips[28570]: ERROR:tm:msg_send: send() to <IP>:4197 for proto
tls/3 failed
/usr/sbin/opensips[28570]: ERROR:tm:t_forward_nonack: sending request failed

And OpenSIPS deletes these dead contacts only after expiring interval, which
can be very long.
NAT is processed with

modparam("mid_registrar", "tcp_persistent_flag",

So all TCP sessions have lifetime equal to register expiration.
How to delete contacts when TCP or TLS sessions dead?

Sent from: http://opensips-open-sip-server.1449251.n2.nabble.com/OpenSIPS-Users-f1449235.html

More information about the Users mailing list