From e3c2418e7b38fa6f1928a23de0bd2506de5bb788 Mon Sep 17 00:00:00 2001 From: ChrisChrome Date: Tue, 18 Jun 2024 21:50:16 -0600 Subject: [PATCH] Update docs --- README.md | 73 +++++++++++++++++++++++---------------------- config.json.default | 43 +++++++++++++++++++------- 2 files changed, 70 insertions(+), 46 deletions(-) diff --git a/README.md b/README.md index 0b0c46b..58356bf 100644 --- a/README.md +++ b/README.md @@ -36,42 +36,44 @@ To set up the config file, follow the steps below: 3. Create a new file named `config.json` in the root directory of the project and fill it with the following content: ```json { - "ntfyUrl": "ntfy-url", - "freepbx": { - "server": "sip-server-ip", - "url": "pbx-api-url", - "clientid": "gql-client-id", - "allowedscopes": "gql", - "secret": "gql-secret", - "startExt": 1000 - }, - "discord": { - "token": "bot-token", - "guildId": "guild-id", - "roleId": "user-role", - "logId": "log-channel", - "extList": "extension-list-channel", - "developers": ["your-user-id"] - }, - "mariadb": { - "host": "db-hostname0here", - "user": "bot", - "password": "bot", - "database": "asterisk", - "connectionLimit": 5 - }, - "cdrdb": { - "host": "db-hostname-here", - "user": "bot", - "password": "bot", - "database": "asteriskcdrdb", - "connectionLimit": 5 - }, - "status": { - "interval": 60, - "url": "uptime-kuma-link" - } + "ntfyUrl": "ntfy-url", + "freepbx": { + "server": "sip-server-ip", + "url": "pbx-api-url", + "clientid": "gql-client-id", + "allowedscopes": "gql", + "secret": "gql-secret", + "startExt": 1000 + }, + "discord": { + "token": "bot-token", + "guildId": "guild-id", + "roleId": "user-role", + "logId": "log-channel", + "extList": "extension-list-channel", + "developers": [ + "your-user-id" + ] + }, + "mariadb": { + "host": "db-hostname0here", + "user": "bot", + "password": "bot", + "database": "asterisk", + "connectionLimit": 5 + }, + "cdrdb": { + "host": "db-hostname-here", + "user": "bot", + "password": "bot", + "database": "asteriskcdrdb", + "connectionLimit": 5 + }, + "status": { + "interval": 60, + "url": "uptime-kuma-link" } +} ``` 4. Replace the placeholders with your own values: - `ntfyUrl`: The URL of the NTFY server. @@ -86,6 +88,7 @@ To set up the config file, follow the steps below: - `extension-list-channel`: The ID of the channel where the extension list will be sent. - `your-user-id`: Your Discord user ID. - `db-hostname-here`: The hostname of the MariaDB server. + - Use `mysql -u root -p -e "CREATE USER 'bot'@'localhost' IDENTIFIED BY 'bot';"` to create a new user. Change `localhost` to the IP of the server running the bot if you aren't running the bot on the PBX server. - `uptime-kuma-link`: The URL of the Uptime Kuma instance. 5. Run the bot: ```shell diff --git a/config.json.default b/config.json.default index 76d5276..b68e578 100644 --- a/config.json.default +++ b/config.json.default @@ -1,18 +1,39 @@ { + "ntfyUrl": "ntfy-url", "freepbx": { - "server": "sip.example.com", - "url": "https://your.freepbx.instance", - "clientid": "clientid", + "server": "sip-server-ip", + "url": "pbx-api-url", + "clientid": "gql-client-id", "allowedscopes": "gql", - "secret": "secret", - "startExt" : 1000, + "secret": "gql-secret", + "startExt": 1000 }, "discord": { - "token": "discordtoken", - "guildId": "mainguild", - "roleId": "userrole", - "devId": "yourdiscordid", - "logId": "logchannel", - "extList": "extension list channel" + "token": "bot-token", + "guildId": "guild-id", + "roleId": "user-role", + "logId": "log-channel", + "extList": "extension-list-channel", + "developers": [ + "your-user-id" + ] + }, + "mariadb": { + "host": "db-hostname0here", + "user": "bot", + "password": "bot", + "database": "asterisk", + "connectionLimit": 5 + }, + "cdrdb": { + "host": "db-hostname-here", + "user": "bot", + "password": "bot", + "database": "asteriskcdrdb", + "connectionLimit": 5 + }, + "status": { + "interval": 60, + "url": "uptime-kuma-link" } } \ No newline at end of file