attached the patch to load the dialogs in the first child rather than in during module initialization.
Actually i wanted to commit this to the souce tree, but due to Klaus' comment regarding new dialogs during loading, i've changed the dialog loading a little bit.
In order to be safe while loading the dialogs, the new version will re-enumerate the dialogs in the hash-table (dlg->h_id).
With my previous commit to the dialog-module (fallback to SIP-Element-matchings) this is safe, since the dialog-matching will fallback to SIP-Element-Matching and it is safe to load dialogs while new dialogs are created. However, i believe this is not the cleanest method; but however it works properly.
What do you think?
Attached patch is against OpenSER (Kamailio) 1.3.