Skip to main content

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.
zapata.conf
  • 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.
extensions.conf
  • The dialplans we create will be extremely primitive, but they will prove that the system is working.
sip.conf
  • This is where we’ll configure the SIP protocol.
iax.conf
  • 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
[100]
  • 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>
[101]
  • 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=192.168.1.100, 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.     http://asteriskvoipsystem.org/configure-asterisk-system/

Comments

Popular posts from this blog

Asterisk – CLI commands

Agent commands agent logoff  - Sets an agent offline agent show  - Show status of agents agent show online  - Show all online agents AGI commands agi dump html  - Dumps a list of AGI commands in HTML format agi exec  - Add AGI command to a channel in Async AGI agi set debug [on|off]  - Enable/Disable AGI debugging agi show commands [topic]  - List AGI commands or specific help dnsmgr refresh  - Performs an immediate refresh dnsmgr reload  - Reloads the DNS manager configuration dnsmgr status  - Display the DNS manager status Calendar commands calendar dump sched  - Dump calendar sched context calendar show calendar  - Display information about a calendar calendar show calendars  - Show registered calendars Channel commands channel originate  - Originate a call channel redirect  - Redirect a call channel request hangup  - Request a hangup on a given channel Cli commands cli check permissions  - Try a permissions config for a user cli reload permi

Step by step: Configure call recording - Asterisk tutorials

This article will cover enabling asterisk to record calls. You may want this to interview people over the phone, podcast, or some other purpose. In features.conf, under: [featuremap] uncomment the line that looks like this: automixmon => *3 ; One Touch Record a.k.a. Touch MixMonitor — Make sure to set the X and/or x option in the Dial() or    Queue() app call! Then, enable the X option for Dial() in your dialplan in extensions.conf: PLEASE NOTE:  change you need to make – add the X  your dial rule make look different with me. exten => s,n,Dial(SIP/100,60) make it this instead: exten => s,n,Dial(SIP/100,60,X) The X is what tells Asterisk to allow callers to dial *3 during a call to enable or disable recording. From the asterisk console (run asterisk -r), you should see a line like this appear when the user starts a recording: – User hit ‘*3′ to record call. filename: auto-xxxxx-EXTENSION-DIALEDNUMBER When the recording ends, un

Making video calls – Asterisk tutorial

sip.conf To be able to send video during a call, codec h263 and video support must be enabled. This is done by adding three lines in the sip.conf file (Location: /etc/asterisk/sip.conf). Add the following lines in the [general] tab of the file. videosupport = yes ; Enable video allow = h263 ; H.263 is our video codec allow = h263p ; H.263p is the enhanced video codec Reload Reload the sip.conf file by running the following command in the CLI console:  reload Config in Softphone  Click “Softphone”  Click “Preferences”    Click “Video Codecs”  Verify that h263 and h263+ are selected Click “OK”  Click the video (Webcam) icon to display the video  Dial the other sip phone (number 1002)  Click “Show Video” on the two sip phones. http://asteriskvoipsystem.org/making-video-calls-asterisk-tutorial/