Update docs

This commit is contained in:
Christopher Cookman 2024-06-18 21:50:16 -06:00
parent 8c4fd8362a
commit e3c2418e7b
Signed by: ChrisChrome
GPG key ID: A023A26E42C33A42
2 changed files with 70 additions and 46 deletions

View file

@ -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: 3. Create a new file named `config.json` in the root directory of the project and fill it with the following content:
```json ```json
{ {
"ntfyUrl": "ntfy-url", "ntfyUrl": "ntfy-url",
"freepbx": { "freepbx": {
"server": "sip-server-ip", "server": "sip-server-ip",
"url": "pbx-api-url", "url": "pbx-api-url",
"clientid": "gql-client-id", "clientid": "gql-client-id",
"allowedscopes": "gql", "allowedscopes": "gql",
"secret": "gql-secret", "secret": "gql-secret",
"startExt": 1000 "startExt": 1000
}, },
"discord": { "discord": {
"token": "bot-token", "token": "bot-token",
"guildId": "guild-id", "guildId": "guild-id",
"roleId": "user-role", "roleId": "user-role",
"logId": "log-channel", "logId": "log-channel",
"extList": "extension-list-channel", "extList": "extension-list-channel",
"developers": ["your-user-id"] "developers": [
}, "your-user-id"
"mariadb": { ]
"host": "db-hostname0here", },
"user": "bot", "mariadb": {
"password": "bot", "host": "db-hostname0here",
"database": "asterisk", "user": "bot",
"connectionLimit": 5 "password": "bot",
}, "database": "asterisk",
"cdrdb": { "connectionLimit": 5
"host": "db-hostname-here", },
"user": "bot", "cdrdb": {
"password": "bot", "host": "db-hostname-here",
"database": "asteriskcdrdb", "user": "bot",
"connectionLimit": 5 "password": "bot",
}, "database": "asteriskcdrdb",
"status": { "connectionLimit": 5
"interval": 60, },
"url": "uptime-kuma-link" "status": {
} "interval": 60,
"url": "uptime-kuma-link"
} }
}
``` ```
4. Replace the placeholders with your own values: 4. Replace the placeholders with your own values:
- `ntfyUrl`: The URL of the NTFY server. - `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. - `extension-list-channel`: The ID of the channel where the extension list will be sent.
- `your-user-id`: Your Discord user ID. - `your-user-id`: Your Discord user ID.
- `db-hostname-here`: The hostname of the MariaDB server. - `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. - `uptime-kuma-link`: The URL of the Uptime Kuma instance.
5. Run the bot: 5. Run the bot:
```shell ```shell

View file

@ -1,18 +1,39 @@
{ {
"ntfyUrl": "ntfy-url",
"freepbx": { "freepbx": {
"server": "sip.example.com", "server": "sip-server-ip",
"url": "https://your.freepbx.instance", "url": "pbx-api-url",
"clientid": "clientid", "clientid": "gql-client-id",
"allowedscopes": "gql", "allowedscopes": "gql",
"secret": "secret", "secret": "gql-secret",
"startExt" : 1000, "startExt": 1000
}, },
"discord": { "discord": {
"token": "discordtoken", "token": "bot-token",
"guildId": "mainguild", "guildId": "guild-id",
"roleId": "userrole", "roleId": "user-role",
"devId": "yourdiscordid", "logId": "log-channel",
"logId": "logchannel", "extList": "extension-list-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"
} }
} }