Asterisk IP PBX Learning Tutorials - Part 7

Watch lesson 6 on Softphones: Asterisk Video Tutorials - Using Softphones

Setting up softphones and hardphones

In this video I will tell you about software and hardware that can be used with asterisk.

As asterisk supports a number of VoIP protocols, any standard compliant software and hardware will do the job. VoIP market is booming and there already are a lot of devices that work with asterisk and number of those is increasing every day. One of the best devices for doing VoIP is linksys (a former sipura company), they provide a wide range of telephone adapters  that are easy to configure and use. A lot of websites on internet offer you configuration tools for such devices. You can find them by searching by your device name. [Read more →]

Asterisk IP PBX Learning Tutorials - Part 6

Here is video number 5: Using Contexts and Dial Plans - Part 2

Contexts and dialplan Part 2

Ok, moving to next context which is called “incoming-calls-wildcard”. Lets imagine situation when you have, say, hundreds of extensions, and writing rules for each one of them can take really much time. In this case wildcards are coming to save us.

Lets take a look at single rule with 2 steps in “incoming-calls-wildcard” context, as you can see I have changed last digit of dialled extension to capital “X”, which is any number from 1 to 9 and 0. But you also have to tell asterisk that this rule contains wildcard, you do it with putting subscribe sign in the beginning. But how can we tell asterisk what to dial when we have wildcards in our rules? We use built-in variables, one of them is ${EXTEN}. This is the way all variables are referenced in asterisk – dollar sign, opening curly bracket, variable name and closing curly bracket. [Read more →]

Asterisk IP PBX Learning Tutorials - Part 5

This video provides a further explanation: Using Contexts and Dial Plans - Part 1

Contexts and dialplan Part 1

This video will get you introduced to concept of dialplan in asterisk.

The dialplan is a set of instructions in asterisk specific language that tells the system what to do with the call. Dialplan is stored in extension.conf file, so lets open this file and begin.

Dialplan is divided into contexts, and as you can see each context starts with square brackets, just like  extensions, and can have any name. However there are 2 names that are reserved ”general” and “globals”, in “general section” you define general settings of dialplan and in “globals” section you define some global variables that will be used in your dialplan, as an example here TRUNK is a global variable that you can use in your further dialplan, and each occurrence of TRUNK will be replaced with its values which is Zap/G2. [Read more →]

Asterisk IP PBX Learning Tutorials - Part 4

Let’s review the extension configuration in the 3rd video: Asterisk Video Tutorials - Using Extensions with Asterisk
Extension

In this video I will show you one of the main principle of asterisk, those are extensions.

As I have showed you before, all asterisk’s configuration files are lying in /etc/asterisk directory. The files we are interested now are sip.conf and iax.conf.

An extension in asterisk is a user that is able to connect and use the system to place or receive calls, use voicemail and other features of asterisk. In order to define asterisk extension we should edit users.conf file. As you can see each extension starts with name in square brackets, like [205] here, next come some definition on what that extension is, its credentails and some asterisk specific options you have to setup. Let’s talk about each of this option:

- username is the username that this extension will use for registering with asterisk. Usually you will want to leave it same as name, which 205 in this case. The difference between name and username is that asterisk will use name to refer to extension through dialplan, but username is used to register with it. Leaving both of them the same will not make a mess out of your dialplan. [Read more →]

Asterisk IP PBX Learning Tutorials - Part 3

Ready for the next video? Here it is: Asterisk Video Tutorials - Running Asterisk

Running asterisk:

In this video I will show you how to run asterisk and where asterisk’s files are located.

There are 2 ways to run asterisk, in foreground and in background. Running in background is how asterisk runs almost all the time, while running in foreground is mainly used to debug some startup problems. Lets start with foreground mode.

In order to run asterisk in foreground mode you have to type asterisk -vc. As you can see asterisk is starting now, showing what modules it is loading and what configuration files are read. In order to stop asterisk you have to type “stop now” command. We have used 2 switches for asterisk when starting, that is -v which stands for verbose and -c which is for “console”, meaning you will be connected to asterisk console as soon as asterisk will run. You can use any number of -v’s to get even more verbose. Lets try to start asterisk with 3 -v’s [Read more →]