Persistent storage of User and Device settings

Some information about Devices and Users is written in AstDB. This allows for lightning fast lookups during dialplan execution, and also allows settings to be changed in real-time, without having to reload the dialplan.

/AMPUSER/200/cidname                              : Ryan Courtnage
/AMPUSER/200/device                               : 00000001&00000002&00000004
/AMPUSER/200/outboundcid                          :
/AMPUSER/200/password                             : 1111
/AMPUSER/200/recording                            : out=Adhoc|in=Always

/DEVICE/00000001/dial                             : SIP/00000001
/DEVICE/00000001/type                             : adhoc
/DEVICE/00000001/user                             : 200

Currently, we store these options in database tables (users, devices) when they are first provisioned in the AMP admin. In parallel, the data is written to AstDB. Any real time changes that occur only update in AstDB, and do not find their way to the db tables.

The reason for this was initially due to some uncertainty about how well we could rely on AstDB (Berkley 1) to keep our data safe. In the even of a failure to do so, one could simply re-write AstDB with the default values we stored in the db tables.

Moving forward, I do think that we can rely on AstDB to provide a reliable persistant store. Having said this, we can probably eliminate the duplication in the mysql tables.