Debian Codegraph @

configs/samples/musiconhold.conf.sample

raw
1 ;
2 ; Music on Hold -- Sample Configuration
3 ;
4 [general]
5 ;cachertclasses=yes ; use 1 instance of moh class for all users who are using it,
6 ; decrease consumable cpu cycles and memory
7 ; disabled by default
8
9 ;preferchannelclass=yes ; Prefer the musicclass as defined by CHANNEL(musicclass),
10 ; over a class set by an application (e.g. a musicclass set on a queue).
11 ; Defaults to yes.
12
13 ; valid mode options:
14 ; files -- read files from a directory in any Asterisk supported
15 ; media format
16 ; playlist -- provide a fixed list of filenames or HTTP(S) URLs to play
17 ; quietmp3 -- default
18 ; mp3 -- loud
19 ; mp3nb -- unbuffered
20 ; quietmp3nb -- quiet unbuffered
21 ; custom -- run a custom application (See examples below)
22
23 ; =========
24 ; File-based (native) music on hold
25 ; =========
26 ;
27 ; This plays files directly from the specified directory, no external
28 ; processes are required. Files are played in normal sorting order
29 ; (same as a sorted directory listing), and no volume or other
30 ; sound adjustments are available. If the file is available in
31 ; the same format as the channel's codec, then it will be played
32 ; without transcoding (same as Playback would do in the dialplan).
33 ; Files can be present in as many formats as you wish, and the
34 ; 'best' format will be chosen at playback time.
35 ;
36 ; The path specified can be either an absolute path (starts with '/'),
37 ; or a relative path; relative paths are interpreted as being relative
38 ; to the 'astdatalibdir' in asterisk.conf, which defaults to
39 ; /var/lib/asterisk.
40 ;
41 ; NOTE:
42 ; If you are not using "autoload" in modules.conf, then you
43 ; must ensure that the format modules for any formats you wish
44 ; to use are loaded _before_ res_musiconhold. If you do not do
45 ; this, res_musiconhold will skip the files it is not able to
46 ; understand when it loads.
47 ;
48 ; =========
49 ; Playlist (native) music on hold
50 ; =========
51 ;
52 ; This mode is similar to 'files' mode in that it plays through a list
53 ; of files, but instead of scanning a directory the files are
54 ; explicitly configured using one or more 'entry' options.
55 ;
56 ; Each entry must be one of:
57 ;
58 ; * An absolute path to the file to be played, without an extension.
59 ; * An HTTP(S) URL
60 ;
61 ; The entries are played in the order in which they appear in the
62 ; configuration. The 'sort' option is not used for this mode.
63 ;
64
65 [default]
66 mode=files
67 directory=moh
68 ;
69 ;[native-random]
70 ;mode=files
71 ;directory=moh
72 ;digit=# ; If this option is set for a class, then when callers are
73 ; ; listening to music on hold, they can press this digit, and
74 ; ; they will switch to listening to this music class.
75 ;announcement=queue-thankyou ;If this option is set for a class, then
76 ; ; when callers get put on hold, the specified sound will be
77 ; ; be played to them. Also, if using modes that Asterisk
78 ; ; controls the playlist for (files, mp3, etc), the same
79 ; ; sound will also be played between MOH songs.
80 ;sort=random ; Sort the files in random order. Other sort options are:
81 ; ; 'alpha' and 'randstart'. If 'alpha', the files are sorted
82 ; ; in alphabetical order. If 'randstart', the files are sorted
83 ; ; in alphabetical order as well, but the first file is chosen
84 ; ; at random. If unspecified, the sort order is undefined.
85 ;loop_last=no ; If enabled, once the end of the directory is reached,
86 ; the last file played will be looped perpetually, rather than
87 ; starting over at the beginning again.
88 ; Can be used with sort=alpha or randstart so you can control
89 ; which file gets looped (the last one sorted alphabetically).
90 ; (If sort=alpha, all files will be played at least once, but
91 ; this may not be true with sort=randstart.)
92 ; Default is no.
93 ;answeredonly=yes ; Only allow answered channels to have music on hold.
94 ; Enabling this will prevent MOH on unanswered channels.
95 ; (default: "no")
96
97 ;[native-alphabetical]
98 ;mode=files
99 ;directory=moh
100 ;sort=alpha ; Sort the files in alphabetical order.
101
102 ;[sales-queue-hold]
103 ;mode=playlist
104 ;entry=/var/lib/asterisk/sounds/en/yourcallisimportant
105 ;entry=http://example.local/sales-queue-hold-music.ulaw
106 ;entry=/var/lib/asterisk/moh/macroform-robot_dity
107
108 ; =========
109 ; Other (non-native) playback methods
110 ; =========
111
112 ;[manual]
113 ;mode=custom
114 ; Note that with mode=custom, a directory is not required, such as when reading
115 ; from a stream.
116 ;directory=/var/lib/asterisk/mohmp3
117 ;application=/usr/bin/mpg123 -q -r 8000 -f 8192 -b 2048 --mono -s
118
119 ;[ulawstream]
120 ;mode=custom
121 ;application=/usr/bin/streamplayer 192.168.100.52 888
122 ;format=ulaw ; The 'format' option specifies the audio format that the
123 ; ; 'application' will provide to Asterisk. In this example,
124 ; ; streamplayer will output ulaw samples so we need to set the
125 ; ; format to ulaw so that Asterisk knows how to interpret the
126 ; ; incoming audio.
127
128 ; mpg123 on Solaris does not always exit properly; madplay may be a better
129 ; choice
130 ;[solaris]
131 ;mode=custom
132 ;directory=/var/lib/asterisk/mohmp3
133 ;application=/site/sw/bin/madplay -Q -o raw:- --mono -R 8000 -a -12
134
135 ; By default, when res_musiconhold reloads or unloads, it sends a HUP signal
136 ; to custom applications (and all descendants), waits 100ms, then sends a
137 ; TERM signal, waits 100ms, then finally sends a KILL signal. An application
138 ; which is interacting with an external device and/or spawns children of its
139 ; own may not be able to exit cleanly in the default times, expecially if sent
140 ; a KILL signal, or if it's children are getting signals directly from
141 ; res_musiconhoild. To allow extra time, the 'kill_escalation_delay'
142 ; class option can be used to set the number of milliseconds res_musiconhold
143 ; waits before escalating kill signals, with the default being the current
144 ; 100ms. To control to whom the signals are sent, the "kill_method"
145 ; class option can be set to "process_group" (the default, existing behavior),
146 ; which sends signals to the application and its descendants directly, or
147 ; "process" which sends signals only to the application itself.
148
149 ;[sox_from_device]
150 ;mode=custom
151 ;directory=/var/lib/asterisk/mohmp3
152 ;application=/usr/bin/sox -q -t alsa -c 2 -r 48000 hw:1 -c 1 -r 8000 -t raw -s -
153 ; Wait 500ms before escalating kill signals
154 ;kill_escalation_delay=500
155 ; Send signals to just the child process instead of all descendants
156 ;kill_method=process