forked from MathewFrancis/cezenGIT
Music on hold
This commit is contained in:
parent
af9ea1682b
commit
065474018d
@ -8,14 +8,14 @@ RUN apk update && \
|
||||
apk add unixodbc && \
|
||||
apk add unixodbc-dev && \
|
||||
apk add mariadb-connector-odbc && \
|
||||
apk add --no-cache ffmpeg && \
|
||||
apk add --no-cache lame && \
|
||||
apk add --no-cache asterisk-mp3
|
||||
mkdir -p /etc/asterisk/moh
|
||||
|
||||
|
||||
# apk add --no-cache unixodbc unixodbc-dev mariadb-connector-odbc
|
||||
|
||||
|
||||
# Copy custom Asterisk config files
|
||||
#COPY asterisk_config/ /etc/asterisk/
|
||||
|
||||
# Start Asterisk in verbose mode
|
||||
CMD ["asterisk", "-fvvvvv"]
|
||||
CMD ["asterisk", "-fvvvvv"]
|
||||
@ -132,6 +132,9 @@ ps_endpoints => odbc,asterisk,ps_endpoints
|
||||
ps_auths => odbc,asterisk,ps_auths
|
||||
ps_aors => odbc,asterisk,ps_aors
|
||||
extensions => odbc,asterisk,extensions_table
|
||||
;moh for music on hold
|
||||
;moh => odbc,asterisk,moh_classes
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
BIN
MySQL_conf_pbx/test1/conf/asterisk/moh/holdmusic.wav
Normal file
BIN
MySQL_conf_pbx/test1/conf/asterisk/moh/holdmusic.wav
Normal file
Binary file not shown.
@ -1,7 +1,7 @@
|
||||
;
|
||||
; Music on Hold -- Sample Configuration
|
||||
;
|
||||
[general]
|
||||
;[general]
|
||||
;cachertclasses=yes ; use 1 instance of moh class for all users who are using it,
|
||||
; decrease consumable cpu cycles and memory
|
||||
; disabled by default
|
||||
@ -62,9 +62,18 @@
|
||||
; configuration. The 'sort' option is not used for this mode.
|
||||
;
|
||||
|
||||
;[default]
|
||||
;mode=files
|
||||
;directory=moh
|
||||
|
||||
[default]
|
||||
mode=files
|
||||
directory=moh
|
||||
directory=/etc/asterisk/moh
|
||||
;sort=random
|
||||
random=yes
|
||||
|
||||
|
||||
|
||||
;
|
||||
;[native-random]
|
||||
;mode=files
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
version: "3.8"
|
||||
services:
|
||||
asterisk:
|
||||
image: mathewfrancisv/odbc_mariadb:v2.0.0
|
||||
image: mathewfrancisv/odbc_mariadb:v2.0.1
|
||||
container_name: mat_asterisk
|
||||
restart: always
|
||||
tty: true
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1001-1742819424.37.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1001-1742819424.37.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1001-1742882209.0.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1001-1742882209.0.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1001-1742883465.0.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1001-1742883465.0.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1001-1742883795.18.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1001-1742883795.18.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1001-1742893923.9.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1001-1742893923.9.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1002-1742819424.37.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1002-1742819424.37.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1002-1742882209.0.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1002-1742882209.0.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1002-1742885776.6.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1002-1742885776.6.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1002-1742886171.6.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1002-1742886171.6.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1002-1742889692.0.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1002-1742889692.0.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1002-1742889766.3.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1002-1742889766.3.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1002-1742890346.0.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1002-1742890346.0.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1002-1742890648.3.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1002-1742890648.3.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1002-1742893752.3.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1002-1742893752.3.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1002-1742893818.6.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1002-1742893818.6.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1002-1742893923.9.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1002-1742893923.9.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1002-1742894086.14.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1002-1742894086.14.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1002-1742894110.17.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1002-1742894110.17.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1003-1742883531.3.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1003-1742883531.3.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1003-1742883705.6.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1003-1742883705.6.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1003-1742883707.8.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1003-1742883707.8.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1003-1742883738.11.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1003-1742883738.11.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1003-1742883764.15.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1003-1742883764.15.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1003-1742884989.0.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1003-1742884989.0.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1003-1742885735.3.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1003-1742885735.3.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1003-1742885975.0.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1003-1742885975.0.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1003-1742886055.3.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1003-1742886055.3.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1003-1742890601.0.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1003-1742890601.0.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1003-1742893639.0.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1003-1742893639.0.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1003-1742894363.20.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1003-1742894363.20.wav
Normal file
Binary file not shown.
@ -107,8 +107,44 @@ VALUES
|
||||
INSERT INTO extensions_table (context, exten, priority, app, appdata)
|
||||
VALUES
|
||||
('default', '1001', 5, 'GotoIf', '${DIALSTATUS}=NOANSWER?default,1002,1');
|
||||
|
||||
--
|
||||
|
||||
-- music on hold
|
||||
USE asterisk_db;
|
||||
|
||||
-- CREATE TABLE moh_classes (
|
||||
-- name VARCHAR(40) PRIMARY KEY,
|
||||
-- mode VARCHAR(20) NOT NULL,
|
||||
-- directory VARCHAR(255),
|
||||
-- application VARCHAR(255),
|
||||
-- digit INTEGER DEFAULT NULL,
|
||||
-- sort VARCHAR(10) DEFAULT 'random'
|
||||
-- );
|
||||
--
|
||||
-- INSERT INTO moh_classes (name, mode, directory, sort)
|
||||
-- VALUES
|
||||
-- ('default', 'files', '/etc/asterisk/moh', 'random');
|
||||
--
|
||||
-- SELECT * FROM moh_classes;
|
||||
--
|
||||
-- DROP TABLE `moh_classes`;
|
||||
|
||||
INSERT INTO extensions_table (context, exten, priority, app, appdata)
|
||||
VALUES
|
||||
('default', '1001', 20, 'MusicOnHold', 'default'),
|
||||
('default', '1002', 20, 'MusicOnHold', 'default'),
|
||||
('default', '1003', 20, 'MusicOnHold', 'default');
|
||||
|
||||
UPDATE extensions_table
|
||||
SET appdata = CONCAT(appdata, ',m(default)')
|
||||
WHERE app = 'Dial';
|
||||
|
||||
|
||||
-- music on hold end
|
||||
|
||||
|
||||
|
||||
-- update the dial plan
|
||||
UPDATE extensions_table
|
||||
SET appdata = 'PJSIP/1001,20,g'
|
||||
@ -116,6 +152,13 @@ WHERE exten = '1001' AND app = 'Dial';
|
||||
|
||||
-- g here ensures it captures the DIALSTATUS even after the call ends
|
||||
|
||||
ALTER TABLE `ps_endpoints` ADD mohsuggest VARCHAR(40);
|
||||
ALTER TABLE `ps_endpoints` ADD mailboxes VARCHAR(255);
|
||||
|
||||
UPDATE ps_endpoints SET mohsuggest = 'default';
|
||||
UPDATE ps_endpoints SET direct_media = 'no';
|
||||
SELECT * FROM `ps_endpoints`;
|
||||
|
||||
|
||||
SELECT * FROM extensions_table;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user