Tomàtic comes with many command line tools.
Most of them come with a proper command line help (--help
),
but it is hard which is the one you need to use.
This page includes a descriptive listing of such scripts. Follows usage example for some of them.
- Full list of CLI tools
- Starting the web and API server
- Updating Asterisk extensions
- Controlling Asterisk real-time queue
Thats the full list of CLI tools.
Most of them have their own --help
to know how to use them:
tomatic_api.py
: Launches the web and API.tomatic_says.py
: Impersonates Tomatic on hangouts.
tomatic_callinfo.py
: Retrieves client info by several criteriacreate_atc_case.py
: Uploads daily CRM cases to the ERP
tomatic_rtqueue.py
: Controls the agents currently receiving callstomatic_extensions.py
: Controls agent's extensionstomatic_calls.py
: Retrieves call stats from the PBX (not supported by current areavoip pbx)areavoip_dailyreport.py
: Generates the daily call report (from areavoip PBX)areavoip_callapi.py
: Calls from CLI arbitrary operation of the areavoip PBX API
tomatic_busy.py
: Ops with people's availability (to spot critical days and so on)tomatic_retrieve.py
: Call different data retrievals by CLI (holidays, leaves, persons, idealshifts...)tomatic_mergeshifts.py
: Merge operations with shift load files (dicts person to number)tomatic_resetshiftcredit.sh
: Clears the debts and credits of shiftstomatic_shiftload.py
: Computes person's shift load for the week. Prior step to compute a timetable.tomatic_scheduler.py
: Computes timetables.tomatic_uploadtimetable.py
: Uploads timetables to the API.
runhere
: Wrapper to simplify script usage from crontab and scriptlauncher. Sets the cwd and the virtual env.scriptlauncher.yaml
: Scriptlauncher configuration to add Tomatic related scripts.crontab
: crontab file to be linked to /etc/cron.d/, see Setting up cron taskscrontab-dailyreport.sh
: Sends the dailyreport at the end of the daycrontab-warnturn.sh
: Warns operators for the next turn
To run the fake version to develop:
$ tomatic_api.py --debug --fake
# In a different terminal, for the ui
npm run start
To run the version acting on asterisk:
$ tomatic_api.py
Use --help
to see other options.
Notice: Now, this can be launched from the web user interface.
Previously to generate the timetable you must generate the shiftload
tomatic_shiftload.py 7
To compute the timetable for the next week:
$ tomatic_scheduler.py
To skip the downloading of the data from google drive:
$ tomatic_scheduler.py --keep
See bellow how to grant access to the script.
Tomatic can load all persons extension numbers from its configuration to Asterisk. Be careful, those changes might cut ongoing communications. A cron task performs it weekly every friday afternoon when all communications are over. You can force it yourself by running:
$ ./tomatic_extension.py load
To see which extensions are configured
$ ./tomatic_extension.py show
Normally this is operated from the crontab and from the Tomatic's user interface. But you can also use this script from the server to perform several non-anticipated operations.
To load the current answering queue acording to the schedule
$ ./tomatic_rtqueue.py set
To load the queue of a different time (for testing purposes):
$ ./tomatic_rtqueue.py set -d 2018-12-26 -t 10:23
To see the current queue (besides Tomatic web interface)
$ ./tomatic_rtqueue.py show
The script offer other commands to add users, pause and resume them and clear the queue. Feel free to read the help:
$ ./tomatic_rtqueue.py --help