Hi, I have an asterisk-15.3.0 install on fedora28 and just realized I have a problem with how extensions are routed. I had made some changes quite some time ago to avoid having a “catch all” mailbox people would end up in when they don’t choose an extension.
It appears now that any attempt to dial an extension results in all calls being redirected to extension 7000. This also occurs after just dialing 700. It’s not even necessary to dial the last digit.
What could I possibly have done wrong?
[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
[incoming]
exten => s,1,NoOp(CALLERID = ${CALLERID(name)} - ${CALLERID(num)})
same => n,Set(LoopCount=1) ; Set up your counter
same => n,Set(TIMEOUT(response=6)
same => n,Set(TIMEOUT(digit)=2)
;same => n,Goto(mainmenu-day,s,1)
same => n,GotoIfTime(09:00-20:00,mon-fri,*,*?mainmenu-day,s,1)
same => n,Goto(mainmenu-night,s,1)
[mainmenu-day]
exten => s,1,NoOP()
same => n,Ringing()
same => n,Wait(1) ; ring before IVR starts
same => n(MENU),Background(local-mainmenu-day)
same => n,WaitExten(6) ; (3) ; Wait for an extension to be dialed.
exten => fax,1,Hangup()
exten => 2,1,Set(CALLERID(all)=2 - ${CALLERID(name)} <${CALLERID(num)}>)
same => n,Queue(sales,t,,,20)
same => n,Voicemail(7000@local,b)
same => n,Hangup()
exten => 3,1,Set(CALLERID(all)=3 - ${CALLERID(name)} <${CALLERID(num)}>)
same => n,Queue(custservice,t,,,20)
same => n,Voicemail(7003@local,b)
same => n,Hangup()
exten => 4,1,Set(CALLERID(all)=4 - ${CALLERID(name)} <${CALLERID(num)}>)
same => n,Queue(support,t,,,20)
same => n,Voicemail(7003@local,b)
same => n,Hangup()
exten => 5,1,Set(CALLERID(all)=5 - ${CALLERID(name)} <${CALLERID(num)}>)
same => n,Queue(noc,t,,,20)
same => n,Voicemail(7003@local,b)
same => n,Hangup()
exten => 6,1,Goto(incoming,s,1)
exten => 7,1,Voicemail(7000@local,b)
same => n,Hangup()
exten => *86,1,Goto(local,*86,1)
exten => 9,1,Set(CALLERID(all)=9 - ${CALLERID(name)} <${CALLERID(num)}>)
same => n,Directory(local)
same => n,Hangup()
exten => i,1,Playback(invalid)
same => n,Goto(s,MENU)
exten => t,1,Set(LoopCount=${INC(LoopCount)}) ; Increment the counter
same => n,GotoIf($[${LoopCount} < 2]?s,MENU) ; If we have looped fewer than 2 times jump back to the Menu
same => n,Playback(goodbye) ; If we have looped 4 times then play Goodbye
same => n,Hangup() ; Terminate the call
[mainmenu-night]
exten => s,1,NoOP()
same => n,Ringing()
same => n,Wait(5)
same => n,Answer()
same => n(MENU),Background(local-mainmenu-night)
same => n,WaitExten(6) ; Remove the below 5 lines to get rid of voicemail at night
;same => n,Ringing()
;same => n,Wait(2)
;same => n,Voicemail(7000@local,u)
;same => n,Hangup()
exten => fax,1,Hangup()
exten => 1,1,Goto(enterprise-support-auth,s,1)
exten => 2,1,Set(CALLERID(all)=2 - ${CALLERID(name)} <${CALLERID(num)}>)
;same => n,Queue(sales,t,,,20)
same => n,Voicemail(7000@local,b)
same => n,Hangup()
exten => 9,1,Set(CALLERID(all)=9 - ${CALLERID(name)} <${CALLERID(num)}>)
same => n,Directory(local)
same => n,Hangup
exten => *86,1,Goto(local,*86,1)
exten => i,1,Playback(invalid)
same => n,Goto(s,MENU)
exten => t,1,Set(LoopCount=${INC(LoopCount)}) ; Increment the counter
same => n,GotoIf($[${LoopCount} < 2]?s,MENU) ; If we have looped fewer than 3 times jump back to the Menu
same => n,Playback(goodbye) ; If we have looped 4 times then play Goodbye
same => n,Hangup() ; Terminate the call
; [enterprise-support]
;
; This is the context for "enterprise emergency service" calls which come in
; after hours. Calls are only thrown here from the mainmenu-night context.
;
[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)
;[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
[invalid]
exten => s,1,Hangup
exten => h,1,Hangup
exten => i,1,Hangup
exten => t,1,Hangup
;
; [network-outage]
;
; This is the context for "severly critical host or service outage"
; calls which come in via Nagios's escalation facility.
;
[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]
;
; This is the default context that calls will be thrown into if no other
; contexts are matched. If this even happens, throw them into the main
; "incoming" context to initiate a new incoming call.
;
[default]
exten => s,1,Goto(incoming,_1NXXNXXXXXX,1)
exten => h,1,Hangup
exten => i,1,Hangup
exten => t,1,Hangup
[trusted]
include => local
include => outgoing
;include => parkedcalls
include => testing
; Allow people to transfer calls directly into voicemail.
exten => _*7XXX,1,Answer
exten => _*7XXX,2,Ringing
exten => _*7XXX,3,Wait(30)
exten => _*7XXX,4,Voicemail(${EXTEN:1}@local,u)
exten => _*7XXX,5,Hangup
; Our ad-hoc intercom ;)
exten => 8000,1,Set(TIMEOUT(absolute)=21)
exten => 8000,2,AGI(intercom.agi,${CALLERID(num)})
exten => 8000,3,Page(${CANDIDATES})
; XXX
exten => h,1,NoOp([trusted] CALL ENDING -- ${STRFTIME(${EPOCH},,%m/%d/%Y - %H:%M:%S)})
;
; [testing]
;
; Miscellaneous testing extensions, this context should be included into
; [trusted] or [local] for debugging.
;
[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()
; Echo test
exten => 300,1,Answer
exten => 300,2,Ringing
exten => 300,3,Wait(1)
exten => 300,4,Echo
exten => 300,5,Hangup
; T102 Milliwatt Test Number
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
;
; [outgoing]
;
; This is the contxt all OUTGOING calls are place into. This is our "trunk"
; to VoicePulse Connect! and any other providers.
;
[outgoing]
exten => h,1,Hangup
exten => i,1,Hangup
exten => t,1,Hangup
;
; If the call is prefixed with an '8', then record it.
;
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);
;
; If the call is prefixed with an '9', then don't send Caller*ID.
;
exten => _91NXXNXXXXXX,1,AGI(make-outgoing.agi,${CALLERID(num)},${EXTEN})
;exten => _91NXXNXXXXXX,2,Set(CALLERID(all)=,a)
exten => _91NXXNXXXXXX,2,Set(CALLERID(all)=)
exten => _91NXXNXXXXXX,3,Goto(outgoing,_1NXXNXXXXXX,3);
;
; Domestic Calls
;
exten => _1NXXNXXXXXX,1,AGI(make-outgoing.agi,${CALLERID(num)},${EXTEN})
exten => _1NXXNXXXXXX,2,Set(CALLERID(all)=12019637300)
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,5,Dial(SIP/+${DIAL_VP}@${VOICEPULSE_TRUNK01})
; exten => _1NXXNXXXXXX,6,Dial(SIP/+${DIAL_VP}@${VOICEPULSE_TRUNK01})
exten => _1NXXNXXXXXX,7,Congestion
;
; International Calls
;
exten => _011.,1,Set(CALLERID(all)=12019637300)
; exten => _011.,2,Dial(SIP/+${EXTEN:3}@${VOICEPULSE_TRUNK01})
; exten => _011.,3,Dial(SIP/+${EXTEN:3}@${VOICEPULSE_TRUNK02})
exten => _011.,4,Congestion