asterisk-config/extensions.conf
2021-11-20 23:19:07 +08:00

113 lines
3.3 KiB
Text

[general]
static=yes
writeprotect=no
clearglobalvars=no
[extdn42whois]
exten => _X.,5,Set(CALLNUM=${EXTEN})
same => n,Goto(s,1)
exten => s,1,Playback(silence/1)
same => n,Set(USERINPUT=)
same => n,Read(USERINPUT,jerry-whois,10,,1,6)
same => n,GotoIf($["${READSTATUS}" = "TIMEOUT"]?s,1:)
same => n,GotoIf($["${USERINPUT}" = ""]?extmymenu,${CALLNUM},5:whois,1)
exten => whois,1,Set(SESSIONUNID=${RAND(0,100000)})
same => n,TrySystem(/var/lib/asterisk/scripts/jerry/whois.py "${USERINPUT}" "${SESSIONUNID}")
same => n,Playback(/var/tmp/ast-dynamic/${SESSIONUNID})
same => n,GotoIf($["${PLAYBACKSTATUS}" = "SUCCESS"]?whois,whoisend:)
same => n,Playback(im-sorry&something-terribly-wrong)
same => n(whoisend),Goto(s,1)
[extmymenu]
exten => _X.,5,Set(CALLNUM=${EXTEN})
same => n,Goto(s,1)
exten => s,1,Wait(1)
same => n(loop),Background(jerry-intro)
same => n,WaitExten(15)
exten => i,1,Playback(silence/1&goodbye)
same => n,Hangup()
exten => t,1,Goto(s,loop)
exten => _X,1,NoOp()
same => n,Wait(1)
same => n,GoSub(${EXTEN},100)
same => n,Wait(1)
same => n,Goto(s,loop)
exten => 1,100,NoOp()
same => n,Goto(extdn42whois,${CALLNUM},5)
same => n,Return()
exten => 2,100,NoOp()
same => n,ConfBridge(1,bridge1,user1,sample_user_menu)
same => n,Return()
exten => 3,100,NoOp()
same => n,Playback(your&number&is)
same => n,SayAlpha(${CALLERID(num)})
same => n,Playback(silence/1&calling)
same => n,SayAlpha(${CALLNUM})
same => n,Return()
exten => 4,100,NoOp()
same => n,Read(TMPNOM,z-external,1,,1,0.1)
same => n,Return()
exten => 5,100,NoOp()
same => n,Read(TMPNOM,z-macroform-cold_day,1,,1,0.1)
same => n,Return()
exten => _X,100,NoOp()
same => n,Playback(silence/1&you-entered)
same => n,SayNumber(${EXTEN})
same => n,Return()
[extmyself]
exten => i,1,NoOp()
exten => chanunavail,1,Playback(im-sorry&number-not-answering&please-try-call-later)
same => n,Hangup()
exten => 424036180001,5,Dial(PJSIP/REDACTED,300,m)
exten => 424036180002,5,Dial(PJSIP/REDACTED,300,m)
exten => 424036180003,5,Dial(PJSIP/REDACTED,300,m)
exten => 424036180004,5,Dial(PJSIP/REDACTED,300,m)
exten => 424036180005,5,Dial(PJSIP/REDACTED,300,m)
exten => _X.,6,GotoIf($["${DIALSTATUS}" = "CHANUNAVAIL"]?chanunavail,1:)
exten => 424036180000,5,Goto(extmymenu,${EXTEN},5)
exten => 424036183618,5,Playback(silence/1&your&number&is)
same => n,SayAlpha(${CALLERID(num)})
same => n,Playback(silence/1)
exten => 424036184242,5,Goto(extdn42whois,${EXTEN},5)
exten => _42403618XXXX,5,Playback(im-sorry&check-number-dial-again)
[extpeers]
exten => _42403618XXXX,5,Answer()
same => n,Goto(extmyself,${EXTEN},5)
exten => _42401332XXXX,5,NoOp()
same => n,Dial(PJSIP/${EXTEN}@nia)
exten => _42403315XXXX,5,NoOp()
same => n,Dial(PJSIP/${EXTEN}@zane)
exten => _42403088XXXX,5,NoOp()
same => n,Dial(PJSIP/${EXTEN}@sunnet)
exten => _42401353XXXX,5,NoOp()
same => n,Dial(PJSIP/${EXTEN}@hertz)
exten => _42400119XXXX,5,NoOp()
same => n,Dial(PJSIP/${EXTEN}@jrb0001)
[jerry]
exten => _XXXX,1,Goto(42403618${EXTEN},1)
exten => _XXXXXXXX,1,Goto(4240${EXTEN},1)
exten => _X.,1,NoOp()
exten => _X.,2,Goto(extpeers,${EXTEN},5)