- FreeSWITCH 1.2
- Anthony Minessale Michael S Collins Darren Schreiber Raymond Chandler
- 296字
- 2021-08-20 16:55:53
User features
Let's begin by looking at the XML file that defines a user. Locate the file conf/directory/default/1000.xml
and open it in an editor. You should see a file like the following:
<include> <user id="1000"> <params> <param name="password" value="$${default_password}"/> <param name="vm-password" value="1000"/> </params> <variables> <variable name="toll_allow" value="domestic,international,local"/> <variable name="accountcode" value="1000"/> <variable name="user_context" value="default"/> <variable name="effective_caller_id_name" value="Extension 1000"/> <variable name="effective_caller_id_number" value="1000"/> <variable name="outbound_caller_id_name" value="$${outbound_caller_name}"/> <variable name="outbound_caller_id_number" value="$${outbound_caller_id}"/> <variable name="callgroup" value="techsupport"/> </variables> </user> </include>
The XML structure of a user is simple. Within the <include>
tags the user has the following:
- The
user
element with theid
attribute - The
params
element, wherein parameters are specified - The
variables
element, wherein channel variables are defined
Even before we know what many of the specifics mean, we can glean from this file that the user ID is 1000 and that there is both a password and a vm-password
. In this case, the password
parameter refers to the SIP authorization password. (We discussed this in the Configuring a SIP phone to work with FreeSWITCH section in Chapter 3, Test Driving the Example Configuration.) The expression $${default_password}
refers to the value contained in the global variable default_password
, which is defined in the conf/vars.xml
file. If you surmised that vm-password
means voicemail password then you are correct. This value refers to the digits that the user needs to dial when logging in to check his or her voicemail messages. The value of id
is used both as the authorization username and the SIP username.
Additionally, there are a number of channel variables that are defined for this user. Most of these are directly related to the default Dialplan. The following table lists each variable and what it is used for:

In summary, a user in the default configuration has the following:
- A username for SIP and for authorization
- A voicemail password
- A means of allowing/restricting dialing
- A means of handling caller ID being sent out
- Several arbitrary variables that can be used or ignored as needed
Let's now add a new user to our directory.
- SOA用戶指南
- Building Django 2.0 Web Applications
- 物聯網網絡安全及應用
- 物聯網識別技術
- Truffle Quick Start Guide
- Hands-On Chatbot Development with Alexa Skills and Amazon Lex
- Spring Cloud微服務架構進階
- 物聯網與無線傳感器網絡
- 城市治理一網統管
- 通信原理及MATLAB/Simulink仿真
- 網絡AI+:2030后的未來網絡
- 局域網組成實踐
- 5G非正交多址接入技術:理論、算法與實現
- Intelligent Mobile Projects with TensorFlow
- 智能物聯安防視頻技術基礎與應用