Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| dc761a2618 | |||
| 7744206b90 | |||
| c8b7c8603b | |||
| 764ac6b04b | |||
| 008efed094 |
@ -125,3 +125,21 @@ synopsis=Check if a specified callerid is contained in the known solicitors data
|
|||||||
writehandle=mysql1
|
writehandle=mysql1
|
||||||
readsql=SELECT location FROM presence WHERE id='${SQL_ESC(${ARG1})}'
|
readsql=SELECT location FROM presence WHERE id='${SQL_ESC(${ARG1})}'
|
||||||
writesql=UPDATE presence SET location='${SQL_ESC(${VAL1})}' WHERE id='${SQL_ESC(${ARG1})}'
|
writesql=UPDATE presence SET location='${SQL_ESC(${VAL1})}' WHERE id='${SQL_ESC(${ARG1})}'
|
||||||
|
|
||||||
|
|
||||||
|
;mat conf
|
||||||
|
[GET_DND_STATUS]
|
||||||
|
dsn=asterisk
|
||||||
|
readsql=SELECT status FROM dnd_status WHERE extension='${ARG1}'
|
||||||
|
|
||||||
|
[SET_DND_STATUS]
|
||||||
|
dsn=asterisk
|
||||||
|
writesql=INSERT INTO dnd_status (extension, status) VALUES ('${ARG1}', '${ARG2}')
|
||||||
|
ON DUPLICATE KEY UPDATE status='${ARG2}', updated_at=NOW()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
BIN
MySQL_conf_pbx/test1/mariadb_data/asterisk_db/dnd_status.frm
Normal file
BIN
MySQL_conf_pbx/test1/mariadb_data/asterisk_db/dnd_status.frm
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/mariadb_data/asterisk_db/dnd_status.ibd
Normal file
BIN
MySQL_conf_pbx/test1/mariadb_data/asterisk_db/dnd_status.ibd
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,3 +1,7 @@
|
|||||||
|
13,3
|
||||||
|
13,2
|
||||||
|
13,1
|
||||||
|
13,0
|
||||||
11,3
|
11,3
|
||||||
11,2
|
11,2
|
||||||
11,1
|
11,1
|
||||||
|
|||||||
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-1743156639.12.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1001-1743156639.12.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1001-1743156696.16.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1001-1743156696.16.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1001-1743156742.25.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1001-1743156742.25.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1001-1743162426.2.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1001-1743162426.2.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1001-1743162432.3.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1001-1743162432.3.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1001-1743162453.8.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1001-1743162453.8.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1001-1743162475.13.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1001-1743162475.13.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1001-1743162493.18.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1001-1743162493.18.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1001-1743162949.21.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1001-1743162949.21.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1001-1743162975.28.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1001-1743162975.28.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1001-1743162994.35.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1001-1743162994.35.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1001-1743163028.40.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1001-1743163028.40.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1001-1743163050.45.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1001-1743163050.45.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1001-1743163068.48.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1001-1743163068.48.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1001-1743163114.0.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1001-1743163114.0.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1001-1743163143.5.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1001-1743163143.5.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1001-1743163160.10.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1001-1743163160.10.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1001-1743163179.15.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1001-1743163179.15.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1001-1743163544.19.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1001-1743163544.19.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1001-1743164007.22.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1001-1743164007.22.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1001-1743164037.27.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1001-1743164037.27.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1001-1743165283.37.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1001-1743165283.37.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1001-1743165295.40.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1001-1743165295.40.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1001-1743165320.47.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1001-1743165320.47.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1001-1743165573.52.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1001-1743165573.52.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1002-1743156639.12.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1002-1743156639.12.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1002-1743156696.16.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1002-1743156696.16.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1002-1743156742.25.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1002-1743156742.25.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1002-1743162426.2.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1002-1743162426.2.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1002-1743162432.3.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1002-1743162432.3.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1002-1743162453.8.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1002-1743162453.8.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1002-1743162475.13.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1002-1743162475.13.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1002-1743162493.18.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1002-1743162493.18.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1002-1743162949.21.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1002-1743162949.21.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1002-1743162975.28.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1002-1743162975.28.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1002-1743163068.48.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1002-1743163068.48.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1002-1743164037.27.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1002-1743164037.27.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1002-1743165278.34.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1002-1743165278.34.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1002-1743165295.40.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1002-1743165295.40.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1002-1743165573.52.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1002-1743165573.52.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1003-1743156619.10.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1003-1743156619.10.wav
Normal file
Binary file not shown.
BIN
MySQL_conf_pbx/test1/recordings/1003-1743163538.18.wav
Normal file
BIN
MySQL_conf_pbx/test1/recordings/1003-1743163538.18.wav
Normal file
Binary file not shown.
@ -38,6 +38,7 @@ CREATE TABLE extensions_table (
|
|||||||
appdata VARCHAR(100)
|
appdata VARCHAR(100)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
ALTER TABLE extensions_table MODIFY appdata VARCHAR(200);
|
||||||
|
|
||||||
|
|
||||||
INSERT INTO ps_endpoints (id, transport, aors, auth, context, disallow, allow)
|
INSERT INTO ps_endpoints (id, transport, aors, auth, context, disallow, allow)
|
||||||
@ -144,28 +145,47 @@ WHERE app = 'Dial';
|
|||||||
-- music on hold end
|
-- music on hold end
|
||||||
|
|
||||||
|
|
||||||
|
-- DND
|
||||||
|
|
||||||
-- update the dial plan
|
CREATE TABLE IF NOT EXISTS dnd_status (
|
||||||
UPDATE extensions_table
|
extension VARCHAR(10) PRIMARY KEY,
|
||||||
SET appdata = 'PJSIP/1001,20,g'
|
status ENUM('ON', 'OFF') NOT NULL,
|
||||||
WHERE exten = '1001' AND app = 'Dial';
|
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
|
||||||
|
);
|
||||||
|
|
||||||
-- g here ensures it captures the DIALSTATUS even after the call ends
|
-- Enable DND (*78)
|
||||||
|
INSERT INTO extensions_table (context, exten, priority, app, appdata)
|
||||||
|
VALUES
|
||||||
|
('default', '*78', 1, 'Set', 'RESULT=${ODBC_SQL(${CALLERID(num)}, ON)}'),
|
||||||
|
-- ('default', '*78', 2, 'Playback', 'dnd-activated'),
|
||||||
|
('default', '*78', 3, 'Hangup', '');
|
||||||
|
|
||||||
ALTER TABLE `ps_endpoints` ADD mohsuggest VARCHAR(40);
|
-- Disable DND (*79)
|
||||||
ALTER TABLE `ps_endpoints` ADD mailboxes VARCHAR(255);
|
INSERT INTO extensions_table (context, exten, priority, app, appdata)
|
||||||
|
VALUES
|
||||||
|
('default', '*79', 1, 'Set', 'RESULT=${ODBC_SQL(${CALLERID(num)}, OFF)}'),
|
||||||
|
-- ('default', '*79', 2, 'Playback', 'dnd-deactivated'),
|
||||||
|
('default', '*79', 3, 'Hangup', '');
|
||||||
|
|
||||||
UPDATE ps_endpoints SET mohsuggest = 'default';
|
-- Enable DND (*78)
|
||||||
UPDATE ps_endpoints SET direct_media = 'no';
|
INSERT INTO extensions_table (context, exten, priority, app, appdata)
|
||||||
SELECT * FROM `ps_endpoints`;
|
VALUES ('default', '*78', 1, 'System', 'mysql -uasterisk_user -p12345 -h127.0.0.1 -P3308 -e "INSERT INTO asterisk_db.dnd_status (extension, status) VALUES (\'${CALLERID(num)}\', \'ON\') ON DUPLICATE KEY UPDATE status=\'ON\', updated_at=NOW();"'),
|
||||||
|
('default', '*78', 2, 'Playback', 'dnd-activated'),
|
||||||
|
('default', '*78', 3, 'Hangup', NULL);
|
||||||
|
|
||||||
|
-- Disable DND (*79)
|
||||||
|
INSERT INTO extensions_table (context, exten, priority, app, appdata)
|
||||||
|
VALUES ('default', '*79', 1, 'System', 'mysql -uasterisk_user -p12345 -h127.0.0.1 -P3308 -e "INSERT INTO asterisk_db.dnd_status (extension, status) VALUES (\'${CALLERID(num)}\', \'OFF\') ON DUPLICATE KEY UPDATE status=\'OFF\', updated_at=NOW();"'),
|
||||||
|
('default', '*79', 2, 'Playback', 'dnd-deactivated'),
|
||||||
|
('default', '*79', 3, 'Hangup', NULL);
|
||||||
|
|
||||||
|
|
||||||
SELECT * FROM extensions_table;
|
SELECT * FROM `extensions_table`;
|
||||||
|
|
||||||
-- DROP TABLE `extensions_table`;
|
DELETE FROM `extensions_table` WHERE exten = '*78' OR exten = '*79';
|
||||||
|
|
||||||
|
-- end of DND
|
||||||
|
|
||||||
SELECT * FROM extensions_table WHERE context='default';
|
|
||||||
|
|
||||||
|
|
||||||
SHOW TABLES;
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user