asterisk-config/extensions.conf

222 lines
7.5 KiB
Text
Raw Permalink Normal View History

2021-11-19 15:52:42 +08:00
[general]
static=yes
writeprotect=no
clearglobalvars=no
2023-07-29 00:03:35 +08:00
[extdn42modems]
exten => busy,1,NoOp()
same => n,PlayBack(silence/1&im-sorry&all-circuits-busy-now)
same => n,Hangup()
exten => 00,200,NoOp()
same => n,GotoIf($["${DEVICE_STATE(PJSIP/modem0)}" = "BUSY"]?busy,1:)
same => n,Dial(PJSIP/modem0/sip:0@[fd07:d34:7969:2f::6]:5060)
same => n,Hangup()
exten => 01,200,NoOp()
same => n,GotoIf($["${DEVICE_STATE(PJSIP/modem1)}" = "BUSY"]?busy,1:)
same => n,Dial(PJSIP/modem1/sip:0@[fd07:d34:7969:2f::6]:5061)
same => n,Hangup()
exten => 02,200,NoOp()
same => n,GotoIf($["${DEVICE_STATE(PJSIP/modem2)}" = "BUSY"]?busy,1:)
same => n,Dial(PJSIP/modem2/sip:0@[fd07:d34:7969:2f::6]:5062)
same => n,Hangup()
exten => 03,200,NoOp()
same => n,GotoIf($["${DEVICE_STATE(PJSIP/modem3)}" = "BUSY"]?busy,1:)
same => n,Dial(PJSIP/modem3/sip:0@[fd07:d34:7969:2f::6]:5063)
same => n,Hangup()
exten => 04,200,NoOp()
same => n,GotoIf($["${DEVICE_STATE(PJSIP/modem4)}" = "BUSY"]?busy,1:)
same => n,Dial(PJSIP/modem4/sip:0@[fd07:d34:7969:2f::6]:5064)
same => n,Hangup()
exten => 05,200,NoOp()
same => n,GotoIf($["${DEVICE_STATE(PJSIP/modem5)}" = "BUSY"]?busy,1:)
same => n,Dial(PJSIP/modem5/sip:0@[fd07:d34:7969:2f::6]:5065)
same => n,Hangup()
exten => 06,200,NoOp()
same => n,GotoIf($["${DEVICE_STATE(PJSIP/modem6)}" = "BUSY"]?busy,1:)
same => n,Dial(PJSIP/modem6/sip:0@[fd07:d34:7969:2f::6]:5066)
same => n,Hangup()
exten => _X!,200,NoOp()
same => n,Playback(silence/1&im-sorry&check-number-dial-again&silence/1)
same => n,Hangup()
2021-11-19 15:52:42 +08:00
[extdn42whois]
2021-11-23 13:36:15 +08:00
exten => _X!,200,Set(CALLNUM=${EXTEN})
same => n,Goto(s,1)
2021-11-19 15:52:42 +08:00
exten => s,1,Playback(silence/1)
same => n,Set(USERINPUT=)
2022-11-09 18:41:39 +08:00
same => n,Read(USERINPUT,/opt/asterisk/sounds/jerry-whois,10,,1,6)
2021-11-23 13:36:15 +08:00
same => n,GotoIf($["${READSTATUS}" = "TIMEOUT" & "${USERINPUT}" = ""]?s,1:)
same => n,GotoIf($["${USERINPUT}" = ""]?extmymenu,${CALLNUM},200:whois,1)
2021-11-19 15:52:42 +08:00
2021-11-23 13:36:15 +08:00
exten => whois,1,NoOp()
2022-11-09 18:41:39 +08:00
same => n,TrySystem(/opt/asterisk/scripts/whois.py "${USERINPUT}" "${UNIQUEID}")
2021-11-23 13:36:15 +08:00
same => n,Playback(/var/tmp/ast-dynamic/${UNIQUEID})
2021-11-19 15:52:42 +08:00
same => n,GotoIf($["${PLAYBACKSTATUS}" = "SUCCESS"]?whois,whoisend:)
same => n,Playback(im-sorry&something-terribly-wrong)
same => n(whoisend),Goto(s,1)
[extmymenu]
2021-11-23 13:36:15 +08:00
exten => _X!,200,Set(CALLNUM=${EXTEN})
same => n,Goto(s,1)
exten => _X!,210,Set(CALLNUM=${EXTEN})
same => n,Goto(3,1)
2021-11-19 15:52:42 +08:00
exten => s,1,Wait(1)
2022-11-09 18:41:39 +08:00
same => n(loop),Background(/opt/asterisk/sounds/jerry-intro)
2021-11-19 15:52:42 +08:00
same => n,WaitExten(15)
exten => i,1,Playback(silence/1&goodbye)
same => n,Hangup()
2021-11-19 15:52:42 +08:00
exten => t,1,Goto(s,loop)
exten => _X,1,NoOp()
same => n,Wait(1)
2021-11-20 23:19:03 +08:00
same => n,GoSub(${EXTEN},100)
same => n,Wait(1)
same => n,Goto(s,loop)
2021-11-19 15:52:42 +08:00
exten => 1,100,NoOp()
2021-11-23 13:36:15 +08:00
same => n,Goto(extdn42whois,${CALLNUM},200)
2021-11-20 23:19:03 +08:00
same => n,Return()
2021-11-19 15:52:42 +08:00
exten => 2,100,NoOp()
same => n,ConfBridge(1,bridge1,user1,sample_user_menu)
2021-11-20 23:19:03 +08:00
same => n,Return()
2021-11-19 15:52:42 +08:00
exten => 3,100,NoOp()
same => n,Playback(your&number&is)
same => n,SayAlpha(${CALLERID(num)})
same => n,Playback(silence/1&calling)
2021-11-23 13:36:15 +08:00
same => n,SayAlpha(42403618${CALLNUM})
2021-11-20 23:19:03 +08:00
same => n,Return()
2021-11-19 15:52:42 +08:00
exten => 4,100,NoOp()
2023-07-29 00:03:35 +08:00
same => n,Dial(AudioSocket/10.127.8.195:3619/d17b8c7e-458e-4d4a-96a8-66b01dc082e2/c(slin),,g)
2021-11-20 23:19:03 +08:00
same => n,Return()
2021-11-19 15:52:42 +08:00
exten => 5,100,NoOp()
2023-07-29 00:03:35 +08:00
same => n,Read(TMPNOM,/opt/asterisk/sounds/0005-unreeeal_superhero_3,1,,999,0.1)
2021-11-26 08:09:09 +08:00
same => n,Return()
exten => 6,100,NoOp()
2023-07-29 00:03:35 +08:00
same => n,Read(TMPNOM,/opt/asterisk/sounds/0006-external,1,,999,0.1)
same => n,Return()
exten => 7,100,NoOp()
same => n,Read(TMPNOM,/opt/asterisk/sounds/0009-macroform-cold_day,1,,999,0.1)
same => n,Return()
exten => 8,100,NoOp()
same => n,Read(TMPNOM,/opt/asterisk/sounds/0013-f9_lapix_ash,1,,999,0.1)
same => n,Return()
exten => 9,100,NoOp()
same => n,Read(TMPNOM,/opt/asterisk/sounds/0004-little_computer_boy,1,,999,0.1)
2021-11-20 23:19:03 +08:00
same => n,Return()
2021-11-19 15:52:42 +08:00
exten => _X,100,NoOp()
2021-11-20 23:19:03 +08:00
same => n,Playback(silence/1&you-entered)
same => n,SayNumber(${EXTEN})
same => n,Return()
2021-11-19 15:52:42 +08:00
[extmyself]
exten => i,1,NoOp()
2022-11-09 18:41:39 +08:00
exten => chanunavail,1,Playback(silence/1&im-sorry&number-not-answering&please-try-call-later&silence/1)
same => n,Hangup()
2021-11-19 15:52:42 +08:00
2022-11-09 18:41:39 +08:00
exten => invalidinput,1,Playback(silence/1&im-sorry&cannot-complete-as-dialed&silence/1)
2021-11-23 13:36:15 +08:00
same => n,Hangup()
2022-11-09 18:41:39 +08:00
exten => _86X!/_42403618X!,5,Dial(PJSIP/${EXTEN:2}@REDACTED,300,r)
2021-11-23 13:36:15 +08:00
exten => 0001,5,Dial(PJSIP/REDACTED,300,m)
exten => 0002,5,Dial(PJSIP/REDACTED,300,m)
exten => 0003,5,Dial(PJSIP/REDACTED,300,m)
exten => 0004,5,Dial(PJSIP/REDACTED,300,m)
2021-11-26 08:09:09 +08:00
exten => 0005/_42403618X!,5,Dial(PJSIP/REDACTED,300,m)
2022-11-09 18:41:39 +08:00
exten => 0006/_42403618X!,5,Dial(PJSIP/REDACTED,300,m)
exten => 0007/_42403618X!,5,Dial(PJSIP/REDACTED,300,m)
exten => 0008/_42403618X!,5,Dial(PJSIP/REDACTED,300,m)
exten => 0009/424036180009,5,Goto(pstnrecv,${EXTEN},5)
2023-07-29 00:03:35 +08:00
exten => 0009/424036180006,5,Dial(PJSIP/REDACTED,60,r)
exten => 0009/424036180008,5,Dial(PJSIP/REDACTED,60,r)
exten => 0009/_42403618X!,5,Dial(PJSIP/REDACTED&PJSIP/REDACTED,60,r)
exten => 0010/_42403618X!,5,Dial(PJSIP/REDACTED&PJSIP/REDACTED,300,m)
2021-11-23 13:36:15 +08:00
exten => 0000,5,Goto(extmymenu,${EXTEN},200)
exten => 0 ,5,Goto(extmymenu,${EXTEN},200)
2023-07-29 00:03:35 +08:00
exten => 00 ,5,Dial(AudioSocket/10.127.8.195:3619/d17b8c7e-458e-4d4a-96a8-66b01dc082e2/c(slin))
2021-11-23 13:36:15 +08:00
exten => 3618,5,Goto(extmymenu,${EXTEN},210)
2023-07-29 00:03:35 +08:00
exten => 4200/_42403618X!,5,ChanSpy()
exten => 4201/_42403618X!,5,ChanSpy(,q)
2021-11-23 13:36:15 +08:00
exten => 4242,5,Goto(extdn42whois,${EXTEN},200)
2023-07-29 00:03:35 +08:00
exten => 4243/_42403618X!,5,Dial(PJSIP/modem/sip:424026019@voip.burble.dn42:5060)
exten => _3618XX,5,Goto(extdn42modems,${EXTEN:4},200)
2022-11-09 18:41:39 +08:00
exten => _X! ,5,Playback(silence/1&im-sorry&check-number-dial-again&silence/1)
2021-11-26 08:09:09 +08:00
same => n,GotoIf($["${DIALSTATUS}" = "CHANUNAVAIL"]?chanunavail,1:)
2021-11-19 15:52:42 +08:00
[extpeers]
2021-11-23 13:36:15 +08:00
exten => _42403618.,5,Answer()
same => n,GotoIf($["${EXTEN:8}" : ".*[^0-9]+.*"]?extmyself,invalidinput,1:)
same => n,Goto(extmyself,${EXTEN:8},5)
2021-11-19 15:52:42 +08:00
2021-11-23 13:36:15 +08:00
exten => _42401332.,5,NoOp()
same => n,Dial(PJSIP/${EXTEN}@nia)
2021-11-19 15:52:42 +08:00
2021-11-23 13:36:15 +08:00
exten => _42403315.,5,NoOp()
same => n,Dial(PJSIP/${EXTEN}@zane)
2021-11-19 15:52:42 +08:00
2021-11-23 13:36:15 +08:00
exten => _42403088.,5,NoOp()
same => n,Dial(PJSIP/${EXTEN}@sunnet)
2021-11-19 15:52:42 +08:00
2021-11-23 13:36:15 +08:00
exten => _42401353.,5,NoOp()
same => n,Dial(PJSIP/${EXTEN}@hertz)
2021-11-19 15:52:42 +08:00
2021-11-23 13:36:15 +08:00
exten => _42400119.,5,NoOp()
same => n,Dial(PJSIP/${EXTEN}@jrb0001)
2021-11-19 15:52:42 +08:00
2021-11-26 23:08:18 +08:00
exten => _42403914.,5,NoOp()
same => n,Dial(PJSIP/${EXTEN}@kioubit)
2021-11-19 15:52:42 +08:00
[jerry]
2022-11-09 18:41:39 +08:00
exten => _X!/424036180006,1,Goto(pstnphone,${EXTEN},5)
exten => _X!/424036180007,1,Goto(pstnphone,${EXTEN},5)
exten => _X!/424036180008,1,Goto(pstnphone,${EXTEN},5)
2021-11-23 13:36:15 +08:00
exten => _4240XXXX.,1,Goto(extpeers,${EXTEN},5)
exten => _0XXXX. ,1,Goto(extpeers,424${EXTEN},5)
exten => _X! ,1,Goto(extpeers,42403618${EXTEN},5)
2021-11-26 08:09:09 +08:00
[jerry-peers]
exten => invalidcaller,100,Playback(silence/1&sorry-youre-having-problems)
same => n,Hangup()
exten => _X!/_42403618X!,1,Goto(invalidcaller,100)
exten => _X! ,1,NoOp()
exten => _4240XXXX.,2,Goto(extpeers,${EXTEN},5)
exten => _0XXXX. ,2,Goto(extpeers,424${EXTEN},5)
exten => _X! ,2,Goto(extpeers,42403618${EXTEN},5)
2022-11-09 18:41:39 +08:00
[pstnphone]
2023-07-29 00:03:35 +08:00
exten => 0,5,Goto(extmyself,00,5)
exten => 1,5,Goto(extmyself,0009,5)
exten => 2,5,Goto(extmyself,8613700000000,5)
exten => 3,5,Goto(extmyself,8613700000001,5)
exten => 4,5,Goto(extmyself,8613700000002,5)
2022-11-09 18:41:39 +08:00
exten => _4240X!,5,Goto(extmyself,${EXTEN},5)
exten => _X!,5,Goto(extmyself,86${EXTEN},5)
[pstnrecv]
exten => _X!,5,Set(CALLERID(number)=REDACTED)
2023-07-29 00:03:35 +08:00
same => n,Dial(PJSIP/REDACTED&PJSIP/REDACTED,60,r)
2022-11-09 18:41:39 +08:00
same => n,Hangup()