We know there are issues restarting Kamailio with presentity entries in place. The old entries cause problems until they expire. We think we have narrowed this down to the pua db_mode - we can't store PUA entries in the database because that logic is broken in quite a few ways.
That said, I'll give this patch a try and see if it fixes any of our restart issues and/or introduces strange side effects.