-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit ebd0d2b
Showing
618 changed files
with
23,045 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Tests | ||
on: [push, pull_request] | ||
|
||
env: | ||
CI: true | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14 | ||
- run: npm install | ||
- name: Lint | ||
run: npm test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*.tgz | ||
node_modules | ||
coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
*.tgz | ||
.github | ||
nyc.config.js | ||
coverage | ||
test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
package-lock=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2020 CFWare, LLC | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# @cfware/asterisk16 [![NPM Version][npm-image]][npm-url] | ||
|
||
Execute Asterisk 16 for testing | ||
|
||
[npm-image]: https://img.shields.io/npm/v/@cfware/asterisk16.svg | ||
[npm-url]: https://npmjs.org/package/@cfware/asterisk16 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#tryinclude acl.d/*.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[localhost] | ||
deny=0.0.0.0/0.0.0.0 | ||
deny=:: | ||
permit=127.0.0.1/255.0.0.0 | ||
permit=::1/128 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[general] | ||
;Default everything |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[options] | ||
verbose=3 | ||
debug=3 | ||
timestamp=yes | ||
nocolor=yes | ||
dumpcore=yes | ||
languageprefix=yes | ||
autosystemname=yes | ||
defaultlanguage=en | ||
documentation_language=en_US | ||
hideconnect=yes | ||
transmit_silence=yes | ||
refdebug=yes | ||
|
||
[files] | ||
astctl=asterisk.ctl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[general] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[general] | ||
enable=no | ||
|
||
[csv] | ||
usegmtime=yes | ||
loguniqueid=yes | ||
loguserfield=yes | ||
accountlogs=yes | ||
newcdrcolumns=yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
; | ||
; Mappings for custom config file | ||
; | ||
; To get your CSV output in a format tailored to your liking, uncomment the | ||
; following lines and look for the output in the cdr-custom directory (usually | ||
; in /var/log/asterisk). Depending on which mapping you uncomment, you may see | ||
; Master.csv, Simple.csv, or both. | ||
; | ||
;[mappings] | ||
;Master.csv => ${CSV_QUOTE(${CDR(clid)})},${CSV_QUOTE(${CDR(src)})},${CSV_QUOTE(${CDR(dst)})},${CSV_QUOTE(${CDR(dcontext)})},${CSV_QUOTE(${CDR(channel)})},${CSV_QUOTE(${CDR(dstchannel)})},${CSV_QUOTE(${CDR(lastapp)})},${CSV_QUOTE(${CDR(lastdata)})},${CSV_QUOTE(${CDR(start)})},${CSV_QUOTE(${CDR(answer)})},${CSV_QUOTE(${CDR(end)})},${CSV_QUOTE(${CDR(duration)})},${CSV_QUOTE(${CDR(billsec)})},${CSV_QUOTE(${CDR(disposition)})},${CSV_QUOTE(${CDR(amaflags)})},${CSV_QUOTE(${CDR(accountcode)})},${CSV_QUOTE(${CDR(uniqueid)})},${CSV_QUOTE(${CDR(userfield)})},${CDR(sequence)} | ||
; | ||
; High Resolution Time for billsec and duration fields | ||
;Master.csv => ${CSV_QUOTE(${CDR(clid)})},${CSV_QUOTE(${CDR(src)})},${CSV_QUOTE(${CDR(dst)})},${CSV_QUOTE(${CDR(dcontext)})},${CSV_QUOTE(${CDR(channel)})},${CSV_QUOTE(${CDR(dstchannel)})},${CSV_QUOTE(${CDR(lastapp)})},${CSV_QUOTE(${CDR(lastdata)})},${CSV_QUOTE(${CDR(start)})},${CSV_QUOTE(${CDR(answer)})},${CSV_QUOTE(${CDR(end)})},${CSV_QUOTE(${CDR(duration,f)})},${CSV_QUOTE(${CDR(billsec,f)})},${CSV_QUOTE(${CDR(disposition)})},${CSV_QUOTE(${CDR(amaflags)})},${CSV_QUOTE(${CDR(accountcode)})},${CSV_QUOTE(${CDR(uniqueid)})},${CSV_QUOTE(${CDR(userfield)})},${CDR(sequence)} | ||
;Simple.csv => ${CSV_QUOTE(${EPOCH})},${CSV_QUOTE(${CDR(src)})},${CSV_QUOTE(${CDR(dst)})} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
[general] | ||
enable=no | ||
; Application Tracking | ||
; | ||
; Use the 'apps' keyword to specify the list of applications for which you want | ||
; to receive CEL events. This is a comma separated list of Asterisk dialplan | ||
; applications, such as Dial, Queue, and Park. | ||
; | ||
; Accepted values: A comma separated list of Asterisk dialplan applications | ||
; Default value: none | ||
; | ||
; Note: You may also use 'all' which will result in CEL events being reported | ||
; for all Asterisk applications. This may affect Asterisk's performance | ||
; significantly. | ||
|
||
apps=dial,park | ||
|
||
; Event Tracking | ||
; | ||
; Use the 'events' keyword to specify the list of events which you want to be | ||
; raised when they occur. This is a comma separated list of the values in the | ||
; table below. | ||
; | ||
; Accepted values: A comma separated list of one or more of the following: | ||
; ALL -- Generate entries on all events | ||
; CHAN_START -- The time a channel was created | ||
; CHAN_END -- The time a channel was terminated | ||
; ANSWER -- The time a channel was answered (ie, phone taken off-hook) | ||
; HANGUP -- The time at which a hangup occurred | ||
; BRIDGE_ENTER -- The time a channel was connected into a conference room | ||
; BRIDGE_EXIT -- The time a channel was removed from a conference room | ||
; APP_START -- The time a tracked application was started | ||
; APP_END -- the time a tracked application ended | ||
; PARK_START -- The time a call was parked | ||
; PARK_END -- Unpark event | ||
; BLINDTRANSFER -- When a blind transfer is initiated | ||
; ATTENDEDTRANSFER -- When an attended transfer is initiated | ||
; PICKUP -- This channel picked up the specified channel | ||
; FORWARD -- This channel is being forwarded somewhere else | ||
; LINKEDID_END -- The last channel with the given linkedid is retired | ||
; USER_DEFINED -- Triggered from the dialplan, and has a name given by the | ||
; user | ||
; LOCAL_OPTIMIZE -- A local channel pair is optimizing away. | ||
; | ||
; Default value: none | ||
; (Track no events) | ||
|
||
events=APP_START,CHAN_START,CHAN_END,ANSWER,HANGUP,BRIDGE_ENTER,BRIDGE_EXIT | ||
|
||
; Date Format | ||
; | ||
; Use the 'dateformat' keyword to specify the date format used when CEL events | ||
; are raised. | ||
; | ||
; Accepted values: A strftime format string (see man strftime) | ||
; | ||
; Example: "%F %T" | ||
; -> This gives the date and time in the format "2009-06-23 17:02:35" | ||
; | ||
; If this option is not specified, the default format is "<seconds>.<microseconds>" | ||
; since epoch. The microseconds field will always be 6 digits in length, meaning it | ||
; may have leading zeros. | ||
; | ||
;dateformat = %F %T |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
; | ||
; Asterisk Channel Event Logging (CEL) - Custom CSV Backend | ||
; | ||
|
||
; This is the configuration file for the customizable CSV backend for CEL | ||
; logging. | ||
; | ||
; In order to create custom CSV logs for CEL, uncomment the template below | ||
; (Master.csv) and start Asterisk. Once CEL events are generated, a file will | ||
; appear in the following location: | ||
; | ||
; /var/log/asterisk/cel-custom/Master.csv | ||
; | ||
; (Note that /var/log/asterisk is the default and may differ on your system) | ||
; | ||
; You can also create more than one template if desired. All logs will appear | ||
; in the cel-custom directory under your Asterisk logs directory. | ||
; | ||
|
||
; | ||
; Within a mapping, use the CALLERID() and CHANNEL() functions to retrieve | ||
; details from the CEL event. There are also a few variables created by this | ||
; module that can be used in a mapping: | ||
; | ||
; eventtype - The name of the CEL event. | ||
; eventtime - The timestamp of the CEL event. | ||
; eventenum - Like eventtype but is "USER_DEFINED" for a user defined event. | ||
; userdeftype - User defined event type name from CELGenUserEvent(). | ||
; eventextra - Extra data included with this CEL event, typically along with | ||
; an event of type USER_DEFINED from CELGenUserEvent(). | ||
; BRIDGEPEER - Bridged peer channel name at the time of the CEL event. | ||
; CHANNEL(peer) could also be used. | ||
; | ||
[mappings] | ||
;Master.csv => ${CSV_QUOTE(${eventtype})},${CSV_QUOTE(${eventtime})},${CSV_QUOTE(${CALLERID(name)})},${CSV_QUOTE(${CALLERID(num)})},${CSV_QUOTE(${CALLERID(ANI)})},${CSV_QUOTE(${CALLERID(RDNIS)})},${CSV_QUOTE(${CALLERID(DNID)})},${CSV_QUOTE(${CHANNEL(exten)})},${CSV_QUOTE(${CHANNEL(context)})},${CSV_QUOTE(${CHANNEL(channame)})},${CSV_QUOTE(${CHANNEL(appname)})},${CSV_QUOTE(${CHANNEL(appdata)})},${CSV_QUOTE(${CHANNEL(amaflags)})},${CSV_QUOTE(${CHANNEL(accountcode)})},${CSV_QUOTE(${CHANNEL(uniqueid)})},${CSV_QUOTE(${CHANNEL(linkedid)})},${CSV_QUOTE(${BRIDGEPEER})},${CSV_QUOTE(${CHANNEL(userfield)})},${CSV_QUOTE(${userdeftype})},${CSV_QUOTE(${eventextra})} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[general] | ||
default_perm=permit | ||
|
||
#tryinclude cli_permissions.d/*.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,153 @@ | ||
[speex] | ||
; CBR encoding quality [0..10] | ||
; used only when vbr = false | ||
quality => 3 | ||
|
||
; codec complexity [0..10] | ||
; tradeoff between cpu/quality | ||
complexity => 2 | ||
|
||
; perceptual enhancement [true / false] | ||
; improves clarity of decoded speech | ||
enhancement => true | ||
|
||
; voice activity detection [true / false] | ||
; reduces bitrate when no voice detected, used only for CBR | ||
; (implicit in VBR/ABR) | ||
vad => true | ||
|
||
; variable bit rate [true / false] | ||
; uses bit rate proportionate to voice complexity | ||
vbr => true | ||
|
||
; available bit rate [bps, 0 = off] | ||
; encoding quality modulated to match this target bit rate | ||
; not recommended with dtx or pp_vad - may cause bandwidth spikes | ||
abr => 0 | ||
|
||
; VBR encoding quality [0-10] | ||
; floating-point values allowed | ||
vbr_quality => 4 | ||
|
||
; discontinuous transmission [true / false] | ||
; stops transmitting completely when silence is detected | ||
; pp_vad is far more effective but more CPU intensive | ||
dtx => false | ||
|
||
; preprocessor configuration | ||
; these options only affect Speex v1.1.8 or newer | ||
|
||
; enable preprocessor [true / false] | ||
; allows dsp functionality below but incurs CPU overhead | ||
preprocess => false | ||
|
||
; preproc voice activity detection [true / false] | ||
; more advanced equivalent of DTX, based on voice frequencies | ||
pp_vad => false | ||
|
||
; preproc automatic gain control [true / false] | ||
pp_agc => false | ||
pp_agc_level => 8000 | ||
|
||
; preproc denoiser [true / false] | ||
pp_denoise => false | ||
|
||
; preproc dereverb [true / false] | ||
pp_dereverb => false | ||
pp_dereverb_decay => 0.4 | ||
pp_dereverb_level => 0.3 | ||
|
||
|
||
[plc] | ||
; for all codecs which do not support native PLC | ||
; this determines whether to perform generic PLC | ||
; there is a minor performance penalty for this | ||
genericplc => true | ||
|
||
; Generate custom formats for formats requiring attributes. | ||
; After defining the custom format, the name used in defining | ||
; the format can be used throughout Asterisk in the format 'allow' | ||
; and 'disallow' options. | ||
; | ||
; Example: silk8 is a predefined custom format in this config file. | ||
; Once this config file is loaded, silk8 can be used anywhere a | ||
; peer's codec capabilities are defined. | ||
; | ||
; In sip.conf 'silk8' can be defined as a capability for a peer. | ||
; [peer1] | ||
; type=peer | ||
; host=dynamic | ||
; disallow=all | ||
; allow=silk8 ;custom codec defined in codecs.conf | ||
; | ||
; LIMITATIONS | ||
; Custom formats can only be defined at startup. Any changes to this | ||
; file made after startup will not take into effect until after Asterisk | ||
; is restarted. | ||
; | ||
|
||
; Default Custom SILK format definitions, only one custom SILK format per | ||
; sample rate is allowed. | ||
[silk8] | ||
type=silk | ||
samprate=8000 | ||
fec=true ; turn on or off encoding with forward error correction. | ||
; On recommended, off by default. | ||
packetloss_percentage=10 ; Estimated packet loss percentage in uplink direction. This | ||
; affects how much redundancy is built in when using fec. | ||
; The higher the percentage, the larger amount of bandwidth is | ||
; used. Default is 0%, 10% is recommended when fec is in use. | ||
|
||
maxbitrate=10000 ; Use the table below to make sure a useful bitrate is choosen | ||
; for maxbitrate. If not set or value is not within the bounds | ||
; of the encoder, a default value is chosen. | ||
; | ||
; sample rate | bitrate range | ||
; 8khz | 5000 - 20000 bps | ||
; 12khz | 7000 - 25000 bps | ||
; 16khz | 8000 - 30000 bps | ||
; 24khz | 20000- 40000 bps | ||
; | ||
;dtx=true ; Encode using discontinuous transmission mode or not. Turning this | ||
; on will save bandwidth during periods of silence at the cost of | ||
; increased computational complexity. Off by default. | ||
|
||
[silk12] | ||
type=silk | ||
samprate=12000 | ||
maxbitrate=12000 | ||
fec=true | ||
packetloss_percentage=10; | ||
|
||
[silk16] | ||
type=silk | ||
samprate=16000 | ||
maxbitrate=20000 | ||
fec=true | ||
packetloss_percentage=10; | ||
|
||
[silk24] | ||
type=silk | ||
samprate=24000 | ||
maxbitrate=30000 | ||
fec=true | ||
packetloss_percentage=10; | ||
|
||
|
||
; Default custom CELT codec definitions. Only one custom CELT definition is allowed | ||
; per a sample rate. | ||
;[celt44] | ||
;type=celt | ||
;samprate=44100 ; The samplerate in hz. This option is required. | ||
;framesize=480 ; The framesize option represents the duration of each frame in samples. | ||
; This must be a factor of 2. This option is only advertised in an SDP | ||
; when it is set. Otherwise a default of framesize of 480 is assumed | ||
; internally | ||
|
||
;[celt48] | ||
;type=celt | ||
;samprate=48000 | ||
|
||
;[celt32] | ||
;type=celt | ||
;samprate=32000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[general] | ||
|
||
[default_user] | ||
type=user | ||
|
||
[default_bridge] | ||
type=bridge | ||
video_mode=none | ||
|
||
[default_menu] | ||
type=menu | ||
|
||
#tryinclude confbridge.d/*.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[general] | ||
enable=yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[general] | ||
static=yes | ||
writeprotect=no | ||
|
||
[globals] | ||
|
||
#tryinclude extensions.d/*.conf |
Oops, something went wrong.