2024-11-27 00:30:07 +00:00
|
|
|
[incoming]
|
|
|
|
exten => _.,1,NoOp()
|
|
|
|
same = n,Verbose(Inbound call to ${EXTEN} detected)
|
|
|
|
same = n,Set(DIALGROUP(incoming,add)=PJSIP/100)
|
|
|
|
same = n,Set(DIALGROUP(incoming,add)=PJSIP/101)
|
|
|
|
same = n,Set(DIALGROUP(incoming,add)=PJSIP/102)
|
|
|
|
same = n,Dial(${DIALGROUP(incoming)},15)
|
|
|
|
same = n,Set(MAILBOXES=${PJSIP_ENDPOINT(pstn,mailboxes)})
|
|
|
|
same = n,ExecIf($[${LEN(${MAILBOXES})} = 0]?Congestion(10))
|
|
|
|
same = n,Voicemail(${MAILBOXES},uS)
|
|
|
|
same = n,Playback(vm-goodbye)
|
|
|
|
same = n,Hangup()
|
|
|
|
|
2024-11-25 01:06:18 +00:00
|
|
|
[from-internal]
|
2024-11-27 00:30:07 +00:00
|
|
|
|
|
|
|
; Emergency outbound dialing
|
|
|
|
exten => 911,1,NoOp()
|
|
|
|
same = n,Goto(dialout,${EXTEN},1)
|
|
|
|
|
|
|
|
; Emergency test outbound dialing
|
|
|
|
; (Doesn't seem to be supported on Verizon FiOS)
|
|
|
|
exten => 933,1,NoOp()
|
|
|
|
same = n,Goto(dialout,${EXTEN},1)
|
|
|
|
|
|
|
|
; 7+ digit calls are routed outside via the PSTN
|
|
|
|
exten => _NXXXXXX.,1,NoOp()
|
|
|
|
same = n,Goto(dialout,${EXTEN},1)
|
|
|
|
|
|
|
|
exten => _1NXXXXXX.,1,NoOp()
|
|
|
|
same = n,Goto(dialout,${EXTEN},1)
|
|
|
|
|
|
|
|
; Landline-related extensions
|
|
|
|
exten => 436,1,NoOp()
|
|
|
|
same = n,Verbose(Testing inbound calling?)
|
|
|
|
same = n,Goto(incoming,${EXTEN},1)
|
|
|
|
|
|
|
|
exten => *436,1,Answer()
|
|
|
|
same = n,Wait(1)
|
|
|
|
same = n,VoicemailMain(436@sailmaker,s)
|
|
|
|
same = n,Hangup()
|
|
|
|
|
|
|
|
; Dummy extensions
|
2024-11-25 01:06:18 +00:00
|
|
|
exten => 700,1,Answer()
|
|
|
|
same = n,Wait(1)
|
|
|
|
same = n,Playback(hello-world)
|
|
|
|
same = n,Wait(1)
|
|
|
|
same = n,Playback(tt-monkeys)
|
|
|
|
same = n,Hangup()
|
|
|
|
|
2024-11-27 00:30:07 +00:00
|
|
|
; Other extensions
|
2024-11-26 03:23:34 +00:00
|
|
|
3-digit extensions dial their associated devices
|
2024-11-25 04:16:18 +00:00
|
|
|
exten => _XXX,1,Dial(PJSIP/${EXTEN}, 15)
|
2024-11-26 03:23:34 +00:00
|
|
|
same = n,Set(MAILBOXES=${PJSIP_ENDPOINT(${EXTEN},mailboxes)})
|
|
|
|
same = n,ExecIf($[${LEN(${MAILBOXES})} = 0]?Congestion(10))
|
|
|
|
same = n,Voicemail(${MAILBOXES})
|
2024-11-25 04:16:18 +00:00
|
|
|
same = n,Playback(vm-goodbye)
|
|
|
|
same = n,Hangup()
|
|
|
|
|
|
|
|
; Star plus 3-digit extensions dial their associated mailboxes
|
2024-11-25 16:31:12 +00:00
|
|
|
exten => _*XXX,1,Answer()
|
|
|
|
same = n,Wait(1)
|
|
|
|
same = n,VoiceMailMain(${EXTEN:1}@sailmaker)
|
2024-11-25 01:06:18 +00:00
|
|
|
same = n,Hangup()
|
|
|
|
|
2024-11-25 22:15:04 +00:00
|
|
|
; 3-digit extensions plus star go directly to voicemail
|
|
|
|
exten => _XXX*,1,Answer()
|
|
|
|
same = n,Wait(1)
|
|
|
|
same = n,Voicemail(${EXTEN:0:-1}@sailmaker,u)
|
|
|
|
same = n,Hangup()
|
|
|
|
|
2024-11-27 00:30:07 +00:00
|
|
|
[dialout]
|
|
|
|
exten => _X!,1,NoOp()
|
|
|
|
same = n,Verbose(Dialing out to ${EXTEN})
|
|
|
|
same = n,Dial(PJSIP/${EXTEN}@pstn)
|
2024-11-25 01:06:18 +00:00
|
|
|
same = n,Hangup()
|