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

  • 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 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.

主站蜘蛛池模板: 淮北市| 边坝县| 闽清县| 齐河县| 襄垣县| 思南县| 沽源县| 乳源| 高青县| 江达县| 区。| 湖北省| 莎车县| 江源县| 滨海县| 安仁县| 中山市| 浪卡子县| 辽源市| 毕节市| 织金县| 彭州市| 和田县| 垣曲县| 静乐县| 昆山市| 宝清县| 祁门县| 竹北市| 东安县| 安溪县| 集安市| 叶城县| 鸡西市| 萨迦县| 昌图县| 新宁县| 宝应县| 河源市| 土默特右旗| 江阴市|