How to dynamic create sip account use mysql database?

env: centos 6.3 64, asterisk 11.2.1, freepbx 2.11

how to dynamic create sip account use mysql database?

insert into sippeers table.

client can login and call the other peer.

Has anybody can provide a detail document.
thanks a lot.

A little more involved than you imagined. I am not familiar with the sippeers table, but if you add a proper entry for the new account in mysql tables sip,device and users then add all the normal entries into the asterisk database, (either berkley or sqlite depending on version), then reload freepbx, it should work. It does for me .

Each version of FreePBX has some small changes so I suggest you look at an existing extension in all the above tables to derive a temp[late for your needs.

. . I forgot to mention the mysql values are tuples so there will be more than one field in each table for the extension.

. . . and rereading this but not being able toedit my post, that should be ’ . . .more than one record in each table for the extension. . ."