Automatic sip peers generation

first I will describe the architecture of my set up:
I have an application which lets you generate your own voice application. My application has an automatic script for user account registration e.g. anyone can come, register and he can immediately log in to the application.

What I want to do:
Once the user creates his voice application, I would like to give him the opportunity to call this application. I have Asterisk running and configured so all I need is a way to automatically add a sip peer/account to the sip.conf in the moment when the user registrates to my application and then automatically reload sip configuration.

Is there any easy way to do this?
Is there any other approach? Like for example not to take sip accounts from sip.conf but rather from an external file/database?

Thanks for any suggestions,