From ea7678b5246993d857ea3b75ecda02f20c3ab2e0 Mon Sep 17 00:00:00 2001 From: MathewFrancis Date: Thu, 24 Apr 2025 14:33:23 +0530 Subject: [PATCH] three_users sql update --- .../test1/db_asterisk/three_users.sql | 113 ++++++++++++++++++ 1 file changed, 113 insertions(+) diff --git a/MySQL_conf_pbx/test1/db_asterisk/three_users.sql b/MySQL_conf_pbx/test1/db_asterisk/three_users.sql index c82b0e1..e0e7e92 100644 --- a/MySQL_conf_pbx/test1/db_asterisk/three_users.sql +++ b/MySQL_conf_pbx/test1/db_asterisk/three_users.sql @@ -170,3 +170,116 @@ SELECT * FROM extensions_table WHERE context='default'; SHOW TABLES; # + +-- ------------ call conferencing start ---------------------------------------------- + +-- Static Conference Setup +INSERT INTO extensions_table (id, context, exten, priority, app, appdata) VALUES +(1, 'default', '100', 1, 'Answer', ''), +(2, 'default', '100', 2, 'ConfBridge', '100'), +(3, 'default', '100', 3, 'Hangup', ''); + +-- Pre-Bridge Subroutine +INSERT INTO extensions_table (id, context, exten, priority, app, appdata) VALUES +(91, 'prebridge', 's', 1, 'NoOp', '*** Pre-Bridge Subroutine ***'), +(92, 'prebridge', 's', 2, 'Set', 'SHARED(lastcaller)=${CALLERCHAN}'), +(93, 'prebridge', 's', 3, 'Set', 'SHARED(lastcallee)=${EXTEN}'), +(94, 'prebridge', 's', 4, 'Return', ''); + +-- Transfer to ConfBridge Logic +INSERT INTO extensions_table (id, context, exten, priority, app, appdata) VALUES +(95, 'transfer-to-conf', 's', 1, 'NoOp', '*** Transferring to ConfBridge ***'), +(96, 'transfer-to-conf', 's', 2, 'Set', 'CONFROOM=9000'), +(97, 'transfer-to-conf', 's', 3, 'Originate', 'Local/9100@default,,exten,default,9100,1'), +(98, 'transfer-to-conf', 's', 4, 'Originate', 'Local/9100@default,,exten,default,9100,1'), +(99, 'transfer-to-conf', 's', 5, 'Wait', '5'), +(100, 'transfer-to-conf', 's', 6, 'Return', ''); + +-- Add Third User Logic +INSERT INTO extensions_table (id, context, exten, priority, app, appdata) VALUES +(101, 'add-third-user', 's', 1, 'NoOp', '*** Adding 3rd User to Conference ***'), +(102, 'add-third-user', 's', 2, 'Read', 'THIRDPARTY,please-enter-extension,4'), +(103, 'add-third-user', 's', 3, 'NoOp', 'Inviting ${THIRDPARTY} to join conf'), +(104, 'add-third-user', 's', 4, 'Originate', 'PJSIP/${THIRDPARTY},,exten,default,9100,1'), +(105, 'add-third-user', 's', 5, 'Return', ''); + +-- ConfBridge Join Point (Room 9000) +INSERT INTO extensions_table (id, context, exten, priority, app, appdata) VALUES +(106, 'default', '9100', 1, 'NoOp', '*** Joining ConfBridge Room 9000 ***'), +(107, 'default', '9100', 2, 'ConfBridge', '9000'), +(108, 'default', '9100', 3, 'Hangup', ''); + + +-- Dynamic Dialplan for All 1XXX Extensions (Voicemail) -- +INSERT INTO extensions_table (id, context, exten, priority, app, appdata) VALUES +(135, 'default', '_1XXX', 1, 'NoOp', 'Calling dynamic extension ${EXTEN}'), +(136, 'default', '_1XXX', 2, 'Dial', 'PJSIP/${EXTEN},20'), +(137, 'default', '_1XXX', 3, 'VoiceMail', '${EXTEN}@default,u'); + + + +-- The above contains content for potential dynamic conferencing as well for future use -- + +--------- call conferencing end ------------------------------------------------------------- + + +--------- queue members --------------------------------- + +CREATE TABLE queue_members ( + id INT PRIMARY KEY, + queue_id INT, + interface VARCHAR(255), + penalty INT DEFAULT 0, + member_name VARCHAR(255), + state_interface VARCHAR(255), + queue_name VARCHAR(255), + uniqueid VARCHAR(20) +); + + +INSERT INTO queue_members (id, queue_id, interface, penalty, member_name, state_interface, queue_name, uniqueid) VALUES +(1, 1, 'PJSIP/1001', 0, 'Agent 1001', 'Agent:1001', 'waiting-queue', '001'), +(2, 2, 'PJSIP/1002', 0, 'Agent 1002', 'Agent:1002', 'waiting-queue', '002'), +(3, 3, 'PJSIP/1003', 0, 'Agent 1003', 'Agent:1003', 'waiting-queue', '003'); + + +------------ queue members end ----------------------- + +------------- queues --------------------------------- + +CREATE TABLE queues ( + name VARCHAR(100) PRIMARY KEY, + music_class VARCHAR(100), + strategy VARCHAR(50), + timeout INT, + retry INT, + wrapup_time INT, + max_len INT, + announce_frequency INT +); + +INSERT INTO queues (name, music_class, strategy, timeout, retry, wrapup_time, max_len, announce_frequency) VALUES +('waiting-queue', 'default', 'ringall', 15, 5, 10, 0, 0); + + + +-------------queues end --------------------------------------- + +-------------voicemail users ---------------------------------- + +CREATE TABLE voicemail_users ( + context VARCHAR(50), + mailbox VARCHAR(10) PRIMARY KEY, + password VARCHAR(20), + fullname VARCHAR(100), + email VARCHAR(100) +); + +INSERT INTO voicemail_users (context, mailbox, password, fullname, email) VALUES +('default', '1001', '1234', 'User One', 'djangod56@gmail.com'), +('default', '1002', '1234', 'User Two', 'djangod56@gmail.com'), +('default', '1003', '1234', 'User Three', 'djangod56@gmail.com'); + + +--------------- voicemail users end ------------------------------------------------ +