Sip auto account add and register for multiple user

If user have sip phone, username, password and domain name ( IP of asterisk server)
and want to auto add on asterisk server with above information.

So anybody have any idea of how to “auto” add and register above user to asterisk server.

I can do it by manually by creating sip account with username and password in sip.conf

but I want do it for a large number of users.

I would write a Perl script which wrote out a sip.conf (or users.conf) fragment, then merge it in with an editor.

If you are using realtime, it is just a database programming exercise.

First sorry for my bad english.

I can’t do it auto, i have a manual solution with template if you have a lot of account.

I hope that’s can help you.

That’s work fine

Look my Sip.conf sample :

[general]
port = 5060
bindaddr = 0.0.0.0
dtmfmode=rfc2833
srvlookup=yes
;
[sets](!) ; <== note the exclamation point in parenthesis. That makes this a template.
type=friend
context=default
host=dynamic
disallow=all
allow=ulaw
dtmfmode=rfc2833

[1000](sets) ; <== note the template name in parenthesis. All of that templates  
             ; settings will be inhereted.
secret=1000
maibox=1000

[1001](sets)
secret=1001
maibox=1001

[1002](sets)
secret=1002
maibox=1002