README 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  1. ===============================================================================
  2. === The Asterisk(R) Open Source PBX
  3. ===
  4. === by Mark Spencer <markster@digium.com>
  5. === and the Asterisk.org developer community
  6. ===
  7. === Copyright (C) 2001-2009 Digium, Inc.
  8. === and other copyright holders.
  9. ===============================================================================
  10. -------------------------------------------------------------------------------
  11. --- SECURITY ------------------------------------------------------------------
  12. It is imperative that you read and fully understand the contents of
  13. the security information document before you attempt to configure and run
  14. an Asterisk server.
  15. If you downloaded Asterisk as a tarball, see the security section in the PDF
  16. version of the documentation in doc/tex/asterisk.pdf. Alternatively, pull up
  17. the HTML version of the documentation in doc/tex/asterisk/index.html. The
  18. source for the security document is available in doc/tex/security.tex.
  19. -------------------------------------------------------------------------------
  20. -------------------------------------------------------------------------------
  21. --- WHAT IS ASTERISK ? --------------------------------------------------------
  22. Asterisk is an Open Source PBX and telephony toolkit. It is, in a
  23. sense, middleware between Internet and telephony channels on the bottom,
  24. and Internet and telephony applications at the top. However, Asterisk supports
  25. more telephony interfaces than just Internet telephony. Asterisk also has a
  26. vast amount of support for traditional PSTN telephony, as well. For more
  27. information on the project itself, please visit the Asterisk home page at:
  28. http://www.asterisk.org
  29. The official Asterisk wiki can be found at:
  30. https://wiki.asterisk.org
  31. In addition you'll find lots of information compiled by the Asterisk
  32. community on this Wiki:
  33. http://www.voip-info.org/wiki-Asterisk
  34. There is a book on Asterisk published by O'Reilly under the Creative Commons
  35. License. It is available in book stores as well as in a downloadable version on
  36. the http://www.asteriskdocs.org web site.
  37. -------------------------------------------------------------------------------
  38. -------------------------------------------------------------------------------
  39. --- SUPPORTED OPERATING SYSTEMS -----------------------------------------------
  40. --- Linux
  41. The Asterisk Open Source PBX is developed and tested primarily on the
  42. GNU/Linux operating system, and is supported on every major GNU/Linux
  43. distribution.
  44. --- Others
  45. Asterisk has also been 'ported' and reportedly runs properly on other
  46. operating systems as well, including Sun Solaris, Apple's Mac OS X, Cygwin,
  47. and the BSD variants.
  48. -------------------------------------------------------------------------------
  49. -------------------------------------------------------------------------------
  50. --- GETTING STARTED -----------------------------------------------------------
  51. First, be sure you've got supported hardware (but note that you don't need
  52. ANY special hardware, not even a sound card) to install and run Asterisk.
  53. Supported telephony hardware includes:
  54. * All Analog and Digital Interface cards from Digium (www.digium.com)
  55. * QuickNet Internet PhoneJack and LineJack (http://www.quicknet.net)
  56. * any full duplex sound card supported by ALSA, OSS, or PortAudio
  57. * any ISDN card supported by mISDN on Linux
  58. * The Xorcom Astribank channel bank
  59. * VoiceTronix OpenLine products
  60. -------------------------------------------------------------------------------
  61. -------------------------------------------------------------------------------
  62. --- UPGRADING FROM AN EARLIER VERSION -----------------------------------------
  63. If you are updating from a previous version of Asterisk, make sure you
  64. read the UPGRADE.txt file in the source directory. There are some files
  65. and configuration options that you will have to change, even though we
  66. made every effort possible to maintain backwards compatibility.
  67. In order to discover new features to use, please check the configuration
  68. examples in the /configs directory of the source code distribution. For a
  69. list of new features in this version of Asterisk, see the CHANGES file.
  70. -------------------------------------------------------------------------------
  71. -------------------------------------------------------------------------------
  72. --- NEW INSTALLATIONS ---------------------------------------------------------
  73. Ensure that your system contains a compatible compiler and development
  74. libraries. Asterisk requires either the GNU Compiler Collection (GCC) version
  75. 3.0 or higher, or a compiler that supports the C99 specification and some of
  76. the gcc language extensions. In addition, your system needs to have the C
  77. library headers available, and the headers and libraries for ncurses.
  78. There are many modules that have additional dependencies. To see what
  79. libraries are being looked for, see ./configure --help, or run
  80. "make menuselect" to view the dependencies for specific modules.
  81. On many distributions, these dependencies are installed by packages with names
  82. like 'glibc-devel', 'ncurses-devel', 'openssl-devel' and 'zlib-devel'
  83. or similar.
  84. So, let's proceed:
  85. 1) Read this README file.
  86. There are more documents than this one in the doc/ directory. You may also
  87. want to check the configuration files that contain examples and reference
  88. guides. They are all in the configs/ directory.
  89. 2) Run "./configure"
  90. Execute the configure script to guess values for system-dependent
  91. variables used during compilation.
  92. 3) Run "make menuselect" [optional]
  93. This is needed if you want to select the modules that will be compiled and to
  94. check dependencies for various optional modules.
  95. 4) Run "make"
  96. Assuming the build completes successfully:
  97. 5) Run "make install"
  98. If this is your first time working with Asterisk, you may wish to install
  99. the sample PBX, with demonstration extensions, etc. If so, run:
  100. 6) "make samples"
  101. Doing so will overwrite any existing configuration files you have installed.
  102. Finally, you can launch Asterisk in the foreground mode (not a daemon) with:
  103. # asterisk -vvvc
  104. You'll see a bunch of verbose messages fly by your screen as Asterisk
  105. initializes (that's the "very very verbose" mode). When it's ready, if
  106. you specified the "c" then you'll get a command line console, that looks
  107. like this:
  108. *CLI>
  109. You can type "core show help" at any time to get help with the system. For help
  110. with a specific command, type "core show help <command>". To start the PBX using
  111. your sound card, you can type "console dial" to dial the PBX. Then you can use
  112. "console answer", "console hangup", and "console dial" to simulate the actions
  113. of a telephone. Remember that if you don't have a full duplex sound card
  114. (and Asterisk will tell you somewhere in its verbose messages if you do/don't)
  115. then it won't work right (not yet).
  116. "man asterisk" at the Unix/Linux command prompt will give you detailed
  117. information on how to start and stop Asterisk, as well as all the command
  118. line options for starting Asterisk.
  119. Feel free to look over the configuration files in /etc/asterisk, where you
  120. will find a lot of information about what you can do with Asterisk.
  121. -------------------------------------------------------------------------------
  122. -------------------------------------------------------------------------------
  123. --- ABOUT CONFIGURATION FILES -------------------------------------------------
  124. All Asterisk configuration files share a common format. Comments are
  125. delimited by ';' (since '#' of course, being a DTMF digit, may occur in
  126. many places). A configuration file is divided into sections whose names
  127. appear in []'s. Each section typically contains two types of statements,
  128. those of the form 'variable = value', and those of the form 'object =>
  129. parameters'. Internally the use of '=' and '=>' is exactly the same, so
  130. they're used only to help make the configuration file easier to
  131. understand, and do not affect how it is actually parsed.
  132. Entries of the form 'variable=value' set the value of some parameter in
  133. asterisk. For example, in dahdi.conf, one might specify:
  134. switchtype=national
  135. In order to indicate to Asterisk that the switch they are connecting to is
  136. of the type "national". In general, the parameter will apply to
  137. instantiations which occur below its specification. For example, if the
  138. configuration file read:
  139. switchtype = national
  140. channel => 1-4
  141. channel => 10-12
  142. switchtype = dms100
  143. channel => 25-47
  144. The "national" switchtype would be applied to channels one through
  145. four and channels 10 through 12, whereas the "dms100" switchtype would
  146. apply to channels 25 through 47.
  147. The "object => parameters" instantiates an object with the given
  148. parameters. For example, the line "channel => 25-47" creates objects for
  149. the channels 25 through 47 of the card, obtaining the settings
  150. from the variables specified above.
  151. -------------------------------------------------------------------------------
  152. -------------------------------------------------------------------------------
  153. --- SPECIAL NOTE ON TIME ------------------------------------------------------
  154. Those using SIP phones should be aware that Asterisk is sensitive to
  155. large jumps in time. Manually changing the system time using date(1)
  156. (or other similar commands) may cause SIP registrations and other
  157. internal processes to fail. If your system cannot keep accurate time
  158. by itself use NTP (http://www.ntp.org/) to keep the system clock
  159. synchronized to "real time". NTP is designed to keep the system clock
  160. synchronized by speeding up or slowing down the system clock until it
  161. is synchronized to "real time" rather than by jumping the time and
  162. causing discontinuities. Most Linux distributions include precompiled
  163. versions of NTP. Beware of some time synchronization methods that get
  164. the correct real time periodically and then manually set the system
  165. clock.
  166. Apparent time changes due to daylight savings time are just that,
  167. apparent. The use of daylight savings time in a Linux system is
  168. purely a user interface issue and does not affect the operation of the
  169. Linux kernel or Asterisk. The system clock on Linux kernels operates
  170. on UTC. UTC does not use daylight savings time.
  171. Also note that this issue is separate from the clocking of TDM
  172. channels, and is known to at least affect SIP registrations.
  173. -------------------------------------------------------------------------------
  174. -------------------------------------------------------------------------------
  175. --- FILE DESCRIPTORS ----------------------------------------------------------
  176. Depending on the size of your system and your configuration,
  177. Asterisk can consume a large number of file descriptors. In UNIX,
  178. file descriptors are used for more than just files on disk. File
  179. descriptors are also used for handling network communication
  180. (e.g. SIP, IAX2, or H.323 calls) and hardware access (e.g. analog and
  181. digital trunk hardware). Asterisk accesses many on-disk files for
  182. everything from configuration information to voicemail storage.
  183. Most systems limit the number of file descriptors that Asterisk can
  184. have open at one time. This can limit the number of simultaneous
  185. calls that your system can handle. For example, if the limit is set
  186. at 1024 (a common default value) Asterisk can handle approximately 150
  187. SIP calls simultaneously. To change the number of file descriptors
  188. follow the instructions for your system below:
  189. -------------------------------------------------------------------------------
  190. -------------------------------------------------------------------------------
  191. --- PAM-based Linux System ----------------------------------------------------
  192. If your system uses PAM (Pluggable Authentication Modules) edit
  193. /etc/security/limits.conf. Add these lines to the bottom of the file:
  194. root soft nofile 4096
  195. root hard nofile 8196
  196. asterisk soft nofile 4096
  197. asterisk hard nofile 8196
  198. (adjust the numbers to taste). You may need to reboot the system for
  199. these changes to take effect.
  200. == Generic UNIX System ==
  201. If there are no instructions specifically adapted to your system
  202. above you can try adding the command "ulimit -n 8192" to the script
  203. that starts Asterisk.
  204. -------------------------------------------------------------------------------
  205. -------------------------------------------------------------------------------
  206. --- MORE INFORMATION ----------------------------------------------------------
  207. See the doc directory for more documentation on various features. Again,
  208. please read all the configuration samples that include documentation on
  209. the configuration options.
  210. If this release of Asterisk was downloaded from a tarball, then some
  211. additional documentation should have been included.
  212. * doc/tex/asterisk.pdf --- PDF version of the documentation
  213. * doc/tex/asterisk/index.html --- HTML version of the documentation
  214. Finally, you may wish to visit the web site and join the mailing list if
  215. you're interested in getting more information.
  216. http://www.asterisk.org/support
  217. Welcome to the growing worldwide community of Asterisk users!
  218. -------------------------------------------------------------------------------
  219. --- Mark Spencer, and the Asterisk.org development community
  220. -------------------------------------------------------------------------------
  221. Asterisk is a trademark of Digium, Inc.