ext.rst 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  1. Each phone on the PBX is setup to register to one or more extension
  2. numbers.
  3. Basic Setup
  4. ===========
  5. - To add an extension go to the Menu -> Accounts -> Extensions and
  6. press the add button.
  7. - Set an extension number
  8. - the rest of the defaults are fine for a basic example.
  9. - Press save.
  10. - Hover over the password input, it will allow you to see/copy the
  11. password
  12. Passwords
  13. ---------
  14. FusionBPX automatically generates a password for the extension. It is
  15. randomly created (symbols, letters, numbers). You can find this password
  16. after you create the extension.
  17. - Menu -> Accounts -> Extensions
  18. - click 'e' to edit the extension you need to see
  19. - find the password field
  20. - click inside the field of bullets
  21. - FusionPBX will display the password to you so you can see it
  22. and copy/paste on the line below.
  23. - Alternatively, you can do:
  24. - less
  25. [freeswitch\_config\_dir]/directory/default/v\_ExtensionNumber.xml
  26. Registering Phones
  27. ==================
  28. For most things your extension number is your username, and password is
  29. [see above]. You'll also need to put your ip address, or DNS name in the
  30. proper place.
  31. Examples
  32. --------
  33. Polycom
  34. ~~~~~~~
  35. Soundpoint IP 320P
  36. ^^^^^^^^^^^^^^^^^^
  37. Identification
  38. Display Name: FusionPBX
  39. Address: ExtensionNumber
  40. Authentication User ID: ExtensionNumber
  41. Authentication Password: PASSWORD
  42. Label: ExtensionNumber or Whatever
  43. Type: Private
  44. Third Party Name: BLANK
  45. Number Of Line Keys: BLANK
  46. Calls Per Line: BLANK
  47. Server 1
  48. Address: FusionBPX IP ADDRESS or DOMAIN NAME if doing multi-tenant
  49. Port: 5060
  50. Transport: DNSnaptr works or UDP or whatever
  51. Expires: default (30 works ok NATTED)
  52. Register: BLANK
  53. Retry Timeout: BLANK
  54. Retry Maximum Count: BLANK
  55. Line Seize Timeout: BLANK
  56. Server 2
  57. leave alone
  58. Call Diversion
  59. leave alone
  60. Message Center
  61. Subscriber: BLANK
  62. Callback Mode: Contact
  63. Callback Contact: \*98
  64. Options
  65. =======
  66. | **Extension** What is used to register the phone (typically your
  67. extension number but can be any alphanumeric) used to register phone
  68. in the field user ID, username etc.
  69. | **Number Alias** The number you can dial to get this extension if the
  70. extension is non numerical.
  71. | **Range** used to setup one or more extensions. In other words this
  72. can be used to create extension in bulk from 1 to 1000 extensions.
  73. | If the checkbox for Auto-generate user with extension as login name is
  74. checked, User List is ignored, and a user is created and linked to the
  75. extension.
  76. | A printable List of usernames and randomly generated passwords is
  77. dumped to screen so can capture them for later.
  78. | **``Effective`` ``Caller`` ``ID``
  79. ``Name:``**\ `` is used when calling internal numbers. ( ``\ **```effective_caller_id_name`` <http://wiki.freeswitch.org/wiki/Variable_effective_caller_id_name>`__**\ `` - FreeSWITCH variable )``
  80. | **``Effective`` ``Caller`` ``ID``
  81. ``Number:``**\ `` is used when when calling internal numbers. ( ``\ **```effective_caller_id_number`` <http://wiki.freeswitch.org/wiki/Variable_effective_caller_id_number>`__**\ `` - FreeSWITCH variable )``
  82. | ``The Effective Caller Name and Number are also used to populate the voicemail Subject line information.``
  83. | **``Outbound`` ``Caller`` ``ID``
  84. ``Name:``**\ `` is used when calling external numbers. ( ``\ *```outbound_caller_id_name`` <http://lists.freeswitch.org/pipermail/freeswitch-users/2010-February/053648.html>`__*\ `` - General variable )``
  85. | **``Outbound`` ``Caller`` ``ID``
  86. ``Number:``**\ `` is used when calling external numbers. ( ``\ *```outbound_caller_id_number`` <http://lists.freeswitch.org/pipermail/freeswitch-users/2010-February/053648.html>`__*\ `` - General variable )``
  87. | ``Caller ID notes:``
  88. | ``Effective caller id is the real caller id however people tend to like and internal caller id for extensions and an external caller id when calling ``
  89. | ``out the gateways so when calling out a gateway if you were to look at the outbound route in the edit window as a superadmin users you would see``
  90. | ``that when going out the gateway it sets the outbound caller id to the effective caller id the effect is this on the extension you set the effective``
  91. | ``caller id to the internal caller id info the number as the extension number then you set the outbound caller id as the external caller id. This is``
  92. | ``used to set the outbound caller ID effective_caller_id_name=${outbound_caller_id_name}. The Outbound caller ID variable doesn't exist in FreeSWITCH,``
  93. | ``it is a feature of FusionPBX. You can set the caller id either on an outbound route or on an extension.``
  94. **Account Code** - this is not used anywhere in the default dialplan but
  95. is provided in FreeSwitch and therefore is provided in FusionPBX for
  96. full compatibility. It sets a variable for the extension that could be
  97. used in a condition. See `Variable
  98. accountcode <http://wiki.freeswitch.org/wiki/Variable_accountcode>`__
  99. for more information. Note that it can be used to affect the operation
  100. of CDR.
  101. ``Functionality for phone provisioning is now provided on this screen, but has not yet been documented here.``
  102. *' Directory Full Name*' This is the name that will be used for a \*411
  103. or Company Directory lookup as often used in IVR.
  104. Notes
  105. =====
  106. The password is set automatically using a combination of random
  107. characters that are:
  108. - upper and lower case letters,
  109. - numbers
  110. - symbols
  111. Rather than changing the password to something simple it is much wiser
  112. to keep it as it was automatically set and to use that password to
  113. connect the phone with. To view the password that has been automatically
  114. set, open the extension page again and click on the obfuscated password
  115. in the password field. The actual password will be revealed just below
  116. the password field.
  117. Notes on Toll Allow
  118. ===================
  119. Toll Allow is a variable that can be set per extension. It allows you to
  120. limit who can make what type of calls. Note that although the variable
  121. is provided in the extension configuration, the default dialplan DOES
  122. NOT make use of it. Therefore if you want to use it you need to add
  123. statements to the dialplan to enable it.
  124. The following are notes on Toll Allow that were captured from IRC
  125. discussions on the topic. This needs to be updated by someone who
  126. understands it or has used it:
  127. | ``An example for the contents of the toll_allow variable would be:``
  128. |
  129. | ``You can then add information to your dialplan to process this variable. In the example XML below, if the valid allow value isn't present then``
  130. | ``an extension shouldn't be able to dial out. However extension -> extension should still work.``
  131. | ``The following code are example XML for standard outbound routes (Dialplan->OutboundRoutes). Effectively you are applying an additional ``
  132. | ``condition to EACH outbound route that you want to limit. So in the FusionPBX GUI select an outbound route and add a condition, type ``
  133. | ``"${toll_allow}", data "local". Order is important, this should be the FIRST condition of your outbound route.``
  134. | ``You'll need to do that for all of your outbound routes, tag them local, domestic, or international depending on what they are.``
  135. | ``On some installations this example file will be present in /usr/local/freeswitch/conf/dialplan/default/01_example.com.xml: ``
  136. |
  137. ::
  138. <include>
  139. <extension name="local.example.com">
  140. <condition field="${toll_allow}" expression="local"/>
  141. <condition field="destination_number" expression="^(\d{7})$">
  142. <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/>
  143. <action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/>
  144. <action application="bridge" data="sofia/gateway/${default_gateway}/1${default_areacode}$1"/>
  145. </condition>
  146. </extension>
  147. <extension name="domestic.example.com">
  148. <condition field="${toll_allow}" expression="domestic"/>
  149. <condition field="destination_number" expression="^(\d{11})$">
  150. <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/>
  151. <action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/>
  152. <action application="bridge" data="sofia/gateway/${default_gateway}/$1"/>
  153. </condition>
  154. </extension>
  155. <extension name="international.example.com">
  156. <condition field="${toll_allow}" expression="international"/>
  157. <condition field="destination_number" expression="^(011\d+)$">
  158. <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/>
  159. <action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/>
  160. <action application="bridge" data="sofia/gateway/${default_gateway}/$1"/>
  161. </condition>
  162. </extension>
  163. </include>
  164. |
  165. The above example is how to PERMIT calls. The example below takes the
  166. opposite approach and is how to PREVENT calls. Effectively, the above
  167. example assumes all calls are bad (except internal) unless they are
  168. flagged as good by the value of the toll\_allow variable. The below
  169. example takes the opposite approach - it assumes that all calls are good
  170. unless they are flagged as bad.
  171. | ``Put this in your advanced dialplan. In the toll allow of whatever extension you wanted to restrict put the value 'local'. This example ``
  172. | ``restricts from calling 10 or 11 digit numbers.``
  173. |
  174. ::
  175. <extension name="localcalls" >
  176. <condition field="${toll_allow}" expression="local"/>
  177. <condition field="destination_number" expression="(^\d{10}$|^\d{11}$)">
  178. <action application="hangup"/>
  179. </condition>
  180. </extension>
  181. |