README 9.5 KB

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