官术网_书友最值得收藏!

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 the id 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.

主站蜘蛛池模板: 彭阳县| 涪陵区| 榆中县| 兴城市| 潼南县| 宝丰县| 漳州市| 永新县| 洪洞县| 台安县| 萨迦县| 微山县| 康保县| 彰化县| 卢氏县| 如东县| 正宁县| 遂昌县| 阿城市| 瓦房店市| 陇川县| 肇源县| 富源县| 阿瓦提县| 金阳县| 太仆寺旗| 班戈县| 宜州市| 石屏县| 承德市| 花莲市| 吉木乃县| 根河市| 尤溪县| 石泉县| 加查县| 肇庆市| 隆安县| 儋州市| 民权县| 临清市|