Asterisk hardware solution. What is Asterisk. Asterisk configuration files
Despite the development of various information exchange systems, such as e-mail and instant messaging services, the regular telephone will remain the most popular means of communication for a long time. A key event in the history of telecommunications and the Internet was the advent of voice over IP networks, so the very concept of a telephone has changed in recent years. The use of VoIP is modern, convenient, and cheap, since you can combine remote offices without even resorting to the services of operators telephone communication. What other reasons are needed to set up your IP telephony server?
Project AsteriskAsterisk is present in the package repositories of most distributions. So, in Ubuntu, the sudo apt-cache search Asterisk command produces a decent list of packages, after installing which you can immediately begin configuration. But installing from the repository has one drawback - as a rule, the version of Asterisk in it is significantly behind the current one, which can be downloaded from the official website. Therefore, we will consider a universal installation method using the example of Ubuntu, although everything said (with rare exceptions) also applies to other distributions.
Install the packages required for compilation:
$ sudo apt-get install build-essential automake
autoconf bison flex libtool libncurses5-dev libssl-dev
Additionally, it is highly recommended to install libpri even if you do not need Primary Rate ISDN support. This can be done either through the repository: sudo apt-get install libpri1.2, or using source texts:
$ wget -c downloads.digium.com/pub/libpri/libpri-1.4-current.tar.gz
Compilation of the library is standard, so we won’t dwell on this.
Now download the Asterisk source code from the website and configure:
$ wget -c downloads.digium.com/pub/Asterisk/Asterisk-1.4.11.tar.gz
$ tar xzvf Asterisk-1.4.11.tar.gz
$cd Asterisk-1.4.11
$ ./configure --prefix=/usr
At the end of the script, we will see the project logo and some information about the settings in the console.
$make
$ sudo make install
Note: if you are installing version 1.2, then to support the mp3 format you should enter “make mpg123” before the make command; version 1.4 no longer responds to this command.
After compilation, among other things, the following executable files will be installed:
To install configuration file templates and documentation, type:
$ sudo make samples
Sample configuration files will be copied to /etc/Asterisk. If there are already configuration files in this directory, they will be renamed with the ".old" prefix. To build the documentation you will need the doxygen package; if it is not there, install it:
$ sudo apt-get install doxygen
$ sudo make progdocs
We install the package with Asterisk-addons extensions in the same way (this step is optional, you can safely skip it). Many of the modules included in this set are experimental. They should be installed only if you need to record information in the database, support mp3 files and the ooh323c protocol (Objective Systems Open H.323 for C):
$ wget -c downloads.digium.com/pub/Asterisk/Asterisk-addons-1.4.2.tar.gz
$ tar xzvf Asterisk-addons-1.4.2.tar.gz
$cd Asterisk-addons-1.4.2
$./configure; make; sudo make install; sudo make samples
The Asterisk installation is complete. It is recommended to first start the server in debug mode and look at the output for errors:
$ sudo /usr/sbin/Asterisk -vvvgc
If we receive the “Asterisk Ready” message and a management console prompt, then everything is in order. We leave:
*CLI> stop now
Now you can proceed to further configuration.
Setting up interface card supportIf you plan to connect the Asterisk server using special interface cards to regular telephone networks, you should ensure that the appropriate drivers are available, implemented as a kernel module. But even if there are no such devices on your computer, it is still recommended to install these drivers. The fact is that all Zaptel devices have a timer, and for the full operation of the IP telephony server it is necessary. But if you don’t have a Zaptel device at hand, you can use a special driver - ztdummy - to emulate it.
From the repository we install the zaptel, zaptel-source packages and assemble modules for our system:
$ sudo apt-get install zaptel zaptel-source
$sudo module-assistant prepare
$ sudo m-a -t build zaptel
The zaptel-modules-*_i386.deb package will appear in /usr/src, install it using dpkg. After this, we check the operation of the kernel modules:
$ sudo depmod -a
$ sudo modprobe ztdummy
And if you need device support:
$ sudo modprobe zaptel
$ sudo modprobe wcfxo
To provide them automatic download, run the following command:
$ echo "ztdummy\nzaptel\nwcfxo" >> /etc/modules
Create rules for UDEV:
$ sudo mcedit /etc/udev/rules.d/51-zaptel.rules
KERNEL="zapctl", NAME="zap/ctl"
KERNEL="zaptimer", NAME="zap/timer"
KERNEL="zapchannel", NAME="zap/channel"
KERNEL="zappseudo", NAME="zap/pseudo"
KERNEL="zap0-9*", NAME="zap/%n"
You can also use the source code or the CVS version of the driver. If you compile yourself, you will need the kernel header files (or source code):
$ sudo apt-get install linux-headers-`uname -r`
$ sudo ln -s /usr/src/linux-headers-2.6.20-15-generic /usr/src/linux-2.6
Now we get latest version drivers:
$ cd /usr/src
$ wget -c downloads.digium.com/pub/zaptel/zaptel-1.4-current.tar.gz
Compile and install:
$ tar xzvf zaptel-1.4-current.tar.gz
$ cd /usr/src/zaptel-1.2.17.1
$./configure
$make
$ sudo make install
And in order not to manually create configuration files:
$ sudo make config
After this command a script will be created for automatic start modules included in Zaptel, and the /etc/default/zaptel (or /etc/sysconfig/zaptel) config, which will indicate which modules need to be loaded. I recommend leaving only what is necessary in this file. Let's try to load the module:
$ sudo modprobe ztdummy
$lsmod | grep ztdummy
ztdummy 6184 0
zaptel 189860 1 ztdummy
Everything is fine. After installation, two more files will appear on the system:
Detailed instructions for all types of devices are given in the documentation. In Russian, you can read about this in the document “Zaptel Kernel Driver Configuration”. But we don’t stop there, we still have a lot of work ahead. After configuration, we check the operation with the command ztcfg -vv.
User registrationIf you now look in the /etc/Asterisk directory, you will find a large number of files. But the size of a journal article will allow us to get to know only some of them. Thus, Asterisk .conf specifies the directories that Asterisk will use during operation, the location and owner of the socket used to connect the remote management console, as well as the default server startup parameters. Some directories are not created during installation; this will have to be done manually:
$ sudo mkdir -p /var/(run,log,spool)/Asterisk
$ sudo adduser --system --no-create-home Asterisk
$ sudo addgroup --system Asterisk
Let's add the Asterisk user to the audio group:
$ sudo adduser Asterisk audio
$ sudo chown Asterisk:Asterisk /var/run/Asterisk
$ sudo chown -R Asterisk:Asterisk /var/(log,spool)/Asterisk
Next, we are interested in the sip.conf file, which defines the SIP servers and clients with which our Asterisk will be friends. Each of them is presented in the file as a separate block, which begins with a table of contents enclosed in square brackets. There are quite a lot of parameters in sip.conf, we will limit ourselves to adding a SIP account:
$ sudo mcedit /etc/Asterisk/sip.conf
type=friend
host=dynamic
; defaultip=192.168.1.200
username=grinder
secret=password
language=en
nat=no
canreinvite=no
context=office
callerid=grinder
mailbox=1234@office
; Before using the allow parameter, you must disable all codecs
disallow=all
; The order of the codecs does not matter
allow=ulaw
allow=alaw
The type field specifies what this client can do. If the value is user, he will only be allowed to receive incoming calls, with peer he will only be able to make calls, and friend means all actions at once, that is, user+peer. The host field specifies the IP address from which this client is allowed to connect. If it can connect from any address, specify host=dynamic. And in this case, in order to call the client when it is not yet registered, you should write down the IP address in defaultip, where it can always be found. In username and secret we indicate the login and password used by the client when connecting. The Language parameter specifies the greeting language code and specific phone signal settings,
which are defined in the indications.conf file. When the client is running behind NAT, the corresponding field must be set to yes. Disabling canreinvite forces all RTP voice traffic to go through Asterisk. If clients support SIP re-invites, they can be allowed to connect directly by specifying canreinvite=yes. The context field determines the plan dial in which calls coming from this client fall, and callerid is the string that will be displayed when calling from the client. By default, the default context is used, which takes all the settings from the demo context. The latter is intended solely for demonstration purposes, in working system you need to create your own context.
The mailbox field points to voicebox 1234 in the office context. Other clients are configured in the same way.
Once SIP accounts are defined, our clients can register with the Asterisk server and make outgoing calls. In order for them to be able to receive calls, they must refer to the extensions.conf file, which describes the dialplan that distributes calls in the system. All allowed extensions are also indicated here.
$ sudo mcedit /etc/Asterisk/extensions.conf
include => default
exten => 1234,1,Dial(SIP/grinder,20)
exten => 1234,2,Voicemail(grinder)
Everything is simple here. We assign the number 1234 to the user grinder, and if he does not answer the call, he can be left a message in voicemail. The number after the number means priority, which determines the sequence of tasks. Now, if Asterisk is running, you should connect to its console by running Asterisk -r on the same machine, and using the reload command, force it to re-read the configuration files. There are also commands to reload a specific file. For example, the dial plan is reread with the extensions reload command.
The server is ready to receive clients. At www.Asterisk guru.com/tutorials/configuration_Asterisk_softphone.html we select a soft client and try to connect. For example, I like the free version of the ZoIPer (formerly Idefisk) program, which is simple and easy to use. There are versions for Linux, Windows and Mac OS X. Another good and also multi-platform client is X-Lite.
If everything is fine, a message like “Registered SIP “grinder” at 192.168.0.1 port 5060” should appear in the console, dial the number and call.
We configured Asterisk in a minimal configuration, but that's not all it can do. What remains behind the scenes is connecting to another IP telephony server, call parking, music while waiting, billing, using the GUI to administer the server, etc., but we will try to fill these gaps in the following articles.
- Clients can't reach you by phone? Asterisk + multichannel phone number over the Internet and your customers will no longer hear a busy signal. All calls will be accepted.
- Consolidation of branches into a single telephone network! Free calls between offices across the country or even the world using short numbers to a specific employee*
- Large bills for communication services? Asterisk + voip provider and bills will no longer bother you.
- High cost of calls on business trips? Astersk + sip client on your mobile phone or computer and you call your colleagues in the office for free, and in other directions - at the rates of the operator providing communication services in your office*
- Do you need to provide communications to remote employees? Asterisk + ip-phone or sip-client - and you call them and they call you for free short number like colleagues in the office*
- Does your secretary have time to process calls and can’t make you coffee? There is a solution - Asterisk + interactive voice menu! It will relieve your secretary and make it easier for clients to connect with the desired department or employee.
- Missed an important call? Asterisk + flexible call forwarding options and this will never happen again!
- Do managers spend a lot of time calling clients? Asterisk+ and numbers are dialed automatically from your contact list!
- Concerned about information leakage or staff honesty? Asterisk + recording telephone conversations and the security department is delighted!
* - you only pay for Internet access services.
These and other problems can be solved modern system IP-telephony based free product- Asterisk software telephone exchange.
What is Asterisk? To organize office telephony, we bring to your attention solutions based on the free software telephone exchange Asterisk IP-PBX from Digium, which has all the capabilities of a classic PBX, as well as powerful additional functionality available only in expensive enterprise-level hardware PBXs. At the same time, Asterisk is quite affordable for small and medium-sized businesses - the cost of its deployment is comparable to the cost of installing a regular office PBX.Both software and hardware VoIP phones, as well as conventional analog telephones and SIP-DECT microcellular equipment can be used as end devices. Integration with existing hardware PBX is possible.
Asterisk is not demanding on hardware resources and can be deployed on a simple personal computer, netbook, on a virtual machine. In case of using VoIP phones, no SCS installation is required for analog telephony, you can use a regular computer network.
Asterisk is a flexible system that can change and adapt to any future requirements. As the business grows, Asterisk will scale and grow with it.
Asterisk IP-PBX features:- call switching according to specified rules with extremely flexible capabilities (almost anything is possible), including directing the call to the operator with the lowest call cost
- transfer, parking, forwarding, call interception, follow me lists, groups (hunt, ucd, etc.);
- call center functions (call queuing and distribution to operators);
- interactive voice menu (IVR);
- answering machine, voice mail, sending messages to email;
- conference call;
- Call Back, as well as access to various call directions using a pin code;
- receiving faxes by email, fax server;
- recording telephone conversations;
- call log (CDR);
- reporting and statistics on calls;
- support for many VoIP protocols and codecs (SIP, H.323, etc.);
- ability to connect to VoIP providers (Sipnet, Skype, etc.);
- connection to the PSTN via both analog lines and E1 streams;
- support for any end devices (regular analog, mobile, hardware and software VoIP phones);
- integration with hardware PBXs via VoIP or E1 using standard interexchange protocols;
- consolidation of remote offices into a single telephone network;
- providing remote and field employees with an internal office telephone;
- integration with Microsoft Outlook and other applications that support the TAPI interface
- integration with external systems and software (1C products, CRM systems, website, etc.).
An example of programming the logic of an incoming call from city lines:
For small businesses we offer an inexpensive solution based on the Yeastar S20 IP-PBX.
For medium and large companies, as well as for those who require flexibility of settings and the ability to scale, we offer a universal solution that can be installed on virtual machine or physical server. As a result, the customer receives guaranteed fresh, stable software (CentOS, Asterisk, FreePBX) installed in his working environment.
Basic cost of implementation:
19,500 rublesincluding VAT 18%
The base price includes the following:
- Installation of Asterisk on the customer’s equipment or virtual machine (includes installation of the latest stable versions of CentOS, FreePBX, Asterisk)
- Connecting to a sip provider
- Creating up to 20 internal numbers and setting up IP phones*
- Typical call switching, transfer, call interception
- Voice greeting with the ability to dial internal numbers
- Receiving faxes by e-mail
- Voicemail with sending messages to the subscriber's e-mail
- Web access to call statistics and station management (FreePBX)
- Recording telephone conversations
- Delivery and installation of the server at the customer’s site (Moscow and the nearest Moscow region)
*- at self-configuration it is possible to reduce the cost of implementation to 16,500 rubles.
To manage Asterisk, we use the FreePBX system with our own modifications that increase the usability of IP telephony.
As terminal equipment we offer well-proven Yealink telephone sets. Our company is the official dealer of this brand and we are ready to offer you devices at a competitive price.
We use well-proven equipment from Linksys and Cisco as gateways for connecting to classic telephony.
5/5 (1 vote)
There is an opinion that IP telephony is not suitable for offices due to unreliable communication. But one can name a huge number of arguments that will present this connection in a completely different light. Companies with standard telephone network based on mini-PBXs lose a lot if we compare them with IP technologies, which provide a cheap and high-quality communication environment operating on the basis software Asterisk server IP.
Automatic telephone exchange Asterisk allows you to create communication in offices using cable local network, and also maintains communication with remote employees who are located outside the office premises.
Features of installing IP PBX AsteriskThe Asterix software server uses analog and digital telephone communications. The server is installed by connecting to special broadband T1/E1 lines, and all office equipment must be designed specifically for IP telephony.
Asterisk PBX software will allow even small companies to have basic telephony functions. Asterisk setup will not take much time to enable functions such as voice mail, call recording, detailing and distribution of calls to subscribers. Previously, these opportunities were primarily available only to large companies.
Structured cable network Perfect for installing Asterix PBX, so there is no need to run new wires or install additional gateways. For IP telephony to work, you only need to purchase a server, which will be cheaper than a classic PBX.
To create an Asterisk IP PBX in your office, you only need to pay for the basic steps: Asterisk installation and configuration, as well as future maintenance. A special feature of this system is the ability to connect an unlimited number of subscribers. If there is a need to further expand the points, then this action will take much less time than creating a new telephone exchange and synchronizing with other stations.
Asterisk pbx is configured by specialists and allows you to reboot and install new modules, while the connection continues to function. This type of telephony works with many operating systems and is available to everyone around the world.
ATC Asterisk for offices provides enormous IP telephony capabilities:- record and save telephone conversations;
- track an active call;
- use the voice menu;
- use voicemail and send emails;
- work with faxes in electronic format;
- maintaining call details;
- create a call center for internal work office;
- support popular communication protocols: skype, google talk, sip, iax, jabber. This one gives additional opportunity video communication, and also involves the exchange of documents or images;
- connect remote subscribers to the system;
- conduct conferences between three users;
- hold an unlimited number of calls on hold if you cannot answer immediately;
- create black lists of subscribers;
- call several numbers at once;
- Asterisk setup allows you to manage calls using software;
- create additional vehicle modules.
- Integrating IP telephony into offices.
- Service at a high level.
- Possibility of combining Asterix with the 1C Enterprise accounting program or CRM system.
- Communication management does not require special costs and allows you to create a separate line for each subscriber.
- Setting up an asterisk telephone exchange allows you to make modifications if desired by the client.
- Availability to all companies thanks to the creation of telephony based on the existing digital PBX.
- This type of communication operates on the basis of the Unix operating system, which has proven itself to be reliable and high-quality software. In case of any failures, the work of the IP telephony server is automatically copied to another server.
- Asterix allows you to create a single network even between company offices that are located in different parts of the city. Therefore, there is no need to purchase several traditional stations.
Asterisk is a full-fledged software PBX. She can work on these operating systems, like Linux, BSD, Windows and OS X and provides you with all the features that a regular PBX has and even more. The functioning of Asterisk is based on protocols that provide voice transmission over IP-based networks (VOIP) and, thanks to this, this PBX can work with almost any equipment for IP telephony that uses standard protocols for VOIP, while using a relatively inexpensive Hardware.
Asterisk provides voicemail, conferencing, interactive voice response (IVR), call center and call queuing functions. It also supports services such as call transfer to another subscriber, service for determining and transmitting the caller ID to the called subscriber, ADSI protocols (both in terminal mode and in gate mode), (for call manager only) and SCCP /Skinny (not completely). In the Features section you can find a more complete list of functions that Asterisk can perform.
Asterisk does not require additional hardware to implement voice over IP (VOIP) networks. You can use a single (or multiple) VOIP providers for incoming and/or calling (incoming and outgoing calls can be handled by different Internet and/or landline providers)
To enable communications between digital and analog telephone equipment, Asterisk has support for several hardware devices, which can be referred to as equipment manufactured by the Asterisk project sponsor, Digium. Digium produces single and quadruple and interface boards for communications with channels and . In addition, interfaces are produced, from one to four ports per board, for communication with analog telephone lines and , which are popular when building a small automatic telephone exchange. Interface devices from other manufacturers can be used to provide channels (ISDN2) with four and eight ports if they are CAPI compatible or based on the HFC chipset.
And finally, for the rest of the range of tasks, including expanding FXO or FXS ports, you can use stand-alone devices with FXO or FXS ports, which can simply be connected to an IP network and registered with Asterisk, like telephone channels.
Previous stable version Asterisk - Asterisk v1.2|1.2.40
Previous stable version of Asterisk - Asterisk v1.4|1.4.41
Previous stable version of Asterisk - Asterisk v1.6|1.6.2.16.1
Previous stable version of Asterisk - Asterisk v1.8|1.8.2.1
The previous stable version of Asterisk is Asterisk v11|11.25.1
The current stable version of Asterisk is Asterisk v13|13.15.0
The next (not stable) release of the Asterisk server is Asterisk 14|14.4.0
A version of Asterisk is in development - Asterisk 15
Asterisk rollout tips: Helping you move from testing to practical use. Asterisk security: Security of your PBX. : Monitoring the server and periodically checking its performance. Asterisk High Availability Solutions: Software and hardware solutions to increase server reliability. Asterisk Bootable CDROM: Boot and run the Asterisk server from a CDROM. Asterisk OS Platforms: What operating systems can Asterisk run on. Links Configuration: Full list! : Description of Asterisk configuration files. : Variables used in configuration and dial plan. : Built-in database used in the dial plan. - Asterisk configuration using a database. Asterisk configuration using template files. : Powerful interface for creating software scripts. : Asterisk Extension Language : Asterisk Extension Language version 2 - Asterisk configuration to support DUNDi and SIP connections - Asterisk configuration to work with Ranch Networks devices via MIDCOM protocol
How to set up an Asterisk server connection with other VOIP providers. Asterisk Configuration Examples: Complete Asterisk configuration examples from various users. Asterisk Data Configuration: Zaptel and Asterisk data and hybrid configuration Notes on the Asterisk server configuration for working with some specific phones. Asterisk Slimming: How can we slim-up about so many modules Asterisk tips and tricks: Many examples of solving various problems using configuration files.
Management: Supported codecs. Asterisk libpri: Open Source library. Asterisk Paging and Intercom. : Standard sound files and their purpose. Asterisk multi-language: Notes on multilingual configuration of the Asterisk server. Asterisk vertical service activation codes: *XX codes used in Zap channels.Asterisk debugging: How to get debugging information in Asterisk. Asterisk PSTN interface debugging: Problems with echo, signal strength, etc.