| 1 | # The Asterisk(R) Open Source PBX |
| 2 | |
| 3 | ``` |
| 4 | By Mark Spencer <[email protected]> and the Asterisk.org developer community. |
| 5 | Copyright (C) 2001-2025 Sangoma Technologies Corporation and other copyright holders. |
| 6 | ``` |
| 7 | |
| 8 | ## SECURITY |
| 9 | |
| 10 | It is imperative that you read and fully understand the contents of |
| 11 | the security information document before you attempt to configure and run |
| 12 | an Asterisk server. |
| 13 | |
| 14 | See [Important Security Considerations](https://docs.asterisk.org/Deployment/Important-Security-Considerations) for more information. |
| 15 | |
| 16 | ## WHAT IS ASTERISK ? |
| 17 | |
| 18 | Asterisk is an Open Source PBX and telephony toolkit. It is, in a |
| 19 | sense, middleware between Internet and telephony channels on the bottom, |
| 20 | and Internet and telephony applications at the top. However, Asterisk supports |
| 21 | more telephony interfaces than just Internet telephony. Asterisk also has a |
| 22 | vast amount of support for traditional PSTN telephony, as well. |
| 23 | |
| 24 | For more information on the project itself, please visit the [Asterisk |
| 25 | Home Page](https://www.asterisk.org) and the official |
| 26 | [Asterisk Documentation](https://docs.asterisk.org). |
| 27 | |
| 28 | ## SUPPORTED OPERATING SYSTEMS |
| 29 | |
| 30 | ### Linux |
| 31 | |
| 32 | The Asterisk Open Source PBX is developed and tested primarily on the |
| 33 | GNU/Linux operating system, and is supported on every major GNU/Linux |
| 34 | distribution. |
| 35 | |
| 36 | ### Others |
| 37 | |
| 38 | Asterisk has also been 'ported' and reportedly runs properly on other |
| 39 | operating systems as well, Apple's Mac OS X, and the BSD variants. |
| 40 | |
| 41 | ## GETTING STARTED |
| 42 | |
| 43 | Most users are using VoIP/SIP exclusively these days but if you need to |
| 44 | interface to TDM or analog services or devices, be sure you've got supported |
| 45 | hardware. |
| 46 | |
| 47 | Supported telephony hardware includes: |
| 48 | * All Analog and Digital Interface cards from Sangoma |
| 49 | * Any full duplex sound card supported by PortAudio |
| 50 | * The Xorcom Astribank channel bank |
| 51 | |
| 52 | ### UPGRADING FROM AN EARLIER VERSION |
| 53 | |
| 54 | If you are updating from a previous version of Asterisk, make sure you |
| 55 | read the Change Logs. |
| 56 | |
| 57 | <!-- CHANGELOGS (the URL will change based on the location of this README) --> |
| 58 | [Change Logs](ChangeLogs/ChangeLog-22.10.1.html) |
| 59 | <!-- END-CHANGELOGS --> |
| 60 | |
| 61 | ### NEW INSTALLATIONS |
| 62 | |
| 63 | Ensure that your system contains a compatible compiler and development |
| 64 | libraries. Asterisk requires either the GNU Compiler Collection (GCC) version |
| 65 | 4.1 or higher, or a compiler that supports the C99 specification and some of |
| 66 | the gcc language extensions. In addition, your system needs to have the C |
| 67 | library headers available, and the headers and libraries for ncurses. |
| 68 | |
| 69 | There are many modules that have additional dependencies. To see what |
| 70 | libraries are being looked for, see `./configure --help`, or run |
| 71 | `make menuselect` to view the dependencies for specific modules. |
| 72 | |
| 73 | On many distributions, these dependencies are installed by packages with names |
| 74 | like 'glibc-devel', 'ncurses-devel', 'openssl-devel' and 'zlib-devel' |
| 75 | or similar. The `contrib/scripts/install_prereq` script can be used to install |
| 76 | the dependencies for most Debian and Redhat based Linux distributions. |
| 77 | The script also handles SUSE, Arch, Gentoo, FreeBSD, NetBSD and OpenBSD but |
| 78 | those distributions mightnoit have complete support or they might be out of date. |
| 79 | |
| 80 | So, let's proceed: |
| 81 | |
| 82 | 1. Read the documentation.<br> |
| 83 | The [Asterisk Documentation](https://docs.asterisk.org) website has full |
| 84 | information for building, installing, configuring and running Asterisk. |
| 85 | |
| 86 | 2. Run `./configure`<br> |
| 87 | Execute the configure script to guess values for system-dependent |
| 88 | variables used during compilation. If the script indicates that some required |
| 89 | components are missing, you can run `./contrib/scripts/install_prereq install` |
| 90 | to install the necessary components. Note that this will install all dependencies |
| 91 | for every functionality of Asterisk. After running the script, you will need |
| 92 | to rerun `./configure`. |
| 93 | |
| 94 | 3. Run `make menuselect`<br> |
| 95 | This is needed if you want to select the modules that will be compiled and to |
| 96 | check dependencies for various optional modules. |
| 97 | |
| 98 | 4. Run `make`<br> |
| 99 | Assuming the build completes successfully: |
| 100 | |
| 101 | 5. Run `make install`<br> |
| 102 | If this is your first time working with Asterisk, you may wish to install |
| 103 | the sample PBX, with demonstration extensions, etc. If so, run: |
| 104 | |
| 105 | 6. Run `make samples`<br> |
| 106 | Doing so will overwrite any existing configuration files you have installed. |
| 107 | |
| 108 | 7. Finally, you can launch Asterisk in the foreground mode (not a daemon) with |
| 109 | `asterisk -vvvc`<br> |
| 110 | You'll see a bunch of verbose messages fly by your screen as Asterisk |
| 111 | initializes (that's the "very very verbose" mode). When it's ready, if |
| 112 | you specified the "c" then you'll get a command line console, that looks |
| 113 | like this:<br> |
| 114 | `*CLI>`<br> |
| 115 | You can type `core show help` at any time to get help with the system. For help |
| 116 | with a specific command, type `core show help <command>`. |
| 117 | |
| 118 | `man asterisk` at the Unix/Linux command prompt will give you detailed |
| 119 | information on how to start and stop Asterisk, as well as all the command |
| 120 | line options for starting Asterisk. |
| 121 | |
| 122 | ### ABOUT CONFIGURATION FILES |
| 123 | |
| 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 statements in the form |
| 128 | `variable = value` although you may see `variable => value` in older samples. |
| 129 | |
| 130 | ### SPECIAL NOTE ON TIME |
| 131 | |
| 132 | Those using SIP phones should be aware that Asterisk is sensitive to |
| 133 | large jumps in time. Manually changing the system time using date(1) |
| 134 | (or other similar commands) may cause SIP registrations and other |
| 135 | internal processes to fail. For this reason, you should always use |
| 136 | a time synchronization package to keep your system time accurate. |
| 137 | All OS/distributions make one or more of the following packages |
| 138 | available: |
| 139 | |
| 140 | * ntpd/ntpsec |
| 141 | * chronyd |
| 142 | * systemd-timesyncd |
| 143 | |
| 144 | Be sure to install and configure one (and only one) of them. |
| 145 | |
| 146 | ### FILE DESCRIPTORS |
| 147 | |
| 148 | Depending on the size of your system and your configuration, |
| 149 | Asterisk can consume a large number of file descriptors. In UNIX, |
| 150 | file descriptors are used for more than just files on disk. File |
| 151 | descriptors are also used for handling network communication |
| 152 | (e.g. SIP, IAX2, or H.323 calls) and hardware access (e.g. analog and |
| 153 | digital trunk hardware). Asterisk accesses many on-disk files for |
| 154 | everything from configuration information to voicemail storage. |
| 155 | |
| 156 | Most systems limit the number of file descriptors that Asterisk can |
| 157 | have open at one time. This can limit the number of simultaneous |
| 158 | calls that your system can handle. For example, if the limit is set |
| 159 | at 1024 (a common default value) Asterisk can handle approximately 150 |
| 160 | SIP calls simultaneously. To change the number of file descriptors |
| 161 | follow the instructions for your system below: |
| 162 | |
| 163 | #### PAM-BASED LINUX SYSTEM |
| 164 | |
| 165 | If your system uses PAM (Pluggable Authentication Modules) edit |
| 166 | `/etc/security/limits.conf`. Add these lines to the bottom of the file: |
| 167 | |
| 168 | ```text |
| 169 | root soft nofile 4096 |
| 170 | root hard nofile 8196 |
| 171 | asterisk soft nofile 4096 |
| 172 | asterisk hard nofile 8196 |
| 173 | ``` |
| 174 | |
| 175 | (adjust the numbers to taste). You may need to reboot the system for |
| 176 | these changes to take effect. |
| 177 | |
| 178 | #### GENERIC UNIX SYSTEM |
| 179 | |
| 180 | If there are no instructions specifically adapted to your system |
| 181 | above you can try adding the command `ulimit -n 8192` to the script |
| 182 | that starts Asterisk. |
| 183 | |
| 184 | ## MORE INFORMATION |
| 185 | |
| 186 | Visit the [Asterisk Documentation](https://docs.asterisk.org) website |
| 187 | for more documentation on various features and please read all the |
| 188 | configuration samples that include documentation on the configuration options. |
| 189 | |
| 190 | Finally, you may wish to join the |
| 191 | [Asterisk Community Forums](https://community.asterisk.org) |
| 192 | |
| 193 | |
| 194 | Welcome to the growing worldwide community of Asterisk users! |
| 195 | |
| 196 | ``` |
| 197 | Mark Spencer, and the Asterisk.org development community |
| 198 | ``` |
| 199 | |
| 200 | --- |
| 201 | |
| 202 | Asterisk is a trademark of Sangoma Technologies Corporation |
| 203 | |
| 204 | \[[Sangoma](https://www.sangoma.com/)\] |
| 205 | \[[Home Page](https://www.asterisk.org)\] |
| 206 | \[[Support](https://www.asterisk.org/support)\] |
| 207 | \[[Documentation](https://docs.asterisk.org)\] |
| 208 | \[[Community Forums](https://community.asterisk.org)\] |
| 209 | \[[Release Notes](https://github.com/asterisk/asterisk/releases)\] |
| 210 | \[[Security](https://docs.asterisk.org/Deployment/Important-Security-Considerations/)\] |
| 211 | \[[Mailing List Archive](https://lists.digium.com)\] |
| 212 |