Call recording and Call Forwarding

This commit is contained in:
MathewFrancis 2025-03-24 17:15:12 +05:30
parent 6555d5452e
commit af9ea1682b
228 changed files with 218 additions and 129 deletions

View File

@ -7,11 +7,15 @@ RUN apk update && \
apk add asterisk-odbc && \
apk add unixodbc && \
apk add unixodbc-dev && \
apk add mariadb-connector-odbc
apk add mariadb-connector-odbc && \
apk add --no-cache ffmpeg && \
apk add --no-cache lame && \
apk add --no-cache asterisk-mp3
# 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"]

View File

@ -144,7 +144,7 @@ backslash_is_escape => no
enabled => yes
dsn => asterisk
username => asterisk_user
password => asterisk_pass
password => 12345
pre-connect => yes

View File

@ -32,7 +32,7 @@ CREATE TABLE ps_aors (
CREATE TABLE extensions_table (
id INT AUTO_INCREMENT PRIMARY KEY,
context VARCHAR(50) NOT NULL,
exten VARCHAR(50) NOT NULL UNIQUE,
exten VARCHAR(50) NOT NULL,
priority INT NOT NULL,
app VARCHAR(50) NOT NULL,
appdata VARCHAR(100)
@ -44,30 +44,52 @@ INSERT INTO ps_endpoints (id, transport, aors, auth, context, disallow, allow)
VALUES ('1001', 'transport-udp', '1001', '1001', 'default', 'all', 'ulaw,alaw');
INSERT INTO ps_auths (id, auth_type, username, password)
VALUES ('1001', 'userpass', '1001', 'mypassword');
VALUES ('1001', 'userpass', '1001', '12345');
INSERT INTO ps_aors (id, max_contacts)
VALUES ('1001', 1);
-- Add Authentication for 1002
INSERT INTO ps_auths (id, auth_type, username, password)
VALUES ('1002', 'userpass', '1002', 'securepass');
-- Add Endpoint for 1002
INSERT INTO ps_endpoints (id, transport, aors, auth, context, disallow, allow, direct_media)
VALUES ('1002', 'transport-udp', '1002', '1002', 'default', 'all', 'ulaw,alaw', 'no');
-- Add AOR (Address of Record) for 1002
INSERT INTO ps_auths (id, auth_type, username, password)
VALUES ('1002', 'userpass', '1002', '12345');
INSERT INTO ps_aors (id, max_contacts)
VALUES ('1002', 2);
INSERT INTO ps_endpoints (id, transport, aors, auth, context, disallow, allow, direct_media)
VALUES ('1003', 'transport-udp', '1003', '1003', 'default', 'all', 'ulaw,alaw', 'no');
INSERT INTO ps_auths (id, auth_type, username, password)
VALUES ('1003', 'userpass', '1003', '12345');
INSERT INTO ps_aors (id, max_contacts)
VALUES ('1003', 2);
INSERT INTO extensions_table (context, exten, priority, app, appdata)
VALUES
('default', '1001', 1, 'Dial', 'PJSIP/1001,20'),
('default', '1002', 1, 'Dial', 'PJSIP/1002,20');
('default', '1002', 1, 'Dial', 'PJSIP/1002,20'),
('default', '1003', 1, 'Dial', 'PJSIP/1003,20');
/*INSERT INTO extensions_table (context, exten, priority, app, appdata)
VALUES
('default', '1001', 1, 'MixMonitor', '1001-${UNIQUEID}.wav,b'),
('default', '1001', 2, 'Dial', 'PJSIP/1001,20'),
('default', '1002', 1, 'MixMonitor', '1002-${UNIQUEID}.wav,b'),
('default', '1002', 2, 'Dial', 'PJSIP/1002,20'),
('default', '1003', 1, 'MixMonitor', '1003-${UNIQUEID}.wav,b'),
('default', '1003', 2, 'Dial', 'PJSIP/1003,20');*/
UPDATE extensions_table SET appdata = CONCAT(exten, '-${UNIQUEID}.mp3,b') WHERE app = 'MixMonitor';
SELECT * FROM extensions_table;

View File

@ -11,6 +11,7 @@ services:
- ./conf/odbc.ini:/etc/odbc.ini
- ./conf/odbcinst.ini:/etc/odbcinst.ini
- ./conf/asterisk/:/etc/asterisk/
- ./recordings:/var/spool/asterisk/monitor #for call recording
network_mode: "host"
mariadb:

View File

@ -0,0 +1,17 @@
FROM andrius/asterisk:edge
# Add edge/testing repository
# RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories && \
RUN apk update && \
apk upgrade && \
apk add asterisk-odbc && \
apk add unixodbc && \
apk add unixodbc-dev && \
apk add mariadb-connector-odbc
# 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"]

Binary file not shown.

4
MySQL_conf_pbx/test1/mariadb_data/.my-healthcheck.cnf Executable file → Normal file
View File

@ -1,6 +1,6 @@
[mariadb-client]
port=3306
port=3308
socket=/run/mysqld/mysqld.sock
user=healthcheck
password=(rBY!EYLV7}0FT2u-M7.JDWk@|3h@NoM
password="|%R46oxR7&$0,PJy.X_k^saOr{W&a`T

BIN
MySQL_conf_pbx/test1/mariadb_data/aria_log.00000001 Executable file → Normal file

Binary file not shown.

BIN
MySQL_conf_pbx/test1/mariadb_data/aria_log_control Executable file → Normal file

Binary file not shown.

0
MySQL_conf_pbx/test1/mariadb_data/asterisk_db/db.opt Executable file → Normal file
View File

Binary file not shown.

Binary file not shown.

BIN
MySQL_conf_pbx/test1/mariadb_data/asterisk_db/ps_aors.frm Executable file → Normal file

Binary file not shown.

BIN
MySQL_conf_pbx/test1/mariadb_data/asterisk_db/ps_aors.ibd Executable file → Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,14 +1,22 @@
14,5
14,4
14,3
14,2
14,1
14,0
11,4
11,3
11,2
11,1
11,0
10,3
10,2
10,1
10,0
9,4
9,3
9,2
9,1
9,0
8,5
8,4
8,3
8,2
8,1
8,0
7,3
5,3
4,3

BIN
MySQL_conf_pbx/test1/mariadb_data/ib_logfile0 Executable file → Normal file

Binary file not shown.

BIN
MySQL_conf_pbx/test1/mariadb_data/ibdata1 Executable file → Normal file

Binary file not shown.

Binary file not shown.

0
MySQL_conf_pbx/test1/mariadb_data/mariadb_upgrade_info Executable file → Normal file
View File

0
MySQL_conf_pbx/test1/mariadb_data/multi-master.info Executable file → Normal file
View File

View File

BIN
MySQL_conf_pbx/test1/mariadb_data/mysql/column_stats.MAI Executable file → Normal file

Binary file not shown.

BIN
MySQL_conf_pbx/test1/mariadb_data/mysql/column_stats.frm Executable file → Normal file

Binary file not shown.

View File

BIN
MySQL_conf_pbx/test1/mariadb_data/mysql/columns_priv.MAI Executable file → Normal file

Binary file not shown.

BIN
MySQL_conf_pbx/test1/mariadb_data/mysql/columns_priv.frm Executable file → Normal file

Binary file not shown.

0
MySQL_conf_pbx/test1/mariadb_data/mysql/db.MAD Executable file → Normal file
View File

BIN
MySQL_conf_pbx/test1/mariadb_data/mysql/db.MAI Executable file → Normal file

Binary file not shown.

BIN
MySQL_conf_pbx/test1/mariadb_data/mysql/db.frm Executable file → Normal file

Binary file not shown.

0
MySQL_conf_pbx/test1/mariadb_data/mysql/db.opt Executable file → Normal file
View File

0
MySQL_conf_pbx/test1/mariadb_data/mysql/event.MAD Executable file → Normal file
View File

BIN
MySQL_conf_pbx/test1/mariadb_data/mysql/event.MAI Executable file → Normal file

Binary file not shown.

BIN
MySQL_conf_pbx/test1/mariadb_data/mysql/event.frm Executable file → Normal file

Binary file not shown.

0
MySQL_conf_pbx/test1/mariadb_data/mysql/func.MAD Executable file → Normal file
View File

BIN
MySQL_conf_pbx/test1/mariadb_data/mysql/func.MAI Executable file → Normal file

Binary file not shown.

BIN
MySQL_conf_pbx/test1/mariadb_data/mysql/func.frm Executable file → Normal file

Binary file not shown.

View File

View File

BIN
MySQL_conf_pbx/test1/mariadb_data/mysql/general_log.frm Executable file → Normal file

Binary file not shown.

BIN
MySQL_conf_pbx/test1/mariadb_data/mysql/global_priv.MAD Executable file → Normal file

Binary file not shown.

BIN
MySQL_conf_pbx/test1/mariadb_data/mysql/global_priv.MAI Executable file → Normal file

Binary file not shown.

BIN
MySQL_conf_pbx/test1/mariadb_data/mysql/global_priv.frm Executable file → Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

BIN
MySQL_conf_pbx/test1/mariadb_data/mysql/help_category.MAI Executable file → Normal file

Binary file not shown.

BIN
MySQL_conf_pbx/test1/mariadb_data/mysql/help_category.frm Executable file → Normal file

Binary file not shown.

View File

BIN
MySQL_conf_pbx/test1/mariadb_data/mysql/help_keyword.MAI Executable file → Normal file

Binary file not shown.

BIN
MySQL_conf_pbx/test1/mariadb_data/mysql/help_keyword.frm Executable file → Normal file

Binary file not shown.

View File

BIN
MySQL_conf_pbx/test1/mariadb_data/mysql/help_relation.MAI Executable file → Normal file

Binary file not shown.

BIN
MySQL_conf_pbx/test1/mariadb_data/mysql/help_relation.frm Executable file → Normal file

Binary file not shown.

0
MySQL_conf_pbx/test1/mariadb_data/mysql/help_topic.MAD Executable file → Normal file
View File

BIN
MySQL_conf_pbx/test1/mariadb_data/mysql/help_topic.MAI Executable file → Normal file

Binary file not shown.

BIN
MySQL_conf_pbx/test1/mariadb_data/mysql/help_topic.frm Executable file → Normal file

Binary file not shown.

View File

BIN
MySQL_conf_pbx/test1/mariadb_data/mysql/index_stats.MAI Executable file → Normal file

Binary file not shown.

BIN
MySQL_conf_pbx/test1/mariadb_data/mysql/index_stats.frm Executable file → Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

0
MySQL_conf_pbx/test1/mariadb_data/mysql/plugin.MAD Executable file → Normal file
View File

BIN
MySQL_conf_pbx/test1/mariadb_data/mysql/plugin.MAI Executable file → Normal file

Binary file not shown.

BIN
MySQL_conf_pbx/test1/mariadb_data/mysql/plugin.frm Executable file → Normal file

Binary file not shown.

BIN
MySQL_conf_pbx/test1/mariadb_data/mysql/proc.MAD Executable file → Normal file

Binary file not shown.

BIN
MySQL_conf_pbx/test1/mariadb_data/mysql/proc.MAI Executable file → Normal file

Binary file not shown.

BIN
MySQL_conf_pbx/test1/mariadb_data/mysql/proc.frm Executable file → Normal file

Binary file not shown.

0
MySQL_conf_pbx/test1/mariadb_data/mysql/procs_priv.MAD Executable file → Normal file
View File

BIN
MySQL_conf_pbx/test1/mariadb_data/mysql/procs_priv.MAI Executable file → Normal file

Binary file not shown.

BIN
MySQL_conf_pbx/test1/mariadb_data/mysql/procs_priv.frm Executable file → Normal file

Binary file not shown.

BIN
MySQL_conf_pbx/test1/mariadb_data/mysql/proxies_priv.MAD Executable file → Normal file

Binary file not shown.

BIN
MySQL_conf_pbx/test1/mariadb_data/mysql/proxies_priv.MAI Executable file → Normal file

Binary file not shown.

BIN
MySQL_conf_pbx/test1/mariadb_data/mysql/proxies_priv.frm Executable file → Normal file

Binary file not shown.

View File

BIN
MySQL_conf_pbx/test1/mariadb_data/mysql/roles_mapping.MAI Executable file → Normal file

Binary file not shown.

BIN
MySQL_conf_pbx/test1/mariadb_data/mysql/roles_mapping.frm Executable file → Normal file

Binary file not shown.

0
MySQL_conf_pbx/test1/mariadb_data/mysql/servers.MAD Executable file → Normal file
View File

BIN
MySQL_conf_pbx/test1/mariadb_data/mysql/servers.MAI Executable file → Normal file

Binary file not shown.

BIN
MySQL_conf_pbx/test1/mariadb_data/mysql/servers.frm Executable file → Normal file

Binary file not shown.

0
MySQL_conf_pbx/test1/mariadb_data/mysql/slow_log.CSM Executable file → Normal file
View File

0
MySQL_conf_pbx/test1/mariadb_data/mysql/slow_log.CSV Executable file → Normal file
View File

BIN
MySQL_conf_pbx/test1/mariadb_data/mysql/slow_log.frm Executable file → Normal file

Binary file not shown.

View File

BIN
MySQL_conf_pbx/test1/mariadb_data/mysql/table_stats.MAI Executable file → Normal file

Binary file not shown.

BIN
MySQL_conf_pbx/test1/mariadb_data/mysql/table_stats.frm Executable file → Normal file

Binary file not shown.

View File

BIN
MySQL_conf_pbx/test1/mariadb_data/mysql/tables_priv.MAI Executable file → Normal file

Binary file not shown.

BIN
MySQL_conf_pbx/test1/mariadb_data/mysql/tables_priv.frm Executable file → Normal file

Binary file not shown.

0
MySQL_conf_pbx/test1/mariadb_data/mysql/time_zone.MAD Executable file → Normal file
View File

BIN
MySQL_conf_pbx/test1/mariadb_data/mysql/time_zone.MAI Executable file → Normal file

Binary file not shown.

BIN
MySQL_conf_pbx/test1/mariadb_data/mysql/time_zone.frm Executable file → Normal file

Binary file not shown.

View File

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More