- 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.
- 社交網絡對齊
- Twilio Cookbook
- 電子政務效益的經濟分析與評價
- Hands-On Chatbots and Conversational UI Development
- 互聯網安全的40個智慧洞見:2014年中國互聯網安全大會文集
- 面向5G-Advanced的關鍵技術
- 4G小基站系統原理、組網及應用
- Learning Storm
- Learning Node.js Development
- 中國互聯網發展報告2021
- 云工廠:開啟中國制造云時代
- 小型局域網組建
- 從物聯到萬聯:Node.js與樹莓派萬維物聯網構建實戰
- Hands-On Reactive Programming in Spring 5
- 通信系統實戰筆記:無處不在的信號處理