Ok i read alot of the book (one of the resources posted above) at asteriskdocs, and wow have i come a long way since i first posted this. My problems were everywhere in the files i posted earlier, and would like to tell everyone what i did to fix it incase anyone else is having this same problem. I have now set up a complete phone system. I have a trunk registered, when you dial the number assigned to it my asterisk box plays a sound file from its hard drive that says “Weasels have eaten our phone system!” (One of the sound files that comes with asterisk). It them waits for DTMF. If you press any key from 1-7 it will play a sound file, reading the number that you pressed back to you. It then goes BACK to the Weasels message and waits for DTMF again. If you press 8, it rings the softphone i have on my other computer which is pointed towards my asterisk box’s local ip address. (And if i answer the call actually connects with 2 way audio) If you press 9 it thanks you for trying asterisk and hangs up the phone. Instead of pressing 8 to ring the phone you can also dial 2000. Outbound calls also function both local and long distance! I hope this helps someone
Here are my new files:
sip.conf
; Custom sip.conf file written for Asterisk
; Written by Aaron DeMarco
[general]
context=default
allowoverlap=no
bindport=5060
disallow=all
allow=ulaw
bindaddr=0.0.0.0
srvlookup=yes
register => AUTHNAME:AUTHKEY@PROVIDERIP/AUTHNAME
[2000]
type=friend
host=dynamic
secret=2000
context=phones
[trunk1]
disallow=all
allow=ulaw
username=AUTHNAME
fromuser=AUTHNAME
type=friend
secret=AUTHKEY
qualify=no
context=incoming
maxexpirey=3600
host=PROVIDERIP
fromdomain=PROVIDERIP
insecure=invite
dtmfmode=rfc2833
session-timers=refuse
defaultexpirey=60
nat=no
canreinvite=no
extensions.conf
; Custom extensions.conf file written for Asterisk
; Written by Aaron DeMarco
[general]
static=yes
writeprotect=no
autofallthrough=yes
clearglobalvars=yes
[globals]
[default]
[incoming]
exten => AUTHNAME,1,Answer()
exten => AUTHNAME,n,Background(/usr/share/asterisk/sounds/en_US_f_Allison/tt-weasels)
exten => AUTHNAME,n,WaitExten()
exten => AUTHNAME,n,Hangup()
exten => 1,1,Playback(/usr/share/asterisk/sounds/en_US_f_Allison/digits/1)
exten => 1,n,Goto(incoming,AUTHNAME,1)
exten => 2,1,Playback(/usr/share/asterisk/sounds/en_US_f_Allison/digits/2)
exten => 2,n,Goto(incoming,AUTHNAME,1)
exten => 3,1,Playback(/usr/share/asterisk/sounds/en_US_f_Allison/digits/3)
exten => 3,n,Goto(incoming,AUTHNAME,1)
exten => 4,1,Playback(/usr/share/asterisk/sounds/en_US_f_Allison/digits/4)
exten => 4,n,Goto(incoming,AUTHNAME,1)
exten => 5,1,Playback(/usr/share/asterisk/sounds/en_US_f_Allison/digits/5)
exten => 5,n,Goto(incoming,AUTHNAME,1)
exten => 6,1,Playback(/usr/share/asterisk/sounds/en_US_f_Allison/digits/6)
exten => 6,n,Goto(incoming,AUTHNAME,1)
exten => 7,1,Playback(/usr/share/asterisk/sounds/en_US_f_Allison/digits/7)
exten => 7,n,Goto(incoming,AUTHNAME,1)
exten => 8,1,Dial(SIP/2000,20)
exten => 8,n,Playback(/usr/share/asterisk/sounds/en_US_f_Allison/vm-sorry)
exten => 8,n,Hangup()
exten => 9,1,Playback(/usr/share/asterisk/sounds/en_US_f_Allison/demo-thanks)
exten => 9,n,Hangup()
exten => i,1,Playback(/usr/share/asterisk/sounds/en_US_f_Allison/pbx-invalid)
exten => i,n,Goto(incoming,AUTHNAME,1)
exten => 2000,1,Dial(SIP/2000,20)
exten => 2000,n,Playback(/usr/share/asterisk/sounds/en_US_f_Allison/vm-sorry)
exten => 2000,n,Hangup()
[outgoing]
exten => _NXXXXXX,1,Dial(SIP/trunk1/${EXTEN})
exten => _NXXXXXX,n,Congestion()
exten => _NXXXXXX,n,Hangup()
exten => _NXXXXXXXXX,1,Dial(SIP/trunk1/${EXTEN})
exten => _NXXXXXXXXX,n,Congestion()
exten => _NXXXXXXXXX,n,Hangup()
exten => _NXXXXXXXXXX,1,Dial(SIP/trunk1/${EXTEN})
exten => _NXXXXXXXXXX,n,Congestion()
exten => _NXXXXXXXXXX,n,Hangup()
[internal]
[phones]
include => outgoing