Is it possible to auto register with Realtime

Hi, using Asterisk 1.6.2.8 compiled from source. I would just like to know if it is possible
to replace the ‘register => username:password@domain’ statement in a sip.conf file
with a realtime equivalent? If so is sipregs the way to do it?

I have the following sipregs table shown below, i have also set up extconfig.conf like this

sipusers => mysql,general,sip_accounts
sippeers => mysql,general,sip_accounts
sipregs => mysql,general,sipregs
extensions => mysql,general,extensions

CREATE TABLE sipregs (
id int(11) NOT NULL AUTO_INCREMENT,
name varchar(80) NOT NULL DEFAULT ‘’,
fullcontact varchar(80) NOT NULL DEFAULT ‘’,
ipaddr varchar(15) NOT NULL DEFAULT ‘’,
port mediumint(5) UNSIGNED NOT NULL DEFAULT ‘0’,
username varchar(80) NOT NULL DEFAULT ‘’,
regserver varchar(100) DEFAULT NULL,
regseconds int(11) NOT NULL DEFAULT ‘0’,
defaultuser varchar(80) NOT NULL DEFAULT ‘’,
lastms int(11) NOT NULL DEFAULT ‘0’,
useragent varchar(20) DEFAULT NULL,
PRIMARY KEY (id),
UNIQUE KEY name (name)
);

Thanks