FYI this was kamailio `5.1.0` on debian 8, with stock libcurl (`7.38`). I'm trying to reproduce the issue with `5.1.2` and both libcurl `7.38` and `7.59` (still on debian 8) (including with restarts under load), and I will update here with any relevant information.