Sipregs RealTime information storage

So the docs on RealTime have been getting better and better but there is still quite a bit that’s not out there for platform developers. I’m having trouble finding information on sipregs, in particular where and how registration information is stored when using the sipregs parameter in the RealTime config (extconfig.conf).

I’ve found references to configuring sipregs like this:
sipregs => mysql,sipregs

But no corresponding reference to the table schema for storing the registrations or any documentation on the behaviour of the sipregs handler. So far most of what I’ve found is at http://lists.digium.com/pipermail/asterisk-commits/2007-February/011411.html.

Anyone care to comment on implementing sipregs?

sipregs is a table that allows you to split out the registration information from the configuration information if you so choose. I actually designed it to allow for the use of views instead of having mass amounts of static information in a table. The sipregs table is designed to be writable by asterisk, where the sippeers table can be a view.

The basic structure is as follows:
“name” -> varchar/text, the name of the peer, must match “name” in sippeers
"fullcontact" -> varchar/text, full sip URI
"ipaddr" -> varchar/text (or ip), ip address of peer
"port" -> integer, port of peer
"regseconds" -> bigint, regseconds
"username" -> varchar/text
"regserver" -> varchar/text

FYI, the only field that you have to fill out is name, asterisk will do the rest based on registration information.

What is stored in the “regserver” field? Is this so that registration information from multiple Asterisk servers can be stored in a common DB?

As far as I can tell, yes, that would be what that uses. I’d have to look through the code, but you might have to set a regserver field in sip.conf for that to work (don’t quote me on that). It’s a step toward better centralization of databases :smile: