I attach a patch that makes NOTIFY/OPTIONS sent by "send_keepalive()" function lighter. Basically I use short header names and make shorter the Call-Id.
The original message has ~ 252 chars.
The modified message has ~ 198 chars.
Not too much anyway. I wonder if the server_IP could also be replaced in From and To headers, and use "nat" as hostpart or whatever.