Kamailio seg faults periodically when built against OpenSSL 1.1 (https://github.com/kamailio/kamailio/issues/1860) and TLS is enabled. To avoid this on FreeBSD 12 and up, it should probably be built against OpenSSL 1.0 from ports until the underlying bug is fixed (this is the recommendation in the GitHub bug above).
There is also a workaround in the Kamailio repository here that fixes at least some of the problems: https://github.com/kamailio/kamailio/tree/master/src/modules/tls/utils/openssl_mutex_shared
It's not perfect, but it reduces the time between crashes from ~ 12 hours to ~ 2 weeks. Maybe this could at least be enabled by default?
With r509639 kamilio was updated to 5.2.4, please retest, if it is fixed.
(In reply to Kurt Jaeger from comment #2)
It seems not to be. Per the upstream bug, a full solution will wait until 5.3.0. With 5.2.4, LD_PRELOAD of their openssl_mutex_shared module fixes the problem completely, however. It would be nice if that could be included in the port.
This is fixed in 5.3.0.