SIP Registration Server

From Yate Documentation
(Difference between revisions)
Jump to: navigation, search
(Register file)
(Configure register module)
 
(39 intermediate revisions by 2 users not shown)
Line 1: Line 1:
The registration server’s functionality typically stands in setting up and tearing down functionality with a client by using the registration and invite requests as well as clearing and retrieving registrations from a SIP url.
+
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.
  
 
===Register notion===
 
===Register notion===
  
The Session Initiation Protocol provides a REGISTER functionality that is used mainly in a proxy configuration case. For what reason?
+
The Session Initiation Protocol provides the REGISTER functionality that is used mainly in a proxy configuration case. <br>
The answer is quite simple. It’s about locating individual users in case of a call, which is similar to an INVITE message sent to the server.
+
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===
 
===Message flow in registration of a SIP user agent on a registration server===
Line 10: Line 10:
 
The actual registration of a SIP user agent on a registration server is made using a pretty simple message flow like it follows:  
 
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 user agent sends a REGISTER request to the server.
* The server sends back an acknowledgement message.  
+
* 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 canceling is performed. Also interrogation of the server to identify contacts associated with a SIP url are made in the same way.
+
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 ===
 
=== Yate as a SIP registrar ===
  
The module used for configuring Yate are:
+
In order to use Yate as a SIP registrar you can use one of the following modules:
  
* regfile.conf
+
* regfile.conf - the users will be set in a file
* register.conf
+
* 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 ====
 
==== Configure regfile module ====
  
Module regfile used for autentication, registration, and routing of users from a file.
+
Module regfile is used for autentication, registration, and routing of users configured in a file.<br>
 +
This is the easiest and the quickest way of configuring Yate if you have few users.<br>
 +
For each user you have to define a section that contains the [username] and parameter password with his associated value.<br>
 +
This is an example of defining a user in regfile.conf:
 +
[200]
 +
password=mysecret
 +
 
 +
By configuring to save the registration information in a file, registration of the users will not be lost, if Yate is restarted.
 +
More configuration that can be dome in this file can be found in [[regfile|regfile module page]].
  
regfile.conf
+
====Configure register module====
  
[general]
+
Module register is used for autentication, registration, and routing of users from database.
; 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
+
  
====Register file ====
+
There are [[Modules#Database_Drivers|database modules]] used to make the connection between Yate and an existing database.
  
Module register used for autentication, registration, and routing of users from database.
+
From register module you can:
 +
* set queries for each message.
 +
* can track the number of ongoing calls for a user.
 +
* store CDR in the database.
  
 +
We offer [[Register#Configuration|queries written in PostGreSQL]] for a [[Register_Database_Schema|database schema]], but you can write your own queries for your specific configurations.<br>
 
See more how to [[Register#Configuration| configure register]].
 
See more how to [[Register#Configuration| configure register]].
  

Latest revision as of 14:06, 11 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

[edit] 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.

[edit] 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.

[edit] 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

[edit] Configure regfile module

Module regfile is used for autentication, registration, and routing of users configured in a file.
This is the easiest and the quickest way of configuring Yate if you have few users.
For each user you have to define a section that contains the [username] and parameter password with his associated value.
This is an example of defining a user in regfile.conf:

[200]
password=mysecret

By configuring to save the registration information in a file, registration of the users will not be lost, if Yate is restarted. More configuration that can be dome in this file can be found in regfile module page.

[edit] Configure register module

Module register is used for autentication, registration, and routing of users from database.

There are database modules used to make the connection between Yate and an existing database.

From register module you can:

  • set queries for each message.
  • can track the number of ongoing calls for a user.
  • store CDR in the database.

We offer queries written in PostGreSQL for a database schema, but you can write your own queries for your specific configurations.
See more how to configure register.


See also

Personal tools
Namespaces

Variants
Actions
Preface
Configuration
Administrators
Developers