Can anyone see any dumb mistakes? I have poor incoming sound quality on incoming and outgoing calls.
Sip.conf
[code]
[general]
port=5060
bindaddr=0.0.0.0
canreinvite=no
dtmfmode=rfc2833
disallow=all
allow=ulaw
callerid=Unknown
notifyringing=yes
notifyhold=yes
limitonpeers=yes
tos_sip=cs3
tos_audio=ef
tos_video=af41
nat=no
context=school
[100]
type=friend
host=dynamic
dtmfmode=rfc2833
callerid=Sherry Phillips
secret=100
mailbox=100
; other extensions here as above
[trunk-out]
type=peer
host=172.22.9.3 ; this is voip gateway
port=5060
fromuser=+12085555555
dtmfmode=rfc2833
nat=yes ; testing quality
[trunk-in]
type=peer
host=172.22.9.3
port=5060
nat=yes ; required here!
reinvite=no ; required!
canreinvite=no ; required!
context=frombandwidth ; arbitrary name for context
dtmfmode=rfc2833[/code]
Extensions.conf:
[code][general]
static=yes
writeprotect=no
[globals]
TRUNK=SIP/trunk-out
HSPAGE=SIP/412&SIP/416&SIP/417&SIP/418&SIP/419&SIP/420&SIP/422&SIP/424&SIP/426&SIP/427&SIP/428&SIP/431&SIP/433&SIP/436&SIP/440&SIP/441&SIP/444&SIP/445&SIP/447&SIP/448&SIP/449
MSPAGE=SIP/301&SIP/302&SIP/303&SIP/304&SIP/305&SIP/306&SIP/325
TESTPAGE=SIP/423
[outgoing]
exten => 911,1,Dial(${TRUNK}/911)
exten => 9911,1,Dial(${TRUNK}/911)
exten => 9111,1,Dial(${TRUNK}/911)
exten => 9991,1,Dial(${TRUNK}/911)
exten => 99911,1,Dial(${TRUNK}/911)
exten => 999111,1,Dial(${TRUNK}/911)
exten => _91900XXXXXXX,1,Congestion()
exten => _1900XXXXXXX,1,Congestion()
exten => _XXXXXXX,1,Dial(${TRUNK}/+1208${EXTEN})
exten => _XXXXXXX,2,Congestion()
exten => _XXXXXXX,102,Congestion()
exten => _XXXXXXXXXX,1,Dial(${TRUNK}/+1${EXTEN})
exten => _XXXXXXXXXX,2,Congestion()
exten => _XXXXXXXXXX,102,Congestion()
exten => _XXXXXXXXXXX,1,Dial(${TRUNK}/+${EXTEN})
exten => _XXXXXXXXXXX,2,Congestion()
exten => _XXXXXXXXXXX,102,Congestion()
[frombandwidth]
exten => +12085555555,1,Wait(2)
exten => +12085555555,n,Goto(main,1)
exten => +12085555555,1,Wait(2)
exten => +12085555555,n,Goto(school,2,1)
exten => +12085555555,1,Wait(2)
exten => +12085555555,n,Goto(school,3,1)
exten => +12085555555,1,Wait(2)
exten => +12085555555,n,Goto(school,4,1)
exten => _+1208.,1,Wait(2)
exten => _+1208.,n,Goto(main,1)
exten => 101,1,Wait(2)
exten => 101,n,Dial(SIP/100,15,Ttr)
exten => 101,n,Dial(SIP/100&SIP/101,10,Ttr)
exten => 101,n,Voicemail(100,u)
exten => 101,n+101,Voicemail(100,b)
exten => main,1,Answer()
exten => main,n,Set(TIMEOUT(digit)=4)
exten => main,n,Set(TIMEOUT(response)=10)
exten => main,n,Background(wssd_greeting)
exten => main,n,Goto(1)
include => school
include => badext
[school]
exten => 1,1,Dial(SIP/100,15,Ttr)
exten => 1,n,Dial(SIP/100&SIP/101,10,Ttr)
exten => 1,n,Voicemail(100,u)
exten => 1,n+101,Voicemail(100,b)
exten => 2,1,Dial(SIP/200&SIP/206,15,Ttr)
exten => 2,n,Dial(SIP/200&SIP/206&SIP/209,15,Ttr)
exten => 2,n,Dial(SIP/200&SIP/206&SIP/209&SIP/205,10,Ttr)
exten => 2,n,Voicemail(200,u)
exten => 2,n+101,Voicemail(200,b)
exten => 3,1,Dial(SIP/300,20,Ttr)
exten => 3,n,Dial(SIP/300&SIP/305,10,Ttr)
exten => 3,n,Voicemail(300,u)
exten => 3,n+101,Voicemail(300,b)
exten => 4,1,Set(TIMEOUT(digit)=4)
exten => 4,n,Set(TIMEOUT(response)=10)
exten => 4,n,Background(high_school_greeting)
exten => 4,n,Goto(1)
exten => 106,1,Dial(SIP/106&SIP/108,20,Ttr)
exten => 106,n,Voicemail(106,u)
exten => 106,n+101,Voicemail(106,b)
exten => 108,1,Goto(school,106,1)
exten => 400,1,Dial(SIP/400&SIP/401,15,Ttr)
exten => 400,n,Dial(SIP/400&SIP/401&SIP/405,10,Ttr)
exten => 400,n,Voicemail(400,u)
exten => 400,n+101,Voicemail(400,b)
exten => 4999,1,SIPAddHeader(Call-Info: answer-after=0)
exten => 4999,n,Page(${HSPAGE})
exten => 3999,1,SIPAddHeader(Call-Info: answer-after=0)
exten => 3999,n,Page(${MSPAGE})
exten => 7999,1,Goto(ivr_menu,s,1)
exten => 8000,1,Playback(school_menu_joke)
exten => _3XX,1,Macro(dialMSExtension,${EXTEN})
exten => _XXX,1,Macro(staff,${EXTEN})
include => voicemail
include => badext
include => outgoing
[badext]
exten => i,1,Playback(pbx-invalid)
exten => i,2,Goto(frombandwidth,main,1)
exten => t,1,Playback(vm-goodbye)
exten => t,2,Hangup()
[voicemail]
exten => _50XXX,1,Wait(1)
exten => _50XXX,2,VoicemailMain(${EXTEN:2}) ; just ask for the password we’re already in their vmail
exten => _50XXX,3,Hangup()
exten => 50,1,VoicemailMain ; ask for everything, user (extension) and password - see voicemail.conf
exten => 51,1,MusicOnHold()
exten => _*XXX,1,Voicemail(${EXTEN:1},u)
[macro-staff]
exten => s,1,Dial(SIP/${ARG1},20,Tt)
exten => s,2,Voicemail(${ARG1},u) ; Unavailable message
exten => s,102,Voicemail(${ARG1},b) ; Busy message - Remember they can record Name, Busy, and Unavailable
exten => s,n,Hangup()
include => badext
[macro-dialMSExtension] ; after direct dialing MS extension, bounce to secretary
exten => s,1,Dial(SIP/${ARG1},20,Tt)
exten => s,2,Dial(SIP/300,10,Tt)
exten => s,3,Voicemail(${ARG1},u) ; Unavailable message
exten => s,102,Voicemail,(${ARG1},b) ; Busy message - Remember they can record Name, Busy, and Unavailable
exten => s,n,Hangup()
include => badext
[ivr_menu]
exten => s,1,Answer()
exten => s,n,Set(TIMEOUT(digit) = 8)
exten => s,n,Set(TIMEOUT(response) = 8)
exten => s,n,Background(what_to_do)
exten => s,n,Goto(s,1)
exten => 001,1,Record(wssd_greeting.ulaw)
exten => 001,n,Goto(ivr_menu,s,1)
exten => 002,1,Playback(wssd_greeting)
exten => 002,n,Goto(ivr_menu,s,1)
exten => 007,1,Record(high_school_greeting.ulaw)
exten => 007,n,Goto(ivr_menu,s,1)
exten => 008,1,Playback(high_school_greeting)
exten => 008,n,Goto(ivr_menu,s,1)
exten => 009,1,Record(middle_school_greeting.ulaw)
exten => 009,n,Goto(ivr_menu,s,1)
exten => 010,1,Playback(middle_school_greeting)
exten => 010,n,Goto(ivr_menu,s,1)
exten => 011,1,Record(elementary_school_greeting.ulaw)
exten => 011,n,Goto(ivr_menu,s,1)
exten => 012,1,Playback(elementary_school_greeting)
exten => 012,n,Goto(ivr_menu,s,1)
exten => 013,1,Record(what_to_do.ulaw)
exten => 013,n,Goto(ivr_menu,s,1)
exten => 014,1,Playback(what_to_do)
exten => 014,n,Goto(ivr_menu,s,1)
exten => i,1,Goto(ivr_menu,s,1)
exten => t,1,Goto(ivr_menu,s,1)[/code]