Kamailio 3.3.3

I am using dialog module to do the concurrent call limit. Once a while I got a dead unconfirmed dialog hung in memory. The only way I know to cleanup this is to restart kamailio. So my questions are:
1) Does anybody know a better way to cleanup the dead dialog without having to restart the kamailio server? This is a production server. I really really hate to restart the server.
2) How easy to modify the source code to timeout the dead unconfirmed dialog in memory?

Gary