How to register users from register
From Yate Documentation
(Difference between revisions)
Line 1: | Line 1: | ||
Supose that you have this scenario you want to register users from a database let's say PostgreSQL. | Supose that you have this scenario you want to register users from a database let's say PostgreSQL. | ||
− | After creating your database with the tables that you need (here is an example of [[Register_Database_Schema|a database schema]]), you have to tell Yate what database to use. So write in [[register|register.conf]] the name of the database connection to use: | + | === Create database=== |
+ | |||
+ | After creating your database with the tables that you need (here is an example of [[Register_Database_Schema|a database schema]]), you have to tell Yate what database to use. | ||
+ | |||
+ | === Database connection data in Yate=== | ||
+ | |||
+ | ==== Set the name of the database==== | ||
+ | |||
+ | So write in [[register|register.conf]] the name of the database connection to use: | ||
[default] | [default] | ||
account=Database_Name | account=Database_Name | ||
+ | |||
+ | ==== Set the connection information of database==== | ||
And in PostgreSQL configuration file: pgsqldb.conf we have to set the connection data for this database in a section that will have the same name as the account: | And in PostgreSQL configuration file: pgsqldb.conf we have to set the connection data for this database in a section that will have the same name as the account: | ||
Line 15: | Line 25: | ||
After "=" you have to write your connection information. | After "=" you have to write your connection information. | ||
+ | |||
+ | ===Enable modules=== | ||
Also, in your yate.conf these modules should be enabled by hand, if you set modload=disable | Also, in your yate.conf these modules should be enabled by hand, if you set modload=disable | ||
Line 27: | Line 39: | ||
pgsqldb.yate=true | pgsqldb.yate=true | ||
register.yate=true | register.yate=true | ||
+ | |||
+ | |||
+ | '''See also''' | ||
+ | |||
+ | * [[Regfile]] | ||
+ | * [[MySql]] |
Revision as of 18:02, 6 December 2012
Supose that you have this scenario you want to register users from a database let's say PostgreSQL.
Contents |
Create database
After creating your database with the tables that you need (here is an example of a database schema), you have to tell Yate what database to use.
Database connection data in Yate
Set the name of the database
So write in register.conf the name of the database connection to use:
[default] account=Database_Name
Set the connection information of database
And in PostgreSQL configuration file: pgsqldb.conf we have to set the connection data for this database in a section that will have the same name as the account:
[Database_Name] host= database= user= password=
After "=" you have to write your connection information.
Enable modules
Also, in your yate.conf these modules should be enabled by hand, if you set modload=disable
[modules] ; This section should hold one line for each module whose loading behaviour ; is to be changed from the default specified by modload= in section [general] ; Each line has to be of the form: ; modulename.yate=boolean ; Note that modules can be located only in the module directory so no path ; information should be specified pgsqldb.yate=true register.yate=true
See also