Asterisk Voip

Configuration of Asterisk system

First, the major configuration files that need to be modified are in /etc/asterisk. Each file that ends in .conf is a configuration file, which sets parameters for some specific part of Asterisk. --> The configuration we do in this chapter won’t be particularly useful on its own, but it will be a kernel to build on. We’re going to touch on the following files: zaptel.conf
  • Here, we’ll do low-level configuration for the hardware interface. We’ll set up one FXO channel and one FXS channel. This configures the driver for the Linux kernel.
  • In this file, we’ll configure Asterisk’s interface to the hardware. This file contains a slightly higher-level configuration of the hardware in the Asterisk user-level process.
  • The dialplans we create will be extremely primitive, but they will prove that the system is working.
  • This is where we’ll configure the SIP protocol.
  • This is where we’ll configure incoming and outgoing IAX channels.
Asterisk doesn’t need any specialized hardware—not even a sound card—even though it is common to expect a telephone system to physically connect to a voice network. There are many types of channel cards that allow you to connect your Asterisk to things like analog phones or PSTN circuits, but they are not essential to the functioning of Asterisk. On the user (or station) side of the system, you can choose from all kinds of softphones that are available for Windows, Linux, and other operating systems—or use almost any physical IP phone. That handles the telephone side of the system. On the carrier side, if you don’t connect directly to a circuit from your central office, you can still route your calls over the Internet using a VoIP service provider. Basic SIP Telephone Configuration in Asterisk Session Initiation Protocol (SIP), is a standardized Voice over IP (VoIP) protocol. You can configure this protocol by editing /etc/asterisk/sip.conf. This file has a number of settings in a [general] section, followed our definitions of users.
--> Configuring a SIP phone to work with Asterisk does not require much. However, because there are so many options possible in both Asterisk and the configuration of the particular telephone set or softphone, things can get confusing. This is not the best way, but it is the simplest way, and from a working foundation, it is much easier to take a basic configuration and tweak things until you get the solution you need. Defining the SIP device in Asterisk If you put the following in a sip.conf file, you will be able to register a phone to the system. [general]
  • disallow=all
  • allow=ulaw
  • allow=alaw
  • type=friend
  • context=incoming (or whatever you want)
  • host=dynamic
  • secret=your password
  • dtmfmode=rfc2833
  • canreinvite= no
  • port=5060
  • dial=SIP/100
  • callerid=device <100>
  • type=friend
  • context=incoming
  • host=dynamic
  • secret=your password
  • dial=SIP/101
  • ....
  • ....
Even though we have named this SIP device 100, and we are probably going to assign it that extension number, you should note that we could have named it whatever we wanted. Names such as  john, 1234sfd3 or whatever you want are all valid, popular, and may suit your needs better. # What we are doing is assigning a unique identifier to a device, which will form part of the credentials when a call is placed using the SIP channel. Since we want to be able to both send calls to the softphone and allow the client to place calls, we have defined the type as friend. The other two types are user and peer. From the viewpoint of Asterisk, a user is configured to enter the  dialplan, and a peer is created for calls leaving the dialplan (via the Dial() application). A friend is simply a shortcut that defines both a user and a peer. If in doubt, define the type as friend. The host option is used to define where the client exists on the network when Asterisk needs to send a call to it. This can either be defined statically by defining something like host=, or if the client has a dynamic IP address, then we set host=dynamic. When the host option is set as dynamic, and the client is configured to register, Asterisk will receive a REGISTER packet from the endpoint (i.e., telephone set or softphone), telling Asterisk which IP address the SIP peer is using. You should now have extension 100 and extension 101. You can verify this with the sip show peers command from the  Asterisk console. Next, we’re going to configure the dialplan logic that will allow us to call between the extensions.

Title Post: Configuration of Asterisk system
5/5 5

: We on G+

Thanks for read this post.

Post a Comment

Return to top of page Copyright © 2013