I went a few times over the code but I could not spot anything. Do you have a test system where this can be reproduced and run git master branch?
Can you estimate with how many DNS records the system may have to deal with (i.e., how many domains are involved in SIP routing that have to be resolved and stored in the cache)?