SIP Registration Server
Line 29: | Line 29: | ||
Module regfile is used for autentication, registration, and routing of users configured in a file. | Module regfile is used for autentication, registration, and routing of users configured in a file. | ||
− | + | For each user you have to define a section in regfile.conf. | |
+ | |||
regfile.conf | regfile.conf | ||
+ | |||
+ | ; you have to put username as a category and password into key password | ||
+ | ; if password is missing the module will only register but not authenticate | ||
+ | ; if password exists and is empty will blindly authenticate anybody | ||
+ | ;[username] | ||
+ | ;password=something | ||
+ | [200] | ||
+ | password=secret | ||
[general] | [general] | ||
Line 50: | Line 59: | ||
====Configure register module==== | ====Configure register module==== | ||
− | Module register used for autentication, registration, and routing of users from database. | + | Module register is used for autentication, registration, and routing of users from database. |
Module [[MySQL|mysqldb]] or module [[PostgreSQL|pgsqldb]] can be used to make the connection between Yate and a database. | Module [[MySQL|mysqldb]] or module [[PostgreSQL|pgsqldb]] can be used to make the connection between Yate and a database. |
Revision as of 16:41, 8 April 2013
The registration server's functionality typically stands in setting up and tearing down functionality with a client by using the REGISTER and INVITE requests as well as clearing and retrieving registrations from a SIP url.
Contents |
Register notion
The Session Initiation Protocol provides the REGISTER functionality that is used mainly in a proxy configuration case.
This is used to locate individual users in case of a call, which is similar to an INVITE message sent to the server.
Message flow in registration of a SIP user agent on a registration server
The actual registration of a SIP user agent on a registration server is made using a pretty simple message flow like it follows:
- The user agent sends a REGISTER request to the server.
- The server answers with 401 Unauthorized.
- The user agent sends another REGISTER request with authorization information.
- The server acknowledges the registration by sending back 200 OK.
By changing some fields in the message, the registration cancelling is performed.
Interrogation of the server to identify contacts associated with a SIP url are made in the similar way.
Yate as a SIP registrar
In order to use Yate as a SIP registrar you can use one of the following modules:
- regfile.conf - the users will be set in a file
- register.conf - the users will be set in a database
- define custom module or script that handles: user.auth, user.register, user.unregister and call.route messages
Configure regfile module
Module regfile is used for autentication, registration, and routing of users configured in a file. For each user you have to define a section in regfile.conf.
regfile.conf
; you have to put username as a category and password into key password ; if password is missing the module will only register but not authenticate ; if password exists and is empty will blindly authenticate anybody ;[username] ;password=something [200] password=secret
[general] ; auth setups the user.auth handler priority auth=100 ; register setups the user.register and user.unregister ; handlers priority register=100 ; route setups the call.route handler priority route=100 ; file: string. An auxiliary conf file used to save and load from it autocreated and registered entries ; If file don't exists the registered entities will be lost on reload file=/path/filename
If you want to limit the access to make calls only to autenticated users you have to setup in regexroute.conf in section [default] this line:
${username}^$=-;error=noauth
Configure register module
Module register is used for autentication, registration, and routing of users from database.
Module mysqldb or module pgsqldb can be used to make the connection between Yate and a database.
See more how to configure register.
See also