Hi,
I’ve inherited an asterisk system on an older fedora box with dahdi that works, but appears to be configured incorrectly. I’m a relative asterisk novice, but experienced Linux admin, so could really use some help.
Currently, the voice prompts (I forget what they’re called) send each option (Sales, tech support, etc) directly to voicemail.
I’d like to configure them to go directly to a phone first, then voicemail if there is no answer.
We currently have two physical phones, x7003 (tech support and Ben) and x7004 (sales and Robert). x7000 (general mailbox) is the general mailbox. I’ve attached my extensions.conf file, with our number changed to 5551212. Is this the proper file to make these changes?
I’ve also attached my sip.conf just in case.
Any ideas greatly appreciated.
[general]
static = yes
writeprotect = no
[globals]
VOICEPULSE_TRUNK01 = voicepulse-primary
VOICEPULSE_TRUNK02 = voicepulse-secondary
[macro-stdexten]
exten => s,1,Dial(${ARG1},20,tr)
exten => s,2,Goto(s-${DIALSTATUS},1)
exten => s-NOANSWER,1,Voicemail(${ARG2}@local,u) ; No answer.
exten => s-NOANSWER,2,Hangup
exten => s-BUSY,1,Voicemail(${ARG2}@local,b) ; Phone busy.
exten => s-BUSY,2,Hangup
exten => _s-.,1,Playback(invalid) ; Channel unavailable.
exten => _s-.,2,Goto(incoming,_1NXXNXXXXXX,4)
[macro-shitlist]
exten => s,1,Answer
exten => s,2,Congestion
exten => s,3,Hangup
[local]
exten => 7000,1,Macro(stdexten,SIP/7003,7003)
exten => 7003,1,Macro(stdexten,SIP/7003,7003)
exten => 7004,1,Macro(stdexten,SIP/7004,7004)
exten => 8000,1,Goto(incoming,s,1)
exten => _8XXX,1,Playback(invalid)
exten => _8XXX,2,Goto(incoming,s,1)
exten => _9XXX,1,Playback(invalid)
exten => _9XXX,2,Goto(incoming,s,1)
exten => *86,1,Answer
exten => *86,2,Wait(.5)
exten => *86,3,VoicemailMain(@local)
exten => *86,4,Hangup
exten => *87,1,Answer
exten => *87,2,Wait(.5)
exten => *87,3,VoicemailMain(${CALLERID(num)}@local)
exten => *87,4,Hangup
exten => 9,1,Set(CALLERID(all)=9 - ${CALLERID(name)} <${CALLERID(num)}>)
exten => 9,2,Directory(local)
exten => 9,3,Hangup
exten => h,1,Hangup
exten => i,1,Hangup
exten => t,1,Hangup
[macro-intercom]
exten => s,1,ChanIsAvail(${ARG1},js)
exten => s,2,SIPAddHeader(Alert-Info: Ring Answer)
exten => s,3,Dial(${ARG1},,)
exten => s,4,Hangup
exten => t,1,Hangup
exten => T,1,Hangup
[intercom]
exten => _X.,1,Macro(intercom,SIP/${EXTEN})
[testing]
exten => 200,1,Goto(mainmenu-day,_1NXXNXXXXXX,1)
exten => 201,1,Goto(mainmenu-night,_1NXXNXXXXXX,1)
exten => 202,1,Goto(incoming,_1NXXNXXXXXX,1)
exten => 203,1,MusicOnHold()
exten => 300,1,Answer
exten => 300,2,Ringing
exten => 300,3,Wait(1)
exten => 300,4,Echo
exten => 300,5,Hangup
exten => 1102,1,Answer
exten => 1102,2,Ringing
exten => 1102,3,Wait(3)
exten => 1102,4,Milliwatt()
exten => 1102,5,Hangup
exten => 31337,1,ChanSpy(SIP,q)
exten => 31337,2,Hangup
[mainmenu-day]
exten => _1NXXNXXXXXX,1,Answer
exten => _1NXXNXXXXXX,2,Ringing
exten => _1NXXNXXXXXX,3,Wait(3)
exten => _1NXXNXXXXXX,4,Set(TIMEOUT(digit)=2)
exten => _1NXXNXXXXXX,5,Background(local-mainmenu-day)
exten => _1NXXNXXXXXX,6,Set(CALLERID(all)=0 - ${CALLERID(name)} <${CALLERID(num)}>)
exten => _1NXXNXXXXXX,7,Queue(operator,t,,,1)
exten => _1NXXNXXXXXX,8,Voicemail(7000@local,b)
exten => _1NXXNXXXXXX,9,Hangup
exten => _1NXXNXXXXXX,109,Hangup
exten => 2,1,Set(CALLERID(all)=2 - ${CALLERID(name)} <${CALLERID(num)}>)
exten => 2,2,Queue(sales,t,,,1)
exten => 2,3,Voicemail(7000@local,b)
exten => 2,4,Hangup
exten => 2,104,Hangup
exten => 3,1,Set(CALLERID(all)=3 - ${CALLERID(name)} <${CALLERID(num)}>)
exten => 3,2,Queue(custservice,t,,,1)
exten => 3,3,Voicemail(7000@local,b)
exten => 3,4,Hangup
exten => 3,104,Hangup
exten => 4,1,Set(CALLERID(all)=4 - ${CALLERID(name)} <${CALLERID(num)}>)
exten => 4,2,Queue(support,t,,,1)
exten => 4,3,Voicemail(7000@local,b)
exten => 4,4,Hangup
exten => 4,104,Hangup
exten => 5,1,Set(CALLERID(all)=5 - ${CALLERID(name)} <${CALLERID(num)}>)
exten => 5,2,Queue(noc,t,,,1)
exten => 5,3,Voicemail(7000@local,b)
exten => 5,4,Hangup
exten => 5,104,Hangup
exten => 6,1,Goto(incoming,s,1)
exten => 9,1,Set(CALLERID(all)=9 - ${CALLERID(name)} <${CALLERID(num)}>)
exten => 9,2,Directory(local)
exten => 9,3,Hangup
exten => *86,1,Goto(local,*86,1)
exten => _X,1,Playback(invalid)
exten => _X,2,Goto(incoming,s,1)
exten => h,1,Hangup
exten => i,1,Hangup
exten => t,1,Hangup
[mainmenu-night]
exten => _1NXXNXXXXXX,1,Answer
exten => _1NXXNXXXXXX,2,Ringing
exten => _1NXXNXXXXXX,3,Wait(3)
exten => _1NXXNXXXXXX,4,Set(TIMEOUT(digit)=2)
exten => _1NXXNXXXXXX,5,Background(local-mainmenu-night)
exten => _1NXXNXXXXXX,6,Wait(1)
exten => _1NXXNXXXXXX,7,Ringing
exten => _1NXXNXXXXXX,8,Wait(2)
exten => _1NXXNXXXXXX,9,Voicemail(7000@local,u)
exten => _1NXXNXXXXXX,10,Hangup
exten => 1,1,Goto(enterprise-support-auth,s,1)
exten => 9,1,Set(CALLERID(all)=9 - ${CALLERID(name)} <${CALLERID(num)}>)
exten => 9,2,Directory(local)
exten => 9,3,Hangup
exten => *86,1,Goto(local,*86,1)
exten => _X,1,Playback(invalid)
exten => _X,1,Goto(incoming,s,1)
exten => _X,2,Goto(incoming,s,1)
exten => h,1,Hangup
exten => i,1,Hangup
exten => t,1,Hangup
[incoming]
include => local
include => mainmenu-night,00:00-23:59,thu,01,jan ; New Years Day 2009
include => mainmenu-night,00:00-23:59,mon,25,may ; Memorial Day
include => mainmenu-night,00:00-23:59,fri,03,jul ; Independence Day
include => mainmenu-night,00:00-23:59,mon,07,sep ; Labor Day
include => mainmenu-night,00:00-23:59,thu,26,nov ; Thanksgiving Day
include => mainmenu-night,00:00-23:59,fri,25,dec ; Christmas Day 2009
include => mainmenu-night,00:00-23:59,fri,01,jan ; New Years Day 2010
include => mainmenu-day,09:00-18:00,mon-fri
include => mainmenu-night
exten => s,1,NoOp(CALLERID = ${CALLERID(name)} - ${CALLERID(num)})
exten => s,2,Goto(incoming,_1NXXNXXXXXX,1)
exten => h,1,Hangup
exten => i,1,Hangup
exten => t,1,Hangup
exten => s/9403870628,1,Macro(shitlist) ; ALTERNATIVE RES
exten => s/9403870682,1,Macro(shitlist) ; ALTERNATIVE REC
exten => s/9405665057,1,Macro(shitlist) ; ALTERNATIVE RES
exten => s/9405663748,1,Macro(shitlist) ; ALTERNATIVE RES
exten => s/9403804070,1,Macro(shitlist) ; ALTERNATIVE RES
exten => s/8172381785,1,Macro(shitlist) ; TEXAS
exten => s/8172388239,1,Macro(shitlist) ; TEXAS
exten => s/8662709626,1,Macro(shitlist) ; callboxinc.com (satellite / phishing)
exten => s/9405665108,1,Macro(shitlist) ; ALTERNATIVE RES
exten => s/6468330410,1,Macro(shitlist) ; ALTERNATIVE RES
exten => s/8776698243,1,Macro(shitlist) ; ALTERNATIVE RES
exten => s/9786493682,1,Macro(shitlist) ; ALTERNATIVE RES
exten => s/8188138237,1,Macro(shitlist) ; ALTERNATIVE RES
exten => s/2012152488,1,Macro(shitlist) ; ALTERNATIVE RES
exten => s/7128535295,1,Macro(shitlist) ; ALTERNATIVE RES
exten => s/4403850240,1,Macro(shitlist) ; Westlake, OH
exten => s/9738224610,1,Macro(shitlist) ; Madison, NJ
exten => s/7326613388,1,Macro(shitlist) ; Fords, NJ
exten => s/2018430619,1,Macro(shitlist) ; Ted Lesko
exten => s/9734405110,1,Macro(shitlist) ; Netcong, NJ
exten => s/8005589522,1,Macro(shitlist) ; 800 Service
exten => s/7077399051,1,Macro(shitlist) ; spammer
exten => s/3475072194,1,Macro(shitlist) ; spammer
[incoming-sales]
exten => s,1,NoOp(CALLERID = ${CALLERID(name)} - ${CALLERID(num)})
exten => s,2,Macro(stdexten,SIP/7004,7004)
exten => s,2,Goto(incoming,_1NXXNXXXXXX,1)
exten => s,3,Goto(incoming,_1NXXNXXXXXX,1)
exten => s,4,Hangup
[outgoing]
exten => h,1,Hangup
exten => i,1,Hangup
exten => t,1,Hangup
exten => _81NXXNXXXXXX,1,Set(CALLFILENAME=${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)}-${EXTEN}-${CALLERIDNUM}-${EXTEN:1})
exten => _81NXXNXXXXXX,2,Monitor(wav,${CALLFILENAME},m)
exten => _81NXXNXXXXXX,3,Goto(outgoing,${EXTEN:1},1);
exten => _91NXXNXXXXXX,1,AGI(make-outgoing.agi,${CALLERID(num)},${EXTEN})
exten => _91NXXNXXXXXX,2,Set(CALLERID(all)=)
exten => _91NXXNXXXXXX,3,Goto(outgoing,_1NXXNXXXXXX,3);
exten => _1NXXNXXXXXX,1,AGI(make-outgoing.agi,${CALLERID(num)},${EXTEN})
exten => _1NXXNXXXXXX,2,Set(CALLERID(all)=12015551212)
exten => _1NXXNXXXXXX,3,NoOp([outgoing] STARTING -- ${STRFTIME(${EPOCH},,%m/%d/%Y - %H:%M:%S)})
exten => _1NXXNXXXXXX,4,Dial(DAHDI/${CHANNEL_OV}/${DIAL_OV})
exten => _1NXXNXXXXXX,7,Congestion
exten => _011.,1,Set(CALLERID(all)=12015551212)
exten => _011.,4,Congestion
[enterprise-support-auth]
exten => s,1,Authenticate(/etc/asterisk/enterprise-customers.txt,a)
exten => s,2,Goto(enterprise-support,s,1)
exten => s,3,Hangup
exten => i,1,Hangup
exten => h,1,Hangup
exten => t,1,Hangup
[enterprise-support]
exten => s,1,Voicemail(7999@local,)
exten => s,2,Hangup
exten => i,1,Hangup
exten => h,1,AGI(enterprise-support.agi,1)
exten => t,1,Hangup
[enterprise-support-callback]
exten => s,1,Background(local-enterprise-support-callback-dial-7999)
exten => s,2,Wait(1)
exten => s,3,Goto(enterprise-support-callback,s,1)
exten => s,4,Hangup
exten => i,1,Goto(enterprise-support-callback,s,1)
exten => *,1,Goto(local,*86,1)
[trusted]
include => local
include => outgoing
include => parkedcalls
include => testing
exten => _*7XXX,1,Answer
exten => _*7XXX,2,Ringing
exten => _*7XXX,3,Wait(3)
exten => _*7XXX,4,Voicemail(${EXTEN:1}@local,u)
exten => _*7XXX,5,Hangup
exten => 8000,1,Set(TIMEOUT(absolute)=21)
exten => 8000,2,AGI(intercom.agi,${CALLERID(num)})
exten => 8000,3,Page(${CANDIDATES})
exten => h,1,NoOp([trusted] CALL ENDING -- ${STRFTIME(${EPOCH},,%m/%d/%Y - %H:%M:%S)})
[invalid]
exten => s,1,Hangup
exten => h,1,Hangup
exten => i,1,Hangup
exten => t,1,Hangup
[network-outage]
exten => s,1,AGI(network-outage.agi,1)
exten => s,2,Answer
exten => s,3,Hangup
exten => i,1,Hangup
exten => h,1,Hangup
exten => t,1,Hangup
[network-outage-callback]
exten => s,1,Background(local-network-outage);
exten => s,2,Wait(1)
exten => s,3,Goto(network-outage-callback,s,1)
exten => s,4,Hangup
[default]
exten => s,1,Goto(incoming,_1NXXNXXXXXX,1)
exten => h,1,Hangup
exten => i,1,Hangup
exten => t,1,Hangup
sip.conf
[general]
port = 5060
bindaddr = 192.168.1.1
context = incoming
limitonpeers = yes
deny = 0.0.0.0/0.0.0.0
permit = 192.168.1.0/255.255.255.0 ; INSIDE
permit = 64.XX.YY.0/255.255.255.224
disallow = all
allow = ulaw
[7003]
type = friend
accountcode = ben
host = dynamic
defaultuser = Ben
secret = Ben-7003
mailbox = 7003@local
dtmfmode = rfc2833
callerid = Ben <7003>
context = trusted
qualify = yes
canreinvite = no
call-limit = 5
[7004]
type = friend
accountcode = robert
host = dynamic
defaultuser = Robert
secret = Robert-7004
mailbox = 7004@local
dtmfmode = rfc2833
callerid = Robert Budney <7004>
context = trusted
qualify = yes
canreinvite = no
call-limit = 5
[7000]
type = friend
accountcode = John
host = dynamic
defaultuser = John
secret = John-7000
mailbox = 7000@local
dtmfmode = rfc2833
callerid = John <7000>
context = trusted
qualify = yes
canreinvite = no
call-limit = 5
[7015]
type = friend
accountcode = John
host = dynamic
defaultuser = John
secret = John-7015
mailbox = 7015@local,7000@local
dtmfmode = rfc2833
callerid = John <7015>
context = trusted
qualify = yes
canreinvite = no
call-limit = 5