Let's get started... Download the source code from svn and build it. You can copy the commands below into the console and lean back in your chair while waiting.
svn co svn.digium.com/svn/asterisk/branches/1.6.0 asterisk
cd asterisk
./configure && make && make install && make samples && make config
cd ..
svn co svn.digium.com/svn/asterisk-gui/branches/2.0 asterisk-gui
cd asterisk-gui
./configure && make && make install
cd ..
After the build process completes, we will edit two configuration files:
/etc/asterisk/manager.conf should look something like this:
[general]
enabled = yes
webenabled = yes
port = 5038
bindaddr = 127.0.0.1
[admin]
secret = 123456
read = system,call,log,verbose,agent,user,config,dtmf,reporting,cdr,dialplan
write = system,call,agent,user,config,command,reporting,originate
And /etc/asterisk/http.conf should look like this:
[general]
enabled = yes
enablestatic = yes
bindaddr = 0.0.0.0
redirect = / /static/config/cfgbasic.html
[post_mappings]
backups = /var/lib/asterisk/gui_backups
Start asterisk:
/etc/init.d/asterisk start
The installation process is now complete.
Configuring Asterisk using Asterisk GUI
Let's consider a simple case. We have one user (one VoIP phone) in our system. There is a SIP trunk to the provider my.sip.trunk.com. The provider has given us one trial number — 7692450. Our task is to allow our single user to make and receive calls.
On the workstation, launch a browser and enter x.x.x.x:8088 in the address bar, where x.x.x.x is the IP address of the machine where Asterisk and Asterisk GUI are installed. Enter the username and password, and click the login button.

After a brief period of messages about configuration file updates (the system will try to determine if you have any Digium hardware installed), we will land on the main page.

First, let's configure the SIP trunk to the provider. Go to "Trunks", "VoIP Trunks", and click "New SIP/IAX Trunk". Fill in the fields in the dialog box as shown in the picture.

Configure a rule for outgoing calls: all outgoing calls should be sent to the newly created trunk. Go to "Outgoing Calling Rules". Click "New Calling Rule" and fill in the fields in the dialog box.

Configure the dialplan. A dialplan is nothing more than a group of rules for outgoing calls. In our case, we have only one rule. So, go to "Dial Plans", click "New DialPlan". In the dialog box, check the rule created in the previous step.

Create a user. Go to "Users". Click "Create New User". Assign a name (CallerID Name), a number for outgoing calls (CallerID Number), and a dialplan to our user.

Finally, define a rule for incoming calls. This topic is quite interesting in itself and could be the subject of a separate article. The fact is that an incoming call can be routed to an interactive menu ("to contact technical support — press 1, to contact sales department — press 2, to speak with an operator — press 0"), sent to multiple phones simultaneously (until someone picks up), sent to a voicemail if no one answers within n seconds, forwarded to a mobile phone... and much more. We will modestly route incoming calls to our single user. So, go to "Incoming Calling Rules", click "New Incoming Rule", and fill in the fields in the dialog box as shown in the picture.

That's it. Click the "Apply Changes" button in the upper right corner.
I hope this article is useful to someone.
