For an overview of all Asterisk configuration files, you can go here
Here is a minimal configuration with a free.fr trunk sip minimal setup
- sip.conf : for general sip parameters
- users.conf : your sip clients
- extensions.conf : the dialplan, the heart of Asterisk, where you define inbound/outbound calls.
- Dialplan can be configured with help of a graphical tool like Visual Dialplan, but your favotite text editor will be enough to get huge pleasure.
/etc/asterisk/sip.conf
[general]
context=home
; define default user context
disallow=all
; codec rules
allow=ulaw
allow=alaw
allow=gsm
qualify=yes
; check sip lines
canreinvite=no ; see
http://www.voip-info.org/wiki/view/Asterisk+sip+canreinvite
srvlookup=no
externip=78.214.126.119
localnet=192.168.0.0/255.255.255.0
defaultexpirey=1800
dtmfmode=auto
register = 09xxxxxxxx:secret@freephonie.net
[freephonie]
context=fromfree
type=peer
insecure=port,invite
host=freephonie.net
fromuser=09xxxxxxxx
username=09xxxxxxxx
secret=secret
dtmfmode=auto
qualify=yes
fromdomain=freephonie.net
nat=yes
disallow=all
allow=alaw
/etc/asterisk/users.conf
[general]
hasvoicemail = yes
hassip = yes
hasiax = yes
callwaiting = yes
threewaycalling = yes
callwaitingcallerid = yes
transfer = yes
canpark = yes
cancallforward = yes
callreturn = yes
callgroup = 1
pickupgroup = 1
nat = yes
[template](!)
type=friend
host=dynamic
dtmfmode=rfc2833
disallow=all
allow=ulaw
context = home
[5212](template)
fullname = Patrick Nomblot
username = pnomblot
secret=secret
[5214](template)
fullname = Kristin Kreuk
username = kkreuk
secret=secret
/etc/asterisk/extensions.conf
[home]
exten => _XXXX,1,Dial(SIP/${EXTEN},20)
exten => _XXXX,2,Hangup()
Now, next step, play with Asterisk !