-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathernestine.conf
More file actions
66 lines (58 loc) · 2.88 KB
/
ernestine.conf
File metadata and controls
66 lines (58 loc) · 2.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Comments simply start with a # character.
# This config file is very similar in syntax to
# Apache config files.
# These two logs are for useful data related to ernestine.
# The CallLog is basically just a one line per call log
# of the date, callerid information and target route that
# was used.
# The program log contains more detailed information about
# how the program ran and how it decided which route to use.
#
# You will need to create these files using the touch command
# And make sure they are owned by the user that asterisk runs as.
CallLog /var/log/asterisk/ernestine.call_log
ProgramLog /var/log/asterisk/ernestine.program_log
# LogLevel controls how much information is placed into the ProgramLog
# This can be NONE, FATAL, ERROR, WARN, INFO or DEBUG
# The default level is INFO
#LogLevel INFO
# RouteDefinitions are user customizeable definitions that can
# Be used in addition to the standard route names that can be
# used by ernestine. Below are some examples of what can be done.
# Each definition can point to one or more other definitions, separated by
# commas. The target routes can also be custom defined and ernestine will
# resolve the sub definitions at run time.
<RouteDefinitions>
RouteDefine SIT_TONE_IC PLAY(custom/sittone-ic),HANGUP
RouteDefine TELEMARKETING PLAY(asterisk-sounds/telemarketercalling),HANGUP
RouteDefine NOT_WELCOME PLAY(asterisk-sounds/unwelcomecall),HANGUP
RouteDefine LATE PLAY(asterisk-sounds/what-time-it-is2),HANGUP
RouteDefine WE_ARE_ON_DNC PLAY(asterisk-sounds/donotcall1),HANGUP
RouteDefine WE_ARE_CLOSED PLAY(custom/sorry-we-are-closed),GOTO(internal,999,1)
RouteDefine MYDESK GOTO(internal,202,1)
</RouteDefinitions>
# The only definitions that are pre-defined are:
# HANGUP - Does an Asterisk Hangup command
# PLAY(f) - Plays the file 'f' using the Asterisk Playback command
# GOTO(args) - Runs the Asterisk Goto command using the values you specify
# PASSTHRU - This means just exit the program and continue to the next priority
# line in the asterisk dialplan.
# Rulesets are where you tell ernestine what files to check for rules
# to match against. The files are checked and processed in the order
# defined below.
<RuleSets>
<RuleSet>
Path "/etc/asterisk/ernestine.d/telemarketernumbers.txt"
Type numberlist # Sends any number inside to default route.
DefaultRoute SIT_TONE_IC
</RuleSet>
<RuleSet>
Path "/etc/asterisk/ernestine.d/friendsnumbers.txt"
Type numberlist
DefaultRoute MYDESK # Any number matched will be routed to MYDESK route
</RuleSet> # As defined above
<RuleSet>
Path "/etc/asterisk/ernestine.d/main"
Type fullrule # This type of file has multiple columns of expressions
</RuleSet> # that can be matched against and a route target for each.
</RuleSets>