From 0ffd2ef4e23ad4ae973d565fa2f090bc36d7aba7 Mon Sep 17 00:00:00 2001 From: "Jason D. McCormick" Date: Sat, 19 Apr 2025 12:14:32 -0400 Subject: [PATCH] initial --- Dockerfile | 29 + asl3-init.sh | 12 + asl3/asl3.sh | 11 + asl3/asterisk-cli.sh | 3 + asterisk_conf/dnsmgr.conf | 5 + asterisk_conf/echolink.conf | 56 ++ asterisk_conf/extensions.conf | 175 ++++++ asterisk_conf/iax.conf | 122 ++++ asterisk_conf/logger.conf | 20 + asterisk_conf/manager.conf | 16 + asterisk_conf/modules.conf | 186 ++++++ asterisk_conf/res_http_media_cache.conf | 69 +++ asterisk_conf/res_usbradio.conf | 7 + asterisk_conf/rpt.conf | 662 ++++++++++++++++++++++ asterisk_conf/rpt_http_registrations.conf | 5 + asterisk_conf/simpleusb.conf | 145 +++++ asterisk_conf/usbradio.conf | 213 +++++++ asterisk_conf/voter.conf | 59 ++ docker-compose.yml | 10 + fake-systemctl | 5 + 20 files changed, 1810 insertions(+) create mode 100644 Dockerfile create mode 100644 asl3-init.sh create mode 100755 asl3/asl3.sh create mode 100755 asl3/asterisk-cli.sh create mode 100644 asterisk_conf/dnsmgr.conf create mode 100644 asterisk_conf/echolink.conf create mode 100644 asterisk_conf/extensions.conf create mode 100644 asterisk_conf/iax.conf create mode 100644 asterisk_conf/logger.conf create mode 100644 asterisk_conf/manager.conf create mode 100644 asterisk_conf/modules.conf create mode 100644 asterisk_conf/res_http_media_cache.conf create mode 100644 asterisk_conf/res_usbradio.conf create mode 100644 asterisk_conf/rpt.conf create mode 100644 asterisk_conf/rpt_http_registrations.conf create mode 100644 asterisk_conf/simpleusb.conf create mode 100644 asterisk_conf/usbradio.conf create mode 100644 asterisk_conf/voter.conf create mode 100644 docker-compose.yml create mode 100644 fake-systemctl diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..4e259f1 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,29 @@ + + + +## +## Architecture to compose - Supported options are 'amd64' and 'arm64' +ARG ARCH="amd64" + +## +## Debian version to compose - Supported options are '12-slim' and '12' +ARG DEB_VER="12-slim" + +## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +## Without experience, do not change past this line +## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +FROM $ARCH/debian:$DEB_VER +WORKDIR /root + +# setup fake systemd environment +COPY ./fake-systemctl /usr/bin/systemctl +RUN chmod +x /usr/bin/systemctl + +# build the core +COPY ./asl3-init.sh /root/asl3-init.sh +RUN chmod +x /root/asl3-init.sh +RUN /root/asl3-init.sh + +# Startup +ENTRYPOINT ["/usr/bin/bash","-c","/asl3/asl3.sh"] diff --git a/asl3-init.sh b/asl3-init.sh new file mode 100644 index 0000000..9be1afc --- /dev/null +++ b/asl3-init.sh @@ -0,0 +1,12 @@ +#!/usr/bin/bash + +export DEBIAN_FRONTEND=noninteractive +apt update +apt upgrade -y +apt install -y wget +wget https://repo.allstarlink.org/public/asl-apt-repos.deb12_all.deb +dpkg -i asl-apt-repos.deb12_all.deb +apt update +apt install -y asl3-asterisk dahdi-dkms + + diff --git a/asl3/asl3.sh b/asl3/asl3.sh new file mode 100755 index 0000000..8f18379 --- /dev/null +++ b/asl3/asl3.sh @@ -0,0 +1,11 @@ +#!/usr/bin/bash +# +# This is the "entrypoint" script to setup and run asterisk w/o systemd +# and all the nicities you need + +modprobe dahdi +modprobe dahdi_transcode +modprobe dahdi_dummy + +/usr/sbin/asterisk -f + diff --git a/asl3/asterisk-cli.sh b/asl3/asterisk-cli.sh new file mode 100755 index 0000000..2119354 --- /dev/null +++ b/asl3/asterisk-cli.sh @@ -0,0 +1,3 @@ +#!/usr/bin/bash + +exec /usr/sbin/asterisk -rvvvv diff --git a/asterisk_conf/dnsmgr.conf b/asterisk_conf/dnsmgr.conf new file mode 100644 index 0000000..31965a8 --- /dev/null +++ b/asterisk_conf/dnsmgr.conf @@ -0,0 +1,5 @@ +[general] +enable=yes ; enable creation of managed DNS lookups + ; default is 'no' +refreshinterval=300 ; refresh managed DNS lookups every seconds + ; default is 300 (5 minutes) diff --git a/asterisk_conf/echolink.conf b/asterisk_conf/echolink.conf new file mode 100644 index 0000000..c26d915 --- /dev/null +++ b/asterisk_conf/echolink.conf @@ -0,0 +1,56 @@ +; If you are going to use this channel driver, you MUST enable it in modules.conf +; change: +; noload => chan_echolink.so ; echolink Channel Driver +; to: +; load => chan_echolink ; echolink Channel Driver + +[el0] +call = INVALID ; Change this! +pwd = INVALID ; Change this! +name = YOUR NAME ; Change this! +qth = INVALID ; Change this! +email = INVALID ; Change this! +node = 000000 ; Change this! +; Data for EchoLink Status Page +lat = 0.0 ; Latitude in decimal degrees +lon = 0.0 ; Longitude in decimal degrees +freq = 0.0 ; not mandatory Frequency in MHz +tone = 0.0 ; not mandatory CTCSS Tone (0 for none) +power = 0 ; 0=0W, 1=1W, 2=4W, 3=9W, 4=16W, 5=25W, 6=36W, 7=49W, 8=64W, 9=81W (Power in Watts) +height = 0 ; 0=10 1=20 2=40 3=80 4=160 5=320 6=640 7=1280 8=2560 9=5120 (AMSL in Feet) +gain = 0 ; Gain in db (0-9) +dir = 0 ; 0=omni 1=45deg 2=90deg 3=135deg 4=180deg 5=225deg 6=270deg 7=315deg 8=360deg (Direction) + +; Message to show on the echolink connect page. Use \n for new lines. +; message = This is the first line\nThis is another line\nThis is another line + +maxstns = 20 ; Max Stations + +rtcptimeout = 10 ; Max number of missed heartbeats from EL +recfile = /tmp/echolink_recorded.gsm ; +astnode = 1999 ; Change this! +context = radio-secure ; Default in code is echolink-in + +; Max 4 servers +server1 = nasouth.echolink.org +server2 = naeast.echolink.org +server3 = servers.echolink.org +server4 = backup.echolink.org + +; To deny w6xxx you would add the statement: deny = w6xxx +; To prohibit computer-based connections you would write: permit = *-* +; To allow access to only a select group of callsigns: permit = w6abc,w6def,... + +; permit ; comma delimited list of callsign, type (-r) +; deny + + +; Remote text commands thru netcat: +; o.conip (request a connect) +; o.dconip (request a disconnect) +; o.rec (turn on/off recording) + +; ipaddr +; port + +#tryinclude custom/echolink.conf diff --git a/asterisk_conf/extensions.conf b/asterisk_conf/extensions.conf new file mode 100644 index 0000000..725365c --- /dev/null +++ b/asterisk_conf/extensions.conf @@ -0,0 +1,175 @@ +[general] + +static = yes ; These two lines prevent the command-line interface +writeprotect = yes ; from overwriting the config file. Leave them here. + +[globals] +HOMENPA = 999 ; change this to your Area Code +NODE = 1999 ; change this to your node number + +[default] +exten => i,1,Hangup + +[radio-secure] +;exten => ${NODE},1,rpt(${EXTEN}) +exten => _XXXX!,1,NoOp(Connect from node: ${CALLERID(num)}) + same => n,NoOp(Connect to: ${EXTEN}) + ;same => n,NoOp(The IAXPEER is ${IAXPEER(CURRENTCHANNEL)}) + same => n,NoOp(The Channel IP is ${CHANNEL(peerip)}) + + ;If channel IP eq localhost go to connect + same => n,GotoIf($["${CHANNEL(peerip)}" = "127.0.0.1"]?connect) + + ;If allowlist/extension doesn't exist check the denylist + same => n,GotoIf($[${DB_KEYCOUNT(allowlist/${EXTEN})} = 0]?denylist) ;goto denylist + ;If allowlist/extension/callerid exists go to connect + same => n,GotoIf(${DB_EXISTS(allowlist/${EXTEN}/${CALLERID(num)})}?connect) ;goto connect + same => n,NoOp(${EXTEN} not in allowlist, Hangup) + same => n,Hangup + + ;If denylist/extension/callerID doesn't exist goto connect + same => n(denylist),GotoIf(${DB_EXISTS(denylist/${EXTEN}/${CALLERID(num)})}?:connect) ;don't goto connect + same => n,NoOp(${EXTEN} is in denylist, Hangup) + same => n,Hangup + + same => n(connect),rpt(${EXTEN}) + same => n,Hangup + +[iaxrpt] +; Entered from iaxrpt in iax.conf +; Info: The X option passed to the Rpt application +; disables the normal security checks. +; Because incoming connections are validated in iax.conf, +; and we don't know where the user will be coming from in advance, +; the X option is required. +exten => ${NODE},1,rpt(${EXTEN}|X) ; NODE is the Name field in iaxrpt + +[iax-client] ; for IAX VoIP clients. +exten => ${NODE},1,Ringing() + same => n,Wait(10) + same => n,Answer() + same => n,Set(CALLSIGN=${CALLERID(name)}) + same => n,NoOp(Caller ID name is ${CALLSIGN}) + same => n,NoOp(Caller ID number is ${CALLERID(number)}) + same => n,GotoIf(${ISNULL(${CALLSIGN})}?hangit) + same => n,Playback(rpt/connected-to&rpt/node) + same => n,SayDigits(${NODE}) + same => n,rpt(${NODE}|P|${CALLSIGN}-P) + same => n(hangit),NoOp(No Caller ID Name) + same => n,Playback(connection-failed) + same => n,Wait(1) + same => n,Hangup + +; Comment-out the following clause if you want Allstar Autopatch service +[pstn-out] +exten => _NXXNXXXXXX,1,playback(ss-noservice) + same => n,Congestion + +; Un-comment out the following clause if you want Allstar Autopatch service +;[pstn-out] +;exten => _NXXNXXXXXX,1,Dial(IAX2/allstar-autopatch/\${EXTEN}) +; same => n,Busy + +[invalidnum] +exten => s,1,Wait(3) + same => n,Playback(ss-noservice) + same => n,Wait(1) + same => n,Hangup + +[radio] +exten => _X11,1,Goto(check_route,${EXTEN},1); +exten => _NXXXXXX,1,Goto(check_route,1${HOMENPA}${EXTEN},1) +exten => _1XXXXXXXXXX,1,Goto(check_route,${EXTEN},1) +exten => _07XX,1,Goto(parkedcalls,${EXTEN:1},1) +exten => 00,1,Goto(my-ip,s,1) + +[check_route] +exten => _X.,1,Noop(${EXTEN}) +; no 800 +exten => _1800NXXXXXX,2,Goto(invalidnum,s,1) +exten => _1888NXXXXXX,2,Goto(invalidnum,s,1) +exten => _1877NXXXXXX,2,Goto(invalidnum,s,1) +exten => _1866NXXXXXX,2,Goto(invalidnum,s,1) +exten => _1855NXXXXXX,2,Goto(invalidnum,s,1) +; no X00 NPA +exten => _1X00XXXXXXX,2,Goto(invalidnum,s,1) +; no X11 NPA +exten => _1X11XXXXXXX,2,Goto(invalidnum,s,1) +; no X11 +exten => _X11,2,Goto(invalidnum,s,1) +; no 555 Prefix in any NPA +exten => _1NXX555XXXX,2,Goto(invalidnum,s,1) +; no 976 Prefix in any NPA +exten => _1NXX976XXXX,2,Goto(invalidnum,s,1) +; no NPA=809 +exten => _1809XXXXXXX,2,Goto(invalidnum,s,1) +; no NPA=900 +exten => _1900XXXXXXX,2,Goto(invalidnum,s,1) + +; okay, route it +exten => _1NXXXXXXXXX,2,Goto(pstn-out,${EXTEN:1},1) +exten => _X.,2,Goto(invalidnum,s,1) + +[my-ip] +exten => s,1,Wait(1) + same => n,SayAlpha(${CURL(http://myip.vg)}) + same => n,Hangup + +[allstar-sys] +exten => _1.,1,Rpt(${EXTEN:1}|Rrpt/node:NODE:rpt/in-call:digits/0:PARKED|120) +exten => _1.,n,Hangup + +exten => _2.,1,Ringing +exten => _2.,n,Wait(3) +exten => _2.,n,Answer +exten => _2.,n,Playback(rpt/node) +exten => _2.,n,Saydigits(${EXTEN:1}) +exten => _2.,n,Rpt(${EXTEN:1}|P|${CALLERID(name)}-P) +exten => _2.,n,Hangup + +exten => _3.,1,Ringing +exten => _3.,n,Wait(3) +exten => _3.,n,Answer +exten => _3.,n,Playback(rpt/node) +exten => _3.,n,Saydigits(${EXTEN:1}) +exten => _3.,n,Rpt(${EXTEN:1}|Pv|${CALLERID(name)}-P) +exten => _3.,n,Hangup + +exten => _4.,1,Ringing +exten => _4.,n,Wait(3) +exten => _4.,n,Answer +exten => _4.,n,Playback(rpt/node) +exten => _4.,n,Saydigits(${EXTEN:1}) +exten => _4.,n,Rpt(${EXTEN:1}|D|${CALLERID(name)}-P) +exten => _4.,n,Hangup + +exten => _5.,1,Ringing +exten => _5.,n,Wait(3) +exten => _5.,n,Answer +exten => _5.,n,Playback(rpt/node) +exten => _5.,n,Saydigits(${EXTEN:1}) +exten => _5.,n,Rpt(${EXTEN:1}|Dv|${CALLERID(name)}-P) +exten => _5.,n,Hangup + +[allstar-public] + +exten => s,1,Ringing + same => n,Set(RESP=${CURL(https://register.allstarlink.org/cgi-bin/authwebphone.pl?${CALLERID(name)})}) + same => n,Set(NODENUM=${CALLERID(number)}) + same => n,GotoIf($["${RESP:0:1}" = "?"]?hangit) + same => n,GotoIf($["${RESP:0:1}" = ""]?hangit) + same => n,GotoIf($["${RESP:0:5}" != "OHYES"]?hangit) + same => n,Set(CALLSIGN=${RESP:5}) + ;exten => s,n,GotoIf($[${DB_EXISTS(whitelist/${CALLSIGN})}]?:hangit) ; Not in whitelist + same => n,Wait(3) + same => n,Playback(rpt/node,noanswer) + same => n,Saydigits(${NODENUM}) + same => n,Set(CALLERID(name)=${CALLSIGN}) + same => n,Set(CALLERID(num)=0) + same => n,Rpt(${NODENUM}|X) + same => n,Hangup + same => n(hangit),Answer + same => n,Wait(1) + same => n,Hangup + +#tryinclude custom/extensions.conf diff --git a/asterisk_conf/iax.conf b/asterisk_conf/iax.conf new file mode 100644 index 0000000..79483e0 --- /dev/null +++ b/asterisk_conf/iax.conf @@ -0,0 +1,122 @@ +; Inter-Asterisk eXchange driver definition + +[general] +; !!! IAX registration will be discontinued at some point !!! +; Setup rpt_http_registartions.conf instead. +; remove the leading ";" +;register => 1999:12345@register.allstarlink.org ; This must be changed to your node number, password +;register => 1998:12345@register.allstarlink.org + +bindport = 4569 ; bindport and bindaddr may be specified + +; NOTE: bindport must be specified BEFORE +; bindaddr or may be specified on a specific +; bindaddr if followed by colon and port +; (e.g. bindaddr=192.168.0.1:4569) + +; bindaddr = 192.168.0.1 ; more than once to bind to multiple + ; addresses, but the first will be the + ; default + +disallow = all ; The permitted codecs for outgoing connections +;Audio Quality Bandwidth +;allow = ulaw ; best 87 kbps +;allow = adpcm ; good 55 kbps +;allow = gsm ; mediocre 36 kbps +allow = ulaw +allow = adpcm +;allow = g722 +;allow = g726aal2 +allow = gsm +;allow = ilbc + + +jitterbuffer = yes +forcejitterbuffer = yes +dropcount = 2 +maxjitterbuffer = 4000 +maxjitterinterps = 10 +resyncthreshold = 1000 +maxexcessbuffer = 80 +minexcessbuffer = 10 +jittershrinkrate = 1 +tos = 0x1E +autokill = yes +delayreject = yes +; iaxthreadcount = 30 +; iaxmaxthreadcount = 150 + + +; Incoming radio connections + +[radio] +type = user +disallow = all +allow = ulaw +allow = adpcm +;allow = g722 +;allow = g726aal2 +allow = gsm +;allow = ilbc +codecpriority = host +context = radio-secure +transfer = no + +[iaxrpt] ; Connect from iaxrpt Username field (PC AllStar Client) +type = user ; Notice type is user here <--------------- +context = iaxrpt ; Context to jump to in extensions.conf +auth = md5 +secret = Your_Secret_Pasword_Here +host = dynamic +disallow = all +allow = ulaw +allow = adpcm +allow = gsm +transfer = no + +[iaxclient] ; Connect from iax client (Zoiper...) +type = friend ; Notice type here is friend <-------------- +context = iax-client ; Context to jump to in extensions.conf +auth = md5 +secret = Your_Secret_Password_Here +host = dynamic +disallow = all +allow = ulaw +allow = adpcm +allow = gsm +transfer = no + +[allstar-sys] +type = user +context = allstar-sys +auth = rsa +inkeys = allstar +disallow = all +allow = ulaw +allow = adpcm +allow = gsm + +[allstar-public] +type = user +context = allstar-public +auth = md5 +secret = allstar +disallow = all +;calltokenoptional=0.0.0.0/0.0.0.0 +requirecalltoken=no +allow = ulaw +allow = adpcm +allow = gsm + +; The following should be un-commented to support Allstar Autopatch service +; [allstar-autopatch] +; type = peer +; host = register.allstarlink.org +; username = +; secret = +; auth = md5 +; disallow = all +; allow = ulaw +; transfer = no + +#tryinclude custom/iax.conf diff --git a/asterisk_conf/logger.conf b/asterisk_conf/logger.conf new file mode 100644 index 0000000..c651b72 --- /dev/null +++ b/asterisk_conf/logger.conf @@ -0,0 +1,20 @@ +; +; Logging Configuration +; +[general] +dateformat=%F %T.%3q ; with milliseconds + +[logfiles] +; +; Format is "filename" and then "levels" of debugging to be included: +; debug +; notice +; warning +; error +; +; Special filename "console" represents the system console +; +;debug.log => debug +console => notice,warning,error,dtmf,debug,verbose +;console => notice,warning,error,dtmf +messages.log => notice,warning,error,dtmf diff --git a/asterisk_conf/manager.conf b/asterisk_conf/manager.conf new file mode 100644 index 0000000..b1fb032 --- /dev/null +++ b/asterisk_conf/manager.conf @@ -0,0 +1,16 @@ +; +; Asterisk Call Management support +; + +; By default asterisk will listen on localhost only. +[general] +enabled = yes +port = 5038 +bindaddr = 127.0.0.1 ; Comment when not localhost access + +[admin] +secret = make4An1ce-secret +read = all,system,call,log,verbose,command,agent,user,config +write = all,system,call,log,verbose,command,agent,user,config +;deny = 0.0.0.0/0.0.0.0 ; Uncomment when not localhost +;permit=1.2.3.4/255.255.255.255 ; Uncomment when not localhost diff --git a/asterisk_conf/modules.conf b/asterisk_conf/modules.conf new file mode 100644 index 0000000..f57d3cc --- /dev/null +++ b/asterisk_conf/modules.conf @@ -0,0 +1,186 @@ +; +; Asterisk module loading configuration file +; + +; +; You can enable or disable any of the asterisk modules +; +; To enable a module, use : load = module_name.so +; To disable a module, use : noload = module_name.so +; + +; +; For ASL (app_rpt), you need to enable the channel driver modules you will +; be using. You will find the modules in the "Channel Driver" section, below. +; +; The most common ASL (app_rpt) channel drivers are: +; +; chan_dahdi.so DAHDI Telephony +; chan_echolink.so Echolink Channel Driver +; chan_simpleusb.so Simple USB Radio Interface Channel Driver +; chan_usbradio.so USB Console Channel Driver +; chan_usrp.so USRP Channel Module +; chan_voter.so Voter Radio Channel Driver +; + +[modules] +autoload = no + +;load = func_frame_trace ; Debug + +; Applications + +load = app_authenticate.so ; Authentication Application +load = app_dial.so ; Dialing Application +load = app_exec.so ; Executes dialplan applications +noload = app_gps.so ; GPS Interface +load = app_playback.so ; Sound File Playback Application +require = app_rpt.so ; Radio Repeater/Remote Base Application +load = app_sendtext.so ; Send and Receive Text Applications +load = app_system.so ; Generic System() application +load = app_transfer.so ; Transfers a caller to another extension + +; Channel Drivers + +load = chan_dahdi.so ; DAHDI Telephony w/PRI & SS7 & MFC/R2 +noload = chan_echolink.so ; Echolink Channel Driver +require = chan_iax2.so ; Inter Asterisk eXchange (Ver 2) +noload = chan_mobile.so ; Bluetooth Mobile Device Channel Driver +noload = chan_ooh323.so ; Objective Systems H323 Channel +load = chan_simpleusb.so ; SimpleUSB Radio Interface Channel Driver +noload = chan_tlb.so ; TheLinkBox Channel Driver +noload = chan_usbradio.so ; USB Console Channel Driver +noload = chan_usrp.so ; USRP Channel Module +noload = chan_voter.so ; Voter Radio Channel Driver + +; Codecs + +; CODEC AUDIO QUALITY BANDWIDTH (including IP and Ethernet headers) +; ULAW best 87 kilobits per second (kbps) +; ADPCM good 55 kbps +; GSM mediocre 36 kbps +; g726aal2 +; ilbc + +load = codec_adpcm.so ; Adaptive Differential PCM Coder/Decoder +load = codec_alaw.so ; A-law Coder/Decoder +load = codec_a_mu.so ; A-law and Mulaw direct Coder/Decoder +noload = codec_dahdi.so ; Generic DAHDI Transcoder Codec Translator +noload = codec_g722.so ; ITU G.722-64kbps G722 Transcoder +load = codec_g726.so ; ITU G.726-32kbps G726 Transcoder +load = codec_gsm.so ; GSM Coder/Decoder +noload = codec_resample.so ; SLIN Resampling Codec +load = codec_ulaw.so ; mu-Law Coder/Decoder + +; Formats + +load = format_g723.so ; G.723.1 Simple Timestamp File Format +load = format_g726.so ; Raw G.726 (16/24/32/40kbps) data +noload = format_g729.so ; Raw G.729 data +load = format_gsm.so ; Raw GSM data +load = format_h263.so ; Raw H.263 data +load = format_h264.so ; Raw H.264 data +load = format_ilbc.so ; Raw iLBC data +load = format_mp3.so ; MP3 format [Any rate but 8000hz mono is optimal] +load = format_pcm.so ; Raw/Sun uLaw/ALaw 8KHz (PCM,PCMA,AU), G.722 16Khz +load = format_sln.so ; Raw Signed Linear Audio support (SLN) 8khz-192khz +load = format_vox.so ; Dialogic VOX (ADPCM) File Format +load = format_wav_gsm.so ; Microsoft WAV format (Proprietary GSM) +load = format_wav.so ; Microsoft WAV/WAV16 format (8kHz/16kHz Signed Linear) + +; Functions + +load = func_base64.so ; base64 encode/decode dialplan functions +load = func_callerid.so ; Party ID related dialplan functions (Caller-ID, Connected-line, Redirecting) +load = func_cdr.so ; Call Detail Record (CDR) dialplan functions +load = func_channel.so ; Channel information dialplan functions +load = func_curl.so ; Load external URL +load = func_cut.so ; Cut out information from a string +load = func_db.so ; Database (astdb) related dialplan functions +load = func_enum.so ; ENUM related dialplan functions +load = func_env.so ; Environment/filesystem dialplan functions +load = func_global.so ; Variable dialplan functions +load = func_groupcount.so ; Channel group dialplan functions +load = func_logic.so ; Logical dialplan functions +load = func_math.so ; Mathematical dialplan function +load = func_md5.so ; MD5 digest dialplan functions +load = func_rand.so ; Random number dialplan function +load = func_realtime.so ; Read/Write/Store/Destroy values from a RealTime repository +noload = func_sha1.so ; SHA-1 computation dialplan function +load = func_strings.so ; String handling dialplan functions +noload = func_timeout.so ; Channel timeout dialplan functions +noload = func_uri.so ; URI encode/decode dialplan functions + +; Core/PBX + +load = pbx_config.so ; Text Extension Configuration + +; Resources + +load = res_crypto.so ; Cryptographic Digital Signatures +require = res_curl.so ; cURL Resource Module +require = res_rpt_http_registrations.so ; RPT HTTP Periodic Registrations +load = res_timing_dahdi.so ; DAHDI Timing Interface +load = res_timing_timerfd.so ; Timerfd Timing Interface is preferred for ASL3 +require = res_usbradio.so ; USB Radio Resource + +; +; The following modules are used by configurations that are setup for +; an "autopatch" or support SIP phones. If needed, uncomment each of +; the following lines (by removing the leading ";"). +; +;load = bridge_builtin_features.so ; Built in bridging features +;load = bridge_builtin_interval_features.so ; Built in bridging interval features +;load = bridge_holding.so ; Holding bridge module +;load = bridge_native_rtp.so ; Native RTP bridging module +;load = bridge_simple.so ; Simple two channel bridging module +;load = bridge_softmix.so ; Multi-party software based channel mixing +;load = chan_bridge_media.so ; Bridge Media Channel Driver +;load = chan_pjsip.so ; PJSIP Channel Driver +;load = func_pjsip_endpoint.so ; Get information about a PJSIP endpoint +;load = func_sorcery.so ; Get a field from a sorcery object +;load = func_devstate.so ; Gets or sets a device state in the dialplan +;load = res_pjproject.so ; PJPROJECT Log and Utility Support +;load = res_pjsip_acl.so ; PJSIP ACL Resource +;load = res_pjsip_authenticator_digest.so ; PJSIP authentication resource +;load = res_pjsip_caller_id.so ; PJSIP Caller ID Support +;load = res_pjsip_dialog_info_body_generator.so ; PJSIP Extension State Dialog Info+XML Provider +;load = res_pjsip_diversion.so ; PJSIP Add Diversion Header Support +;load = res_pjsip_dtmf_info.so ; PJSIP DTMF INFO Support +;load = res_pjsip_endpoint_identifier_anonymous.so ; PJSIP Anonymous endpoint identifier +;load = res_pjsip_endpoint_identifier_ip.so ; PJSIP IP endpoint identifier +;load = res_pjsip_endpoint_identifier_user.so ; PJSIP username endpoint identifier +;load = res_pjsip_exten_state.so ; PJSIP Extension State Notifications +;load = res_pjsip_header_funcs.so ; PJSIP Header Functions +;load = res_pjsip_logger.so ; PJSIP Packet Logger +;load = res_pjsip_messaging.so ; PJSIP Messaging Support +;load = res_pjsip_mwi_body_generator.so ; PJSIP MWI resource +;load = res_pjsip_mwi.so ; PJSIP MWI resource +;load = res_pjsip_nat.so ; PJSIP NAT Support +;load = res_pjsip_notify.so ; CLI/AMI PJSIP NOTIFY Support +;load = res_pjsip_one_touch_record_info.so ; PJSIP INFO One Touch Recording Support +;load = res_pjsip_outbound_authenticator_digest.so ; PJSIP authentication resource +;load = res_pjsip_outbound_publish.so ; PJSIP Outbound Publish Support +;load = res_pjsip_outbound_registration.so ; PJSIP Outbound Registration Support +;load = res_pjsip_path.so ; PJSIP Path Header Support +;load = res_pjsip_pidf_body_generator.so ; PJSIP Extension State PIDF Provider +;load = res_pjsip_pidf_digium_body_supplement.so ; PJSIP PIDF Sangoma presence supplement +;load = res_pjsip_pidf_eyebeam_body_supplement.so ; PJSIP PIDF Eyebeam supplement +;load = res_pjsip_publish_asterisk.so ; PJSIP Asterisk Event PUBLISH Support +;load = res_pjsip_pubsub.so ; PJSIP event resource +;load = res_pjsip_refer.so ; PJSIP Blind and Attended Transfer Support +;load = res_pjsip_registrar.so ; PJSIP Registrar Support +;load = res_pjsip_rfc3326.so ; PJSIP RFC3326 Support +;load = res_pjsip_sdp_rtp.so ; PJSIP SDP RTP/AVP stream handler +;load = res_pjsip_send_to_voicemail.so ; PJSIP REFER Send to Voicemail Support +;load = res_pjsip_session.so ; PJSIP Session resource +;load = res_pjsip.so ; Basic SIP resource +;noload = res_pjsip_t38.so ; PJSIP T.38 UDPTL Support +;noload = res_pjsip_transport_websocket.so ; PJSIP WebSocket Transport Support +;load = res_pjsip_xpidf_body_generator.so ; PJSIP Extension State PIDF Provider +;load = res_rtp_asterisk.so ; Asterisk RTP Stack +;load = res_sorcery_astdb.so ; Sorcery Astdb Object Wizard +;load = res_sorcery_config.so ; Sorcery Configuration File Object Wizard +;load = res_sorcery_memory.so ; Sorcery In-Memory Object Wizard +;load = res_sorcery_realtime.so ; Sorcery Realtime Object Wizard + diff --git a/asterisk_conf/res_http_media_cache.conf b/asterisk_conf/res_http_media_cache.conf new file mode 100644 index 0000000..925156b --- /dev/null +++ b/asterisk_conf/res_http_media_cache.conf @@ -0,0 +1,69 @@ +; +; Sample configuration for res_http_media_cache +; +; res_http_media_cache is the HTTP backend for the core media cache. The +; following options can be used to tune the behavior of the implementation +; or left as default. +; +; See the module's and cURL's documentation for the exact meaning of these +; options. + + +[general] +; Maximum time in seconds the transfer is allowed to complete in. +; +; See https://curl.se/libcurl/c/CURLOPT_TIMEOUT.html for details. +; +;timeout_secs = 180 + + +; The HTTP User-Agent to use for requests. +; +; See https://curl.se/libcurl/c/CURLOPT_USERAGENT.html for details. +; +;user_agent = asterisk-libcurl-agent/1.0 + + +; Follow HTTP 3xx redirects on requests. This can be combined with the +; max_redirects option to limit the number of times a redirect will be +; followed per request. +; +; See https://curl.se/libcurl/c/CURLOPT_FOLLOWLOCATION.html for details. +; +;follow_location = false + + +; The maximum number of redirects to follow. +; +; See https://curl.se/libcurl/c/CURLOPT_MAXREDIRS.html for details. +; +;max_redirects = 8 + +; The HTTP/HTTPS proxy to use for requests. Leave unspecified to not use +; a proxy. This can be a URL with scheme, host and port. +; +; See https://curl.se/libcurl/c/CURLOPT_PROXY.html for details. +; +;proxy = https://localhost:1234 + + +; The life-time for DNS cache entries. +; +; See https://curl.se/libcurl/c/CURLOPT_DNS_CACHE_TIMEOUT.html for details. +; +;dns_cache_timeout_secs = 60 + + +; The comma separated list of allowed protocols for the request. Available with +; cURL version 7.85.0 or later. +; See https://curl.se/libcurl/c/CURLOPT_PROTOCOLS_STR.html for details. +; +;protocols = http,https + +; The comma separated list of allowed protocols for redirects. Available with +; cURL version 7.85.0 or later. This can be used to prevent a redirect from +; a protocol like HTTPS to another supported protocol of cURL. +; +; See https://curl.se/libcurl/c/CURLOPT_REDIR_PROTOCOLS_STR.html for details. +; +;redirect_protocols = http,https diff --git a/asterisk_conf/res_usbradio.conf b/asterisk_conf/res_usbradio.conf new file mode 100644 index 0000000..d4d8030 --- /dev/null +++ b/asterisk_conf/res_usbradio.conf @@ -0,0 +1,7 @@ +[general] +;usb_devices = 1209:7388 ;comma delimited list of usb + ;descriptors to allow. + ;format vvvv:pppp in hexadecimal + ;vvvv=vendor id, pppp=product id + ; + ;1209:7388 = AIOC (all in one cable) diff --git a/asterisk_conf/rpt.conf b/asterisk_conf/rpt.conf new file mode 100644 index 0000000..d5d47ed --- /dev/null +++ b/asterisk_conf/rpt.conf @@ -0,0 +1,662 @@ +;********************************************* +;******** Template-tized rpt.conf ******** +;********************************************* +; Note to editors: set tabs to 4 space characters. No wrap to keep comments neat. +; vim: tabstop=4 +; +; Radio Repeater configuration file for use with app_rpt ASL3 +; + +[general] + +;; Docker container only support dns +node_lookup_method = dns ;method used to lookup nodes + ;both = dns lookup first, followed by external file (default) + ;dns = dns lookup only + ;file = external file lookup only + +[nodes] +; If you are using automatic update for allstar link nodes, and you probably are, +; no allstar remote nodes should be defined here. Only place a definition +; for your local nodes, and private (not on allstar directory) nodes here. + +; Sample nodes on this server. These are required. Use IP 127.0.0.1 +; IAX port number if not the default 4569. +;1998 = radio@127.0.0.1/1998,NONE + +; Sample public or private node behind your router. +;1001 = radio@192.168.1.8:4568/1001,NONE + +; Sample private node on the internet. +;1000 = radio@8.8.8.8:4569/1000,NONE + +1999 = radio@127.0.0.1/1999,NONE + +[node-main](!) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;; Template for all your nodes ;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; Set the defaults for your node(s) here. +; Add your nodes below the line that says +; Add you nodes below. + +;;; rxchannel ;;; +; Must also be enabled in modules.conf +; Enable the selected channel driver in modules.conf !!! +; Rx/Tx audio/signalling channel. Choose ONLY 1 per node stanza. +; rxchannel = dahdi/pseudo ; No radio (hub) +; rxchannel = SimpleUSB/1999 ; SimpleUSB +; rxchannel = Radio/1999 ; USBRadio (DSP) +; rxchannel = Voter/1999 ; RTCM device +; rxchannel = Pi/1 ; Raspberry Pi PiTA +; rxchannel = Dahdi/1 ; PCI Quad card +; rxchannel = Beagle/1 ; BeagleBoard +; rxchannel = USRP/127.0.0.1:34001:32001 ;GNU Radio interface USRP + +rxchannel = dahdi/pseudo ; No radio (hub) + +duplex = 2 ; 0 = Half duplex with no telemetry tones or hang time. + ; Special Case: Full duplex if linktolink is set to yes. + ; This mode is preferred when interfacing with an external multiport repeater controller. + ; Comment out idrecording and idtalkover to suppress IDs also + ; 1 = Half duplex with telemetry tones and hang time. Does not repeat audio. + ; This mode is preferred when interfacing a simplex node. + ; 2 = Full Duplex with telemetry tones and hang time. + ; This mode is preferred when interfacing a repeater. + ; 3 = Full Duplex with telemetry tones and hang time, but no repeated audio. + ; 4 = Full Duplex with telemetry tones and hang time. Repeated audio only when the autopatch is down. + +linktolink = no ; disables forcing physical half-duplex operation of main repeater while + ; still keeping half-duplex semantics (optional) + +linkmongain = -22 ; Link Monitor Gain adjusts the audio level of monitored nodes when a signal from another node or the local receiver is received. + ; If linkmongain is set to a negative number the monitored audio will decrease by the set amount in db. + ; If linkmongain set to a positive number monitored audio will increase by the set amount in db. + ; The value of linkmongain is in db. The default value is 0 db. + +erxgain = -3 ; Echolink receive gain adjustment + ; Note: Gain is in db-volts (20logVI/VO) +etxgain = 3 ; Echolink transmit gain adjustment + ; Note: Gain is in db-volts (20logVI/VO) +;eannmode = 1 ; 1 = Say only node number on echolink connects (default = 1) + ; 2 = say phonetic call sign only on echolink connects + ; 3 = say phonetic call sign and node number on echolink connects + +;echolinkdefault = 2 ; 0 = Telemetry output off + ; 1 = Telemetry output on + ; 2 = Timed telemetry output on command execution and for a short time thereafter + ; 3 = Follow local telemetry mode + +;echolinkdynamic = 1 ; 0 = Disallow users to change current echolink telemetry setting with a COP command + ; 1 = Allow users to change the setting with a COP command + + +controlstates = controlstates ; system control state stanza + +scheduler = schedule ; scheduler stanza +functions = functions ; Repeater Function stanza +phone_functions = functions ; Phone Function stanza +link_functions = functions ; Link Function stanza + +telemetry = telemetry ; Telemetry stanza +morse = morse ; Morse stanza +wait_times = wait-times ; Wait times stanza + +;inxlat = *,#,0123456789ABCD,Y ; The Y is for dialtone on function, a la CACTUS + ; https://wiki.allstarlink.org/wiki/Rpt.conf#inxlat.3D + +context = radio ; dialing context for phone +callerid = "Repeater" <0000000000> ; callerid for phone calls +accountcode = RADIO ; account code (optional) + +hangtime = 2000 ; squelch tail hang time (in ms) (optional, default 5 seconds, 5000 ms) +althangtime = 4000 ; longer squelch tail +totime = 180000 ; transmit time-out time (in ms) (optional, default 3 minutes 180000 ms) + +idrecording = |iNOTSET ; id recording or morse string +;idtalkover = ; Talkover ID (optional) default is none +idtime = 540000 ; id interval time (in ms) (optional) Default 5 minutes (300000 ms) +politeid = 30000 ; time in milliseconds before ID timer expires to try and ID in the tail. (optional, default 30000) + +;tailmessagelist=/etc/asterisk/sounds/yourtailmessage +;tailsquashedtime=900000 ; 15 minutes +;tailmessagetime=21600000 ; 6 hours (200000000 ms, 55.5555 hours is the max value possible) + +unlinkedct = ct2 ; Send a this courtesy tone when the user unkeys if the node is not connected to any other nodes. (optional, default is none) +remotect = ct3 ; remote linked courtesy tone (indicates a remote is in the list of links) +linkunkeyct = ct8 ; sent when a transmission received over the link unkeys +;nolocallinkct = 0 ; Send unlinkedct instead if another local node is connected to this node (hosted on the same PC). + +;connpgm = yourconnectprogram ; Disabled. Execute a program you specify on connect. (default) + ; passes 2 command line arguments to your program: + ; 1. node number in this stanza (us) + ; 2. node number being connected to us (them) +;discpgm = yourdisconnectprogram ; Disabled. Execute a program you specify on disconnect. (default) + ; passes 2 command line arguments to your program: + ; 1. node number in this stanza (us) + ; 2. node number being disconnected from us (them) + +;events=events ; Events Management https://wiki.allstarlink.org/wiki/Event_Management + +;lnkactenable = 0 ; Set to 1 to enable the link activity timer. Applicable to standard nodes only. + +;lnkacttime = 1800 ; Link activity timer time in seconds. +;lnkactmacro = *52 ; Function to execute when link activity timer expires. +;lnkacttimerwarn = 30seconds ; Message to play when the link activity timer has 30 seconds left. + +;remote_inact_timeout = ; Specifies the amount of time without keying from the link. Set to 0 to disable timeout. (15 * 60) +;remote_timeout = ; Session time out for remote base. Set to 0 to disable. (60 * 60) +;remote_timeout_warning_freq = ; 30 +;remote_timeout_warning = ; (3 * 60) + +;nounkeyct = 0 ; Set to a 1 to eliminate courtesy tones and associated delays. + +holdofftelem = 0 ; Hold off all telemetry when signal is present on receiver or from connected nodes + ; except when an ID needs to be done and there is a signal coming from a connected node. + +telemnomdb = -3 ; Telemetry Nominal Amplitude reference in dB +telemduckdb = -15 ; Telemetry Ducking in dB when local or link voice tx in progress + +telemdefault = 2 ; 0 = telemetry output off + ; 1 = telemetry output on (default = 1) + ; 2 = timed telemetry output on command execution and for a short time thereafter. + +telemdynamic = yes ; yes = disallow users to change the local telemetry setting with a COP command + ; 1 = Allow users to change the setting with a COP command. (default = 1) + +;beaconing = 0 ; Send ID regardless of repeater activity (Required in the UK, but probably illegal in the US) + +parrotmode = 0 ; 0 = Parrot Off (default = 0) + ; 1 = Parrot On Command + ; 2 = Parrot Always + ; 3 = Parrot Once by Command + +parrottime = 1000 ; Set the amount of time in milliseconds + ; to wait before parroting what was received + +;rxnotch=1065,40 ; (Optional) Notch a particular frequency for a specified + ; b/w. app_rpt must have been compiled with + ; the notch option + +;startup_macro = ; Best use in your node stanza (below) when more than one node + +;nodenames = /var/lib/asterisk/sounds/rpt/nodenames.callsign ; Point to alternate nodename sound directory + +;aprstt = general ; To enable APRStt, set this value to the stanza to use in gps.conf + ; module app_gps.so will need to be enabled + +; *** Status Reporting *** +; +; Uncomment the following "statpost_url" line to enable status reporting +; of all of your nodes to "stats.allstarlink.org". To enable reporting +; of a single node then add the line (without the leading ";") to the +; per-node stanza(s). +; +;statpost_url = http://stats.allstarlink.org/uhandler ; Status updates + +; *** Audio Archiving *** +; +; The following "archivedir" line can be used to enable a simple log and +; audio recorder of the activity on a node. When enabled, a series of +; recordings, one for each active COR on the node. The file(s) will be +; named with the date and time down to the 1/100th of a second. This +; logging can be useful in debugging, policing, or other creative things. +; +; The "archiveformat" line can be used to specify the format of the audio +; recordings. By default, the format will be "wav49" (GSM in a .WAV file). +; Other options you may consider include "wav" (SLIN in a .wav file) and +; "gsm" (GSM in straight gsm format). +; +; The "archivedir" and "archiveformat" lines can be enabled here (affecting +; all nodes) or in the per-node stanzas (for recording of individual nodes). +; +; Note: enabling these recordings can adversly impact the CPU utilization +; on the device and consume large amounts of the available storage. +; +;archivedir = /var/spool/asterisk/monitor ; top-level recording directory +;archiveformat = wav49 ; audio format (default = wav49) + +;;; End of node-main template + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;; Configure your nodes here ;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; +; Note: there is no need to duplicate entire settings. Only +; place settings that are different than the template. +; + +[1999](node-main) +;;;;;;;;;;;;;;;;;;; Your node settings here ;;;;;;;;;;;;;;;;;;; +rxchannel = dahdi/pseudo ; pseudo +;startup_macro = *8132000 + +;[1998](node-main) +;;;;;;;;;;;;;;;;;;; Another node settings here ;;;;;;;;;;;;;;;;;;; +;startup_macro = *8132000 +;morse = morse_1998 ; Sample morse stanza for node 1998 + +[functions] +;;;;;;;;;;;;;;;;;;; functions stanza ;;;;;;;;;;;;;;;;;;; +; Prefix Functions +; *1 Disconnect Link +; *2 Monitor Link +; *3 Connect Link +; *4 Command Mode +; *5 Macros +; *6 User Functions +; *7 Connection Status/Functions +; *8 User Functions +; *9 User Functions +; *0 User Functions + +; *A User Functions +; *B User Functions +; *C User Functions +; *D User Functions + +;;;;;; Mandatory Command Codes ;;;;; +1 = ilink,1 ; Disconnect specified link +2 = ilink,2 ; Connect specified link -- monitor only +3 = ilink,3 ; Connect specified link -- tranceive +4 = ilink,4 ; Enter command mode on specified link +70 = ilink,5 ; System status +99 = cop,6 ; PTT (phone mode only) + +;;;;; Macro Commands ;;;;; +5 = macro + +;;;;; Autopatch Commands ;;;;; +; Note, This may be a good place for other 2 digit frequently used commands +;61 = autopatchup,noct = 1,farenddisconnect = 1,dialtime = 20000 ; Autopatch up +;62 = autopatchdn ; Autopatch down + +; autopatchup can optionally take comma delimited setting=value pairs: +; context = string ; Override default context with "string" +; dialtime = ms ; Specify the max number of milliseconds between phone number digits (1000 milliseconds = 1 second) +; farenddisconnect = 1 ; Automatically disconnect when called party hangs up +; noct = 1 ; Don't send repeater courtesy tone during autopatch calls +; quiet = 1 ; Don't send dial tone, or connect messages. Do not send patch down message when called party hangs up + ; Example: 123=autopatchup,dialtime=20000,noct=1,farenddisconnect=1 + +;;;;; Status Commands ;;;;; +; 1 - Force ID (global) +; 2 - Give Time of Day (global) +; 3 - Give software Version (global) +; 4 - Give GPS location info +; 5 - Last (dtmf) user +; 11 - Force ID (local only) +; 12 - Give Time of Day (local only) + +721 = status,1 ; Force ID (global) +722 = status,2 ; Give Time of Day (global) +723 = status,3 ; Give software Version (global) +724 = status,4 ; Give GPS location info +725 = status,5 ; Last (dtmf) user +711 = status,11 ; Force ID (local only) +712 = status,12 ; Give Time of Day (local only) + +;;;;; Link Commands ;;;;; +; 1 - Disconnect specified link +; 2 - Connect specified link -- monitor only +; 3 - Connect specified link -- tranceive +; 4 - Enter command mode on specified link +; 5 - System status +; 6 - Disconnect all links +; 7 - Last Node to Key Up +; 8 - Connect specified link -- local monitor only +; 9 - Send Text Message (9,,Message Text, etc. +; 10 - Disconnect all RANGER links (except permalinks) +; 11 - Disconnect a previously permanently connected link +; 12 - Permanently connect specified link -- monitor only +; 13 - Permanently connect specified link -- tranceive +; 15 - Full system status (all nodes) +; 16 - Reconnect links disconnected with "disconnect all links" +; 17 - MDC test (for diag purposes) +; 18 - Permanently Connect specified link -- local monitor only + +;;;;; ilink commands ;;;;; +; commands 1 through 5 are defined in the Mandatory Command section + +; 806 = ilink,6 ; Disconnect all links +; 807 = ilink,7 ; Last Node to Key Up +; 808 = ilink,8 ; Connect specified link -- local monitor only +; 809 = ilink,9,1999,"Testing" ; would send a text message to node 1999 replace 1999 with 0 for all connected nodes +; 810 = ilink,10 ; Disconnect all RANGER links (except permalinks) +; 811 = ilink,11 ; Disconnect a previously permanently connected link +; 812 = ilink,12 ; Permanently connect specified link -- monitor only +; 813 = ilink,13 ; Permanently connect specified link -- tranceive +; 815 = ilink,15 ; Full system status (all nodes) +; 816 = ilink,16 ; Reconnect links disconnected with "disconnect all links" +; 817 = ilink,17 ; MDC test (for diag purposes) +; 818 = ilink,18 ; Permanently Connect specified link -- local monitor only + +;;;;; Control operator (cop) functions. ;;;;; +;Change these to something other than these codes listed below! + +;901 = cop,1 ; System warm boot +;902 = cop,2 ; System enable +;903 = cop,3 ; System disable + +;904 = cop,4 ; Test tone on/off (toggle) +;905 = cop,5 ; Dump system variables on console (debug use only) + +;907 = cop,7 ; Time out timer enable +;908 = cop,8 ; Time out timer disable + +;909 = cop,9 ; Autopatch enable +;910 = cop,10 ; Autopatch disable + +;911 = cop,11 ; User linking functions enable +;912 = cop,12 ; User linking functions disable + +;913 = cop,13 ; Query system control state +;914 = cop,14 ; Set system control state + +;915 = cop,15 ; Scheduler enable +;916 = cop,16 ; Scheduler disable + +;917 = cop,17 ; User functions enable (time, id, etc) +;918 = cop,18 ; User functions disable + +;919 = cop,19 ; Select alternate hang time (althangtime) +;920 = cop,20 ; Select standard hangtime (hangtime) + +;921 = cop,21 ; Enable Parrot Mode +;922 = cop,22 ; Disable Parrot Mode +;923 = cop,23 ; Birdbath (Current Parrot Cleanup/Flush) + +;924 = cop,24 ; Flush all telemetry +;925 = cop,25 ; Query last node un-keyed +;926 = cop,26 ; Query all nodes keyed/unkeyed +;930 = cop,30 ; Recall Memory Setting in Attached Xcvr + +;931 = cop,31 ; Channel Selector for Parallel Programmed Xcvr + +;932 = cop,32 ; Touchtone pad test: command + Digit string + # to playback all digits pressed + +;933 = cop,33 ; Local Telemetry Output Enable +;934 = cop,34 ; Local Telemetry Output Disable +;935 = cop,35 ; Local Telemetry Output on Demand + +;936 = cop,36 ; Foreign Link Local Output Path Enable +;937 = cop,37 ; Foreign Link Local Output Path Disable +;938 = cop,38 ; Foreign Link Local Output Path Follows Local Telemetry +;939 = cop,39 ; Foreign Link Local Output Path on Demand + +;942 = cop,42 ; Echolink announce node # only +;943 = cop,43 ; Echolink announce node Callsign only +;944 = cop,44 ; Echolink announce node # & Callsign + +;945 = cop,45 ; Link Activity timer enable +;945 = cop,46 ; Link Activity timer disable +;947 = cop,47 ; Reset "Link Config Changed" Flag + +;948 = cop,48 ; Send Page Tone (Tone specs separated by parenthesis) + +; 949 = cop,49 ; Disable incoming connections (control state noice) +; 950 = cop,50 ; Enable incoming connections (control state noicd) + +; 951 = cop,51 ; Enable sleep mode +; 952 = cop,52 ; Disable sleep mode +; 953 = cop,53 ; Wake up from sleep +; 954 = cop,54 ; Go to sleep +; 955 = cop,55 ; Parrot Once if parrot mode is disabled + +; 956 = cop,56 ; Rx CTCSS Enable +; 957 = cop,57 ; Rx CTCSS Disable + +; 958 = cop.58 ; Tx CTCSS On Input only Enable +; 959 = cop,59 ; Tx CTCSS On Input only Disable + +; 960 = cop,60 ; Send MDC-1200 Burst (cop,60,type,UnitID[,DestID,SubCode]) + ; Type is 'I' for PttID, 'E' for Emergency, and 'C' for Call + ; (SelCall or Alert), or 'SX' for STS (ststus), where X is 0-F. + ; DestID and subcode are only specified for the 'C' type message. + ; UnitID is the local systems UnitID. DestID is the MDC1200 ID of + ; the radio being called, and the subcodes are as follows: + ; Subcode '8205' is Voice Selective Call for Spectra ('Call') + ; Subcode '8015' is Voice Selective Call for Maxtrac ('SC') or + ; Astro-Saber('Call') + ; Subcode '810D' is Call Alert (like Maxtrac 'CA') + +; 961 = cop,61 ; Send Message to USB to control GPIO pins (cop,61,GPIO1=0[,GPIO4=1].....) +; 962 = cop,62 ; Send Message to USB to control GPIO pins, quietly (cop,62,GPIO1=0[,GPIO4=1].....) + +; 963 = cop,63 ; Send pre-configred APRStt notification (cop,63,CALL[,OVERLAYCHR]) +; 964 = cop,64 ; Send pre-configred APRStt notification, quietly (cop,64,CALL[,OVERLAYCHR]) +; 965 = cop,65 ; Send POCSAG page (equipped channel types only) + +; [functions-remote] +;;;;; Functions for remote bases ;;;;; +; +; 0 = remote,1 ; Retrieve Memory +; 1 = remote,2 ; Set freq. +; 2 = remote,3 ; Set tx PL tone +; 3 = remote,4 ; Set rx PL tone +; 40 = remote,100 ; Rx PL off +; 41 = remote,101 ; Rx PL on +; 42 = remote,102 ; Tx PL off +; 43 = remote,103 ; Tx PL on +; 44 = remote,104 ; Low Power +; 45 = remote,105 ; Medium Power +; 46 = remote,106 ; High Power +; 711 = remote,107 ; Bump -20 +; 714 = remote,108 ; Bump -100 +; 717 = remote,109 ; Bump -500 +; 713 = remote,110 ; Bump +20 +; 716 = remote,111 ; Bump +100 +; 719 = remote,112 ; Bump +500 +; 721 = remote,113 ; Scan - slow +; 724 = remote,114 ; Scan - quick +; 727 = remote,115 ; Scan - fast +; 723 = remote,116 ; Scan + slow +; 726 = remote,117 ; Scan + quick +; 729 = remote,118 ; Scan + fast +; 79 = remote,119 ; Tune +; 51 = remote,5 ; Long status query +; 52 = remote,140 ; Short status query +; 67 = remote,210 ; Send a * +; 69 = remote,211 ; Send a # +; 91 = remote,99,CALLSIGN,LICENSETAG ; Remote base login. + ; Define a different dtmf sequence for each user which is + ; authorized to use the remote base to control access to it. + ; For examble 9139583=remote,99,WB6NIL,G would grant access to + ; the remote base and announce WB6NIL as being logged in. + ; Another entry, 9148351=remote,99,WA6ZFT,E would grant access to + ; the remote base and announce WA6ZFT as being logged in. + ; When the remote base is disconnected from the originating node, the + ; user will be logged out. The LICENSETAG argument is used to enforce + ; tx frequency limits. See [txlimits] below. +; 85 = cop,6 ; Remote base telephone key + + +[telemetry] +;;;;; Telemetry ;;;;; +; Telemetry entries can be shared across all repeaters, or defined for each repeater. +; Can be a tone sequence, morse string, or a file +; +; |t - Tone escape sequence +; +; Tone sequences consist of 1 or more 4-tuple entries (freq1, freq2, duration, amplitude) +; Single frequencies are created by setting freq1 or freq2 to zero. +; +; |m - Morse escape sequence +; +; Sends Morse code at the telemetry amplitude and telemetry frequency as defined in the +; [morse] section. +; +; Follow with an alphanumeric string +; +; |i - Morse ID escape sequence +; +; Sends Morse code at the ID amplitude and ID frequency as defined in the +; [morse] section. +; + +ct1 = |t(350,0,100,2048)(500,0,100,2048)(660,0,100,2048) +ct2 = |t(660,880,150,2048) +ct3 = |t(440,0,150,4096) +ct4 = |t(550,0,150,2048) +ct5 = |t(660,0,150,2048) +ct6 = |t(880,0,150,2048) +ct7 = |t(660,440,150,2048) +ct8 = |t(700,1100,150,2048) +ct9 = |t(1633,0,50,1000)(0,0,30,0)(1209,0,50,1000); +ranger = |t(1800,0,60,3072)(0,0,50,0)(1800,0,60,3072)(0,0,50,0)(1800,0,60,3072)(0,0,50,0)(1800,0,60,3072)(0,0,50,0)(1800,0,60,3072)(0,0,50,0)(1800,0,60,3072)(0,0,150,0) +remotemon = |t(1209,0,50,2048) ; local courtesy tone when receive only +remotetx = |t(1633,0,50,3000)(0,0,80,0)(1209,0,50,3000) ; local courtesy tone when linked Trancieve mode +cmdmode = |t(900,903,200,2048) +functcomplete = |t(1000,0,100,2048)(0,0,100,0)(1000,0,100,2048) +remcomplete = |t(650,0,100,2048)(0,0,100,0)(650,0,100,2048)(0,0,100,0)(650,0,100,2048) +pfxtone = |t(350,440,30000,3072) +patchup = rpt/callproceeding +patchdown = rpt/callterminated + +; As far as what the numbers mean, +; (000,000,010,000) +; | | | |-------amplitude +; | | |-------------duration +; | |-------------------Tone 2 +; |-------------------------Tone 1 + +; So, with 0,0,10,0 That says No Tone1, No Tone2, 10ms duration, 0 Amplitude. +; Use it for a delay. Fine tuning for how long before telemetry is sent, in conjunction with the telemdelay parameter) +; The numbers, like 350,440,10,2048 are 350Hz, 440Hz, 10ms delay, amplitude of 2048. + +[morse] +;;;;; Mores code ;;;;; +; Morse code parameters, these are common to all repeaters. +speed = 20 ; Approximate speed in WPM +frequency = 800 ; Morse Telemetry Frequency +amplitude = 4096 ; Morse Telemetry Amplitude +idfrequency = 1065 ; Morse ID Frequency +idamplitude = 1024 ; Morse ID Amplitude + +;[morse] +;speed = 35 ; Not leagle in the USA +;frequency = 800 ; Morse Telemetry Frequency *Changed +;amplitude = 4096 ; Morse Telemetry Amplitude +;idfrequency = 750 ; Morse ID Frequency *Changed +;idamplitude = 512 ; Morse ID Amplitude *Changed + + +[wait-times] +; This section allows wait times for telemetry events to be adjusted +; A section for wait times can be defined for every repeater +telemwait = 2000 ; Time to wait before sending most telemetry +idwait = 500 ; Time to wait before starting ID +unkeywait = 2000 ; Time to wait after unkey before sending CT's and link telemetry +calltermwait = 2000 ; Time to wait before announcing "call terminated" + +[wait-times_hd] +; Sample for half-duplex +telemwait = 100 ; Time to wait before sending most telemetry +idwait = 100 ; Time to wait before starting ID +unkeywait = 100 ; Time to wait after unkey before sending CT's and link telemetry +calltermwait = 2000 ; Time to wait before announcing "call terminated" + +[memory] +;;;;; Remote base memories ;;;;; +; Memories for remote bases (not for repeaters or hotspots). Seldom used. +;00 = 146.580,100.0,m +;01 = 147.030,103.5,m+t +;02 = 147.240,103.5,m+t +;03 = 147.765,79.7,m-t +;04 = 146.460,100.0,m +;05 = 146.550,100.0,m + +[macro] +;;;;; Macro commands ;;;;; +;1 = *812000 +;2 = *822000 +;3 = *832000 +;4 = *31998*32000 + +;[daq-list] +;;;;; Data Acquisition configuration ;;;;; +;Where: device_name1 and device_name2 are stanzas you define in this file +;device = daq-cham-1 +;device = device_name1 +;device = device_name2 + +;[daq-cham-1] ; Defined in [daq-list] +; Device name +;hwtype = uchameleon ; DAQ hardware type +;devnode = /dev/ttyUSB0 ; DAQ device node (if required) +;1 = inadc ; Pin definition for an ADC channel +;2 = inadc +;3 = inadc +;4 = inadc +;5 = inadc +;6 = inadc +;7 = inadc +;8 = inadc +;9 = inp ; Pin definition for an input with a weak pullup resistor +;10 = inp +;11 = inp +;12 = inp +;13 = in ; Pin definition for an input without a weak pullup resistor +;14 = out ; Pin definition for an output +;15 = out +;16 = out +;17 = out +;18 = out + +;[meter-faces] +; +;face = scale(scalepre,scalediv,scalepost),word/?,... +; +; scalepre = offset to add before dividing with scalediv +; scalediv = full scale/number of whole units (e.g. 256/20 or 12.8 for 20 volts). +; scalepost = offset to add after dividing with scalediv +; +;face = range(X-Y:word,X2-Y2:word,...),word/?,... +;face = bit(low-word,high-word),word/?,... +; +; word/? is either a word in /var/lib/asterisk/sounds or one of its subdirectories, +; or a question mark which is a placeholder for the measured value. +; +; +; Battery voltage 0-20 volts +;batvolts = scale(0,12.8,0),rpt/thevoltageis,?,ha/volts +; 4 quadrant wind direction +;winddir = range(0-33:north,34-96:west,97-160:south,161-224:east,225-255:north),rpt/thewindis,? +; LM34 temperature sensor with 130 deg. F full scale +;lm34f = scale(0,1.969,0),rpt/thetemperatureis,?,degrees,fahrenheit +; Status poll (non alarmed) +;light = bit(ha/off,ha/on),ha/light,? + +;[alarms] +; +;tag = device,pin,node,ignorefirst,func-low,func-hi +; +;tag = a unique name for the alarm +;device = daq device to poll +;pin = the device pin to be monitored +;ignorefirstalarm = set to 1 to throwaway first alarm event, or 0 to report it +;node = the node number to execute the function on +;func-low = the DTMF function to execute on a high to low transition +;func-high = the DTMF function to execute on a low to high transition +; +; a '-' as a function name is shorthand for no-operation +; +;door = daq-cham-1,9,1,2017,*7,- +;pwrfail = daq-cham-1,10,0,2017,*911111,- + +;[events] +;;;;; Events Management ;;;;; +;status,2 = c|f|RPT_NUMLINKS ; Say time of day when all links disconnect. + +[controlstates] +;;;;; Control states ;;;;; +; Allow several control operator functions to be changed at once using one command (good for scheduling) +;statenum = copcmd,[copcmd]... https://wiki.allstarlink.org/wiki/Rpt.conf#Control_States_Stanza +0 = rptena,lnkena,apena,totena,ufena,noicd ; Normal operation +1 = rptena,lnkena,apdis,totdis,ufena,noice ; Net and news operation +2 = rptena,lnkdis,apdis,totena,ufdis,noice ; Repeater only operation + +[schedule] +;;;;; Scheduler - execute a macro at a given time ;;;;; +;dtmf_function = m h dom mon dow ; ala cron, star is implied +;2 = 00 00 * * * ; at midnight, execute macro 2. diff --git a/asterisk_conf/rpt_http_registrations.conf b/asterisk_conf/rpt_http_registrations.conf new file mode 100644 index 0000000..4a6e916 --- /dev/null +++ b/asterisk_conf/rpt_http_registrations.conf @@ -0,0 +1,5 @@ +[general] +register_interval = 180 ; every 3 minutes + +[registrations] +register => 1234:abcdef@register.allstarlink.org diff --git a/asterisk_conf/simpleusb.conf b/asterisk_conf/simpleusb.conf new file mode 100644 index 0000000..2d7e40e --- /dev/null +++ b/asterisk_conf/simpleusb.conf @@ -0,0 +1,145 @@ +;*************************************************** +;******** Template-tized simpleusb.conf ******** +;*************************************************** +; Note to editors: set tabs to 4 space characters. No wrap to keep comments neat. +; vim: tabstop=4 +; +; SimpleUSB channel driver Configuration File +; +;;;;; New to ASL3 ;;;;; +;;;;; The SimpleUSB "tune" settings have moved to ;;;;; +;;;;; this file. The simpleusb_tune_usb_1999.conf ;;;;; +;;;;; file is no longer used. ;;;;; + +; If you are going to use this channel driver, you MUST enable it in modules.conf +; change: +; noload => chan_simpleusb.so ; CM1xx USB Cards with Radio Interface Channel Driver (No DSP) +; noload => res_usbradio.so ; Required for both simpleusb and usbradio +; to: +; load => chan_simpleusb.so ; CM1xx USB Cards with Radio Interface Channel Driver (No DSP) +; load => res_usbradio.so ; Required for both simpleusb and usbradio + +[general] +;------------------------------ JITTER BUFFER CONFIGURATION -------------------------- +; jbenable = yes ; Enables the use of a jitterbuffer on the receiving side of an + ; simpleusb channel. Defaults to "no". An enabled jitterbuffer will + ; be used only if the sending side can create and the receiving + ; side can not accept jitter. The simpleusb channel can't accept jitter, + ; thus an enabled jitterbuffer on the receive simpleusb side will always + ; be used if the sending side can create jitter. + +; jbmaxsize = 200 ; Max length of the jitterbuffer in milliseconds. + +; jbresyncthreshold = 1000 ; Jump in the frame timestamps over which the jitterbuffer is + ; resynchronized. Useful to improve the quality of the voice, with + ; big jumps in/broken timestamps, usually sent from exotic devices + ; and programs. Defaults to 1000. + +; jbimpl = fixed ; Jitterbuffer implementation, used on the receiving side of an simpleusb + ; channel. Two implementations are currently available - "fixed" + ; (with size always equals to jbmax-size) and "adaptive" (with + ; variable size, actually the new jb of IAX2). Defaults to fixed. + +; jblog = no ; Enables jitterbuffer frame logging. Defaults to "no". +;----------------------------------------------------------------------------------- + +[node-main](!) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;; Template for all your SimpleUSB nodes ;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +eeprom = 0 ; EEPROM installed: 0,1 + ; 0 = no (default) + ; 1 = yes + +hdwtype = 0 ; Leave this set to 0 for USB sound fobs designed for app_rpt + ; or modified cmxxx sound fobs. + ; 1 is for Dingotel/Sph interfaces. + ; 2 is for NHC interfaces. + ; 3 is for a custom interface. + +; Receiver parameters +rxboost = no ; no = 20db attenuator inserted, yes = 20db attenuator removed + ; Set to yes for additional gain if using a low-level receiver output + ; CM119B devices are hard coded to rxboost 20dB attenuator removed + +carrierfrom = usbinvert ; no,usb,usbinvert + ; no - no carrier detection at all + ; usb - from the COR line on the USB sound fob (Active high) + ; usbinvert - from the inverted COR line on the USB sound fob (Active low) + ; pp - from parallel port (Active high) + ; ppinvert - from the inverted parallel port (Active low) + +ctcssfrom = usbinvert ; no,usb,usbinvert + ; no - CTCSS decoding, system will be carrier squelch + ; usb - CTCSS decoding using input from USB sound fob (Active high) + ; usbinvert - from the inverted CTCSS line on the USB sound fob (Active low) + ; pp - from parallel port (Active high) + ; ppinvert - from the inverted parallel port (Active low) + +deemphasis = no ; enable de-emphasis (input from discriminator) + +plfilter = yes ; enable PL filter + +rxondelay = 0 ; Number of 20mSec intervals following the release of PTT. + ; Uncomment and/or adjust for simplex nodes to eliminate "Ping Ponging" + ; or "Relay Racing". A positive value here will instruct the usbradio + ; driver to ignore the COR line for a specified number of 20mSec + ; intervals following the release of PTT. Use this ONLY on simplex + ; nodes, and leave commented out for repeaters or other full duplex nodes. + +txoffdelay = 0 ; Ignore the receiver for a specified number of 20 millisecond + ; intervals after the transmitter unkeys. + ; This is useful when setting up a half-duplex link with an existing + ; repeater, where you need to ignore the repeater's hangtime. + +; Transmitter parameters +txmixa = voice ; Left channel output (A): no,voice + ; no - Do not output anything + ; voice - output voice only + +txmixb = no ; Right channel output (B): no,voice + ; no - Do not output anything + ; voice - output voice only + +invertptt = no ; Invert PTT: no,yes + ; no - ground to transmit + ; yes - open to transmit + +preemphasis = no ; Perform standard 6db/octave pre-emphasis + +; pager = no ; no,a,b (e.g. pager = b means "put the normal repeat audio on channel A, and the pager audio on channel B") + +; duplex3 = 0 ; duplex 3 gain setting (0 to disable) + +clipledgpio = 1 ; Enable ADC Clip Detect feature to use a GPIO output (0 to disable). + ; Supports URI Clip LED by setting a GPIO (if available) high for 500mS + ; when clipping detected. Value = GPIO# to use (GPIO1 recommended) + +legacyaudioscaling = no ; If yes, continue to do raw audio sample scaling and clipping, resulting in Tx audio levels increasing + ; by 0.78dB and Rx audio levels increasing by 0-1.5dB. Should be set to no unless you have an existing + ; node with precisely adjusted audio levels and are unable to adjust them. This parameter and associated + ; scaling/clipping code will be deleted once existing installs have been able to verify their audio levels + +;;; End of node-main template + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;; Configure your nodes here ;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; +; Note: there is no need to duplicate entire settings. Only +; place settings that are different than the template. +; +; Note: the device string is automatically found when the +; USB setting "devstr=" is empty. +; +; Note: the interface "tune" settings will be added to the +; per-node settings (below). + +[1999](node-main) + +;;;;; ASL3 Tune settings ;;;;; +devstr= +rxmixerset=500 +txmixaset=500 +txmixbset=500 diff --git a/asterisk_conf/usbradio.conf b/asterisk_conf/usbradio.conf new file mode 100644 index 0000000..ea24982 --- /dev/null +++ b/asterisk_conf/usbradio.conf @@ -0,0 +1,213 @@ +;************************************************** +;******** Template-tized usbradio.conf ******** +;************************************************** +; Note to editors: set tabs to 4 space characters. No wrap to keep comments neat. +; vim: tabstop=4 +; +; USBRadio channel driver Configuration File +; +;;;;; New to ASL3 ;;;;; +;;;;; The USBRadio "tune" settings have moved to ;;;;; +;;;;; this file. The usbradio_tune_usb_1999.conf ;;;;; +;;;;; file is no longer used. ;;;;; + +; If you are going to use this channel driver, you MUST enable it in modules.conf +; noload => chan_usbradio.so ; CM1xx USB Cards with Radio Interface Channel Driver (DSP) +; noload => res_usbradio.so ; Required for both simpleusb and usbradio +; to: +; load => chan_usbradio.so ; CM1xx USB Cards with Radio Interface Channel Driver (DSP) +; load => res_usbradio.so ; Required for both simpleusb and usbradio + +[general] +;------------------------------ JITTER BUFFER CONFIGURATION -------------------------- +; jbenable = yes ; Enables the use of a jitterbuffer on the receiving side of an + ; USBRADIO channel. Defaults to "no". An enabled jitterbuffer will + ; be used only if the sending side can create and the receiving + ; side can not accept jitter. The USBRADIO channel can't accept jitter, + ; thus an enabled jitterbuffer on the receive USBRADIO side will always + ; be used if the sending side can create jitter. + +; jbmaxsize = 200 ; Max length of the jitterbuffer in milliseconds. + +; jbresyncthreshold = 1000 ; Jump in the frame timestamps over which the jitterbuffer is + ; resynchronized. Useful to improve the quality of the voice, with + ; big jumps in/broken timestamps, usually sent from exotic devices + ; and programs. Defaults to 1000. + +; jbimpl = fixed ; Jitterbuffer implementation, used on the receiving side of an USBRADIO + ; channel. Two implementations are currently available - "fixed" + ; (with size always equals to jbmax-size) and "adaptive" (with + ; variable size, actually the new jb of IAX2). Defaults to fixed. + +; jblog = no ; Enables jitterbuffer frame logging. Defaults to "no". +;----------------------------------------------------------------------------------- + +[node-main](!) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;; Template for all your USBRadio nodes ;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +eeprom = 0 ; EEPROM installed: 0,1 + ; 0 = no (default) + ; 1 = yes + +hdwtype = 0 ; Leave this set to 0 for USB sound fobs modified using + ; the instructions from usbfob.pdf. Use a setting of + ; 1 is for Dingotel/Sph interfaces. + +rxboost = yes ; no - 20db attenuator inserted + ; yes - 20db attenuator removed + ; Set to yes for additional gain if using a low-level receiver output + ; CM119B devices are hard coded to rxboost 20dB attenuator removed + +rxctcssrelax = 1 ; reduce talkoff from radios w/o CTCSS TX HPF + ; Do not change this, leave this as a 1 + +rxsqhyst = 3000 ; Setting Squelch Hysteresis + ; 3000 is the default amount. + ; An amount of 500 seems good. + ; Then set the squelch to the highest number revealed when doing a "radio + ; tune rxsquelch" - running the command multiple (like 20) times in a row. + +txctcssdefault = 100.0 ; default TX CTCSS frequency, any frequency permitted +rxctcssfreqs = 100.0,91.5 ; RX CTCSS frequencies list in floating point. must be in table +txctcssfreqs = 100.0,91.5 ; TX CTCSS frequencies list. any frequency permitted. will follow RX CTCSS frequency +rxctcssoverride = no ; Set to yes to start out in carrier squelch mode + +carrierfrom = dsp ; no,usb,usbinvert,dsp,vox + ; no - no carrier detection at all + ; usb - from the COR line on the USB sound fob (Active high) + ; usbinvert - from the inverted COR line on the USB sound fob (Active low) + ; dsp - from RX noise using DSP techniques + ; vox - voice activated from RX audio + ; pp - from parallel port (Active high) + ; ppinvert - from the inverted parallel port (Active low) + +voxhangtime = 2000 ; If carrierfrom=vox, mS to wait detecting RX audio before setting rxcarrierdetect=0 + ; 2000 is the default but results in 2 seconds of silence added after RX unkey. + ; 500 seems more optimal. Lower values may result in unintended drops in RX CD. + +ctcssfrom = dsp ; no,usb,usbinvert,dsp + ; no - no CTCSS decoding, system will be carrier squelch + ; usb - from the CTCSS line on the USB sound fob (Active high) + ; usbinvert - from the inverted CTCSS line on the USB sound fob (Active low) + ; dsp - CTCSS decoding using RX audio in DSP. + ; rxdemod option must be set to flat for this to work. + ; pp - from parallel port (Active high) + ; ppinvert - from the inverted parallel port (Active low) + +rxdemod = flat ; input type from radio: no,speaker,flat + ; no - RX audio input not used + ; flat - Use RX audio from discriminator (before de-emphasis) + ; speaker - use de-emphasized audio + +rxsquelchdelay = 30 ; delayline in ms carrier squelch tail eliminator + +rxondelay = 0 ; Number of 20mSec intervals following the release of PTT. + ; Uncomment and/or adjust for simplex nodes to eliminate "Ping Ponging" + ; or "Relay Racing". A positive value here will instruct the usbradio + ; driver to ignore the COR line for a specified number of 20mSec + ; intervals following the release of PTT. Use this ONLY on simplex + ; nodes, and leave commented out for repeaters or other full duplex nodes. + +txoffdelay = 0 ; Ignore the receiver for a specified number of 20 millisecond + ; intervals after the transmitter unkeys. + ; This is useful when setting up a half-duplex link with an existing + ; repeater, where you need to ignore the repeater's hangtime. + +txboost = no ; Add transmitter audio gain boost: no,yes + +txprelim = yes ; Audio processing on left output channel: no,yes + ; no - Audio is not pre-emphasized and limited. + ; (suitable for use on a microphone input) + ; yes - Audio is pre-emphasized and limited. + ; (suitable for direct connection to an FM modulator) + +txlimonly = yes ; Audio limiting with no pre-emphasis on output channel: no,yes + ; no - Audio is not limited. + ; yes - Audio is limited. + ; Suitable for transmitters with no limiting but with pre-emphasis. + +txtoctype = notone ; Transmit tone control type: no,phase,notone + ; no - CTCSS tone encoding with no hang time + ; phase - encode CTCSS and reverse phase + ; AKA ("reverse burst") before unkeying TX + ; notone - encode CTCSS and stop sending tone before unkeying TX + ; AKA ("chicken burst") + +txmixa = composite ; Left channel output: no,voice,tone,composite,auxvoice + ; no - Do not output anything + ; voice - output voice only + ; tone - CTCSS tone only + ; composite - voice and tone + ; auxvoice - auxiliary voice output at headphone level for monitoring + +txmixb = no ; Right channel output: no,voice,tone,composite, auxvoice + ; no - Do not output anything + ; voice - output voice only + ; tone - CTCSS tone only + ; composite - voice and tone + ; auxvoice - auxiliary voice output at headphone level for monitoring + +; Audio filters +rxlpf = 0 ; Receiver Audio Low Pass Filter 0,1 2 + ; 0 - 3.0 kHz cutoff (Default) value for reduced noise and increased intelligibility. + ; 1 - 3.3 kHz cutoff for increased high end, sibilance and brightness. + ; 2 - 3.5 kHz cutoff for even more high end, sibilance and brightness. +rxhpf = 0 ; Receiver Audio High Pass Filter 0,1 + ; 0 - 300 Hz cutoff. (Default) value to reduce sub-audible signals for retransmission and in the receiver speaker. + ; 1 - 250 Hz cutoff for additional received and retransmitted bass response. + ; recommend using this filter with a CTCSS tone no higher than 186.2 Hz. +txlpf = 0 ; Transmitter Audio Low Pass Filter 0,1 + ; 0 - 3.0 kHz cutoff. (Default) value. + ; 1 - 3.3 kHz cutoff for increased high end, sibilance and brightness. +txhpf = 0 ; Transmitter Audio High Pass Filter 0,1,2 + ; 0 - 300 Hz cutoff. (Default) value to reduce interference between voice and sub-audible signaling tones and codes. + ; 1 - 250 Hz cutoff for increased bass response in transmitted audio. + ; 2 - 120 Hz cutoff for special applications requiring additional bass response in transmitted audio. + ; Not recommended due to the increased possibility of voice energy interfering with sub-audible signaling + +invertptt = no ; Invert PTT: no,yes + ; no - ground to transmit + ; yes - open to transmit + +duplex = 0 ; Duplex 0,1 + ; 0 - half duplex + ; 1 - full duplex +duplex3 = 0 ; duplex 3 gain setting (0 to disable) ??? + +clipledgpio = 0 ; Enable ADC Clip Detect feature to use a GPIO output (0 to disable). + ; Supports URI Clip LED by setting a GPIO (if available) high for 500mS + ; when clipping detected. Value = GPIO# to use (GPIO1 recommended) + +legacyaudioscaling = no ; If yes, continue to do raw audio sample scaling and clipping, resulting in Tx audio levels increasing + ; by 0.83dB and Rx audio levels decreasing by 1.94dB. Should be set to no unless you have an existing + ; node with precisely adjusted audio levels and are unable to adjust them. This parameter and associated + ; scaling/clipping code will be deleted once existing installs have been able to verify their audio levels + +;;; End of node-main template + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;; Configure your nodes here ;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; +; Note: there is no need to duplicate entire settings. Only +; place settings that are different than the template. +; +; Note: the device string is automatically found when the +; USB setting "devstr=" is empty. +; +; Note: the interface "tune" settings will be added to the +; per-node settings (below). + +[1999](node-main) + +;;;;; ASL3 Tune settings ;;;;; +devstr= +rxmixerset=500 +txmixaset=500 +txmixbset=500 +rxvoiceadj=0.5 +rxctcssadj=0.5 +txctcssadj=200 +rxsquelchadj=500 diff --git a/asterisk_conf/voter.conf b/asterisk_conf/voter.conf new file mode 100644 index 0000000..1ffd1f9 --- /dev/null +++ b/asterisk_conf/voter.conf @@ -0,0 +1,59 @@ +[general] +;bindaddr = 10.10.10.1 ; specify a particular IP address to bind to (not generally used, defaults to bind to all interfaces) +port = 1667 ; specifies the UDP port to use for incoming connections +buflen = 480 ; specifies the receive buffer length in milliseconds. + ; This parameter should be set to the maximum expected network latency, + ; plus a little padding (100 milliseconds of padding is a good amount). + ; The default is 480 milliseconds, the minimum is 320 milliseconds. + ; Buffer length may be specified on a per-stanza and per-client basis, see below. + +password = secret_password ; password common to all clients (Main Menu Item 6 - Host Password, on RTCM/VOTER) +utos = y ; Turn on IP TOS for Ubiquiti (ToS is enable by default on the RTCM/VOTER) from the host TO the clients + +;sanity = 0 ; disable sanity checking of clients (debug use only) defaults to 1 if not specifically set to 0 +;puckit = 1 ; KLUDGE to try and fix random Garmin LVC-18 pucks that may or may not be 1 second off (defaults to 0 if not specified or set to 1) + +[1999] ; define the 1999 instance stanza +Main = secret,transmit,master ; master,transmit,adpcm,nulaw,nodeemp,noplfilter,buflen=value,gpsid[=value],prio=value + ; + ; master - this client is the Master Timing source (the RTCM client that is on the same LAN as the Asterisk server.) + ; There can only be 1 Master Timing source per ENTIRE Asterisk server. + ; + ; secret - password unique to this client + ; transmit - this client is intended to have transmit audio sent to it and will have a transmitter connected to it. + ; adpcm - this client is to be sent audio in 8000 samples/sec, 4-bit, IMA ADPCM format, rather than default G.711 Mulaw (aka ulaw). + ; nulaw - this client is to be sent audio in 4000 samples/second Mulaw (Nulaw, as we call it), rather than the standard 8000 samples/second. + ; nodeemp - this client is not to perform de-emphasis of the receiver audio (This is only to be used with non-voting clients). Switches + ; the hardware de-emphasis filter OUT on the client + ; noplfilter - this client is to not to perform hardware pl filtering of the audio. Switches the hardware PL filter OUT on the client. + ; buflen=value - receive buffer length override for this client only. + ; gpsid[=value] - This specifies a gps identity to associate with the specified client (as referred in the /etc/asterisk/gps.conf file). + ; prio=value - define a specific priority for this client when voting. Lower numbers are higher priority. Default is 0 if nothing specified. + +plfilter = y ; use DSP IIR 6 pole High pass filter, 300 Hz corner with 0.5 db ripple (note clients filter PL by default already) + +;txctcss = 100.0 ; Transmit CTCSS frequency +;txctcsslevel = 62 ; Transmit CTCSS level (default of 62 if txctcss is supplied, but txctcsslevel is not set) + ; Setting CTCSS level adds preemphasis. Assumes modulator input. +;txtoctype = phase ; Transmit tone control type: none,phase,notone + ; none - CTCSS tone encoding with no hang time (default) + ; phase - encode CTCSS and reverse phase (AKA "reverse burst") before unkeying TX + ; notone - encode CTCSS and stop sending tone before unkeying TX (AKA "chicken burst") + +;gtxgain = 3.0 ; adjust the audio gain to all transmitters (in db voltage gain) +;hostdeemp = 1 ; force the use of the DSP FIR Integrator providing de-emphasis at 8000 samples/sec. Used with Duplex Mode 3 setting in RTCM/VOTER + +thresholds = 255,110=5 ; +; linger=6 ; linger default is 6 if no other value specified +; streams = 67.215.233.178:1667 ; location to send voter data stream for this instance (used only with votemond Java program, which is deprecated) + +; isprimary = y ; used in redundant server applications only. must be set on the primary server only +; primary = 10.20.20.1:667,mypaswd ; used in redundant server applications only. must be ONLY set on the secondary server to point to the primary + +[1998] ; define another voting instance on this server (for another node). Three simulcast transmitters and four receivers. + ; NOTE: there is NO "master" in this instance, since we already have a master timing source on this server defined above + +NORTH = password_1,transmit ; transmit/receive site +SOUTH = Password_2,transmit ; transmit/receive site +EAST = password_3,nodeemp ; receive-only site, bypass de-emphasis filter in RTCM +WEST = Password_4,transmit,noplfilter ; transmit/receive site, bypass CTCSS filter in RTCM diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..6fa9095 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,10 @@ +services: + asl3_setup: + build: . + container_name: allstarlink3 + volumes: + - ./asl3:/asl3 + - ./asterisk_conf:/etc/asterisk + - ./asterisk_cust_sounds:/usr/local/share/asterisk/sounds + privileged: true + restart: unless-stopped diff --git a/fake-systemctl b/fake-systemctl new file mode 100644 index 0000000..830034f --- /dev/null +++ b/fake-systemctl @@ -0,0 +1,5 @@ +# /usr/bin/bash + +# This is to avoid problems with .postinst scripts + +exit 0