From ArchWiki
Revision as of 02:33, 5 February 2006 by WillySilly (talk | contribs) (removing some blank lines)
Jump to navigation Jump to search

Asterisk Configration


Asterisk is a complete PBX in software. It runs on Linux, BSD, Windows and OS X and provides all of the features you would expect from a PBX and more. Asterisk does voice over IP in four protocols, and can interoperate with almost all standards-based telephony equipment using relatively inexpensive hardware.

Asterisk provides Voicemail services with Directory, Call Conferencing, Interactive Voice Response, Call Queuing. It has support for three-way calling, caller ID services, ADSI, IAX, SIP, H.323 (as both client and gateway), MGCP (call manager only) and SCCP/Skinny.

This wiki will show you how to configure a simple in house network enabling us to use a SIP softphone to talk to another SIP softphone on your LAN. This is nothing major, but will get you familiar with Asterisk configuration and its pretty cool.

What You Need

Of course, youll need Asterisk, a SIP softphone and at least two machines. Recommendations for SIP phones are kphone and x-lite.


Assuming your asterisk server is up and running we will only need to edit two files sip.conf and extensions.conf. Change to your asterisk configuration directory (should be /etc/asterisk). Edit sip.conf and place the following in:



This creates our two SIP users me1 and me2 with a password of password in the house context. We will be defining the context next.

Edit extensions.conf with the following:

exten => 100,1,Dial(SIP/me1)

exten => 101,1,Dial(SIP/me2)

This creates that context house and assigns extension 100 to the SIP user me1, and extension 101 to the SIP user me2. Now all thats left is to see if it works.

Asterisk Console And Softphones

Now lets get Asterisk going. To do this enter

# asterisk -vvvvvvc

This will give us the Asterisk CLI with verbose output. If Asterisk is already running you'll need to use

# asterisk -r

Now fire up your SIP clients and set them up with the information in the sip.conf. Switch back to your Asterisk CLI and you should see

 Registered SIP 'me1' at port 5061 expires 60

Now you should be able to dial 101 from me1 and talk to me2.

Common Problems

If you recieve a 404 Not Found error check your extensions.conf and the number you dialed.

Coming Up

  • Voicemail
  • Connecting To The Outside
  • Music On Hold