Regfile
From Yate Documentation
(Difference between revisions)
Line 1: | Line 1: | ||
− | |||
Regfile is a registration module. It can be used for autentication, registration, and routing of users from a file. Is provided as a demo module for people who want to develop their own autentication, registration, or routing module. | Regfile is a registration module. It can be used for autentication, registration, and routing of users from a file. Is provided as a demo module for people who want to develop their own autentication, registration, or routing module. | ||
− | The | + | == Configuration File == |
+ | |||
+ | The configuration file is regfile.conf | ||
; you have to put username as a category and password into key password | ; you have to put username as a category and password into key password | ||
Line 16: | Line 17: | ||
password=mysecretpass | password=mysecretpass | ||
+ | === Section 'General' in regfile.conf=== | ||
− | There is however the special [general] section | + | There is however the special [general] section: |
[general] | [general] | ||
Line 31: | Line 33: | ||
;file=/path/filename | ;file=/path/filename | ||
+ | ===Other configurations=== | ||
Other things can be done from this file: | Other things can be done from this file: | ||
Line 54: | Line 57: | ||
;param=value | ;param=value | ||
+ | === Limit calls only for autenticated users === | ||
− | + | 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 | ${username}^$=-;error=noauth | ||
+ | |||
+ | '''See also''' | ||
+ | * [[Regular_expressions| Regexroute module]] | ||
+ | * [[Register| Register module]] |
Revision as of 18:05, 16 November 2012
Regfile is a registration module. It can be used for autentication, registration, and routing of users from a file. Is provided as a demo module for people who want to develop their own autentication, registration, or routing module.
Contents |
Configuration File
The configuration file is 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
i.e. to register my Grandstream Budgetone SIP phone, with username bt101, I have:
[bt101] password=mysecretpass
Section 'General' in regfile.conf
There is however the special [general] section:
[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
Other configurations
Other things can be done from this file:
; alternatives: list of called party numbers separated by coma ; Note if multiple users share the same party number the call will go to all users. ;alternatives= num1,num2,.... ; ; Set/Modify call.route parameters when the caller matches this section ; You can put call.route replacement ${variables} on the right side ; Note: Any parameter except for "password" and "alternatives" will be used for set/modify ; ; Ex: ; Modify caller name ;callername=name ; ; Modify caller number ;caller=number ; ; Replacement example ;callername=John Doe from ${address} ; ;param=value
Limit calls only for autenticated users
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
See also