How to import 1200 Sip users

I’m using Linux redhat 5.4 + Asterisk1.6.2+FreePBX2.7.0. Now, I want to inmport about 1200 Sip users, It’ll take a lot of time when input user form “extension menu” of free PBX. I use a sql scripts:
Ex: I have user:256364 ; display name: AICT-DVKTHT-Nam-BaoDPT
pass: 123123a ; disable all codec, only use: g729 and ulaw

INSERT INTO sip VALUES (‘256364’, ‘deny’, ‘0.0.0.0/0.0.0.0’, 18);
INSERT INTO sip VALUES (‘256364’, ‘mailbox’, ‘256364@device’, 17);
INSERT INTO sip VALUES (‘256364’, ‘accountcode’, ‘’, 16);
INSERT INTO sip VALUES (‘256364’, ‘dial’, ‘SIP/256364’, 15);
INSERT INTO sip VALUES (‘256364’, ‘allow’, ‘g729,ulaw’, 14);
INSERT INTO sip VALUES (‘256364’, ‘disallow’, ‘all’, 13);
INSERT INTO sip VALUES (‘256364’, ‘pickupgroup’, ‘’, 12);
INSERT INTO sip VALUES (‘256364’, ‘callgroup’, ‘’, 11);
INSERT INTO sip VALUES (‘256364’, ‘qualify’, ‘yes’, 10);
INSERT INTO sip VALUES (‘256364’, ‘port’, ‘5060’, 9);
INSERT INTO sip VALUES (‘256364’, ‘nat’, ‘yes’, 8);
INSERT INTO sip VALUES (‘256364’, ‘type’, ‘friend’, 7);
INSERT INTO sip VALUES (‘256364’, ‘host’, ‘dynamic’, 6);
INSERT INTO sip VALUES (‘256364’, ‘context’, ‘from-internal’, 5);
INSERT INTO sip VALUES (‘256364’, ‘canreinvite’, ‘no’, 4);
INSERT INTO sip VALUES (‘256364’, ‘dtmfmode’, ‘rfc2833’, 3);
INSERT INTO sip VALUES (‘256364’, ‘secret’, ‘123123a’, 2);
INSERT INTO sip VALUES (‘256364’, ‘permit’, ‘0.0.0.0/0.0.0.0’, 19);
INSERT INTO sip VALUES (‘256364’, ‘account’, ‘256364’, 20);
INSERT INTO sip VALUES (‘256364’, ‘callerid’, ‘device <256364>’, 21);
INSERT INTO sip VALUES (‘256364’, ‘record_in’, ‘Adhoc’, 22);
INSERT INTO sip VALUES (‘256364’, ‘record_out’, ‘Adhoc’, 23);
INSERT INTO devices VALUES (‘256364’, ‘sip’, ‘SIP/256364’, ‘fixed’, ‘256364’, ‘AICT-DVKTHT-Nam-BaoDPT’, ‘’);
INSERT INTO users VALUES (‘256364’, ‘’, ‘AICT-DVKTHT-Nam-BaoDPT’, ‘novm’, 0, ‘’, ‘out=Adhoc|in=Adhoc’, ‘’, ‘’, ‘default’);

Affter insert, I click on one user and chose " submit" --> apply

But I can not make any call to other sip users(and itselft). Please help me!
Does I miss somethings?

Do you have a license for the G.729 codec? It must be licensed on your system to work.

Have you looked at the Bulk Extensions Module?

An API also exists and is documented in the wiki for adding users.

I’m using open G.729 codec. When I add new sip users by module add extension, everything work ok.

Oh yeah, thanks so much. I got it, just put some command in Asterisk CLI with structure like this:
database put CW #EXT# ENABLED --> if you want Enable call back itself
database put AMPUSER #EXT#/cidname #DISPLAY NAME#
database put AMPUSER #EXT#/cidnum #EXT#
database put AMPUSER #EXT#/device #EXT#
database put AMPUSER #EXT#/recording out=Adhoc|in=Adhoc
database put AMPUSER #EXT#/ringtimer 10
database put AMPUSER #EXT#/voicemail default
database put DEVICE #EXT#/default_user #EXT#
database put DEVICE #EXT#/dial SIP/#EXT#
database put DEVICE #EXT#/type fixed
database put DEVICE #EXT#/user #EXT#