Sipgate-CLI/README.md

36 lines
1.3 KiB
Markdown
Raw Normal View History

2021-03-04 16:57:48 +00:00
# Sipgate CLI
This is a small hack to send faxes via the sipgate REST API from the command line.
## Deployment
2021-03-13 13:50:48 +00:00
Add your login credentials to `login_credentials_muster.sh` and rename the file to `.env`
If you use Letterheads Address database, uncomment the last line of that file and add `your/path/to/Letterhead`
2021-03-04 16:57:48 +00:00
## Usage
2021-03-04 17:59:13 +00:00
`./fax.sh <letter.pdf> <recipient>`
2021-03-04 16:57:48 +00:00
sipgate doesn't accept pdf files larger than 30 pages or 10MB.
2021-03-04 17:59:13 +00:00
2021-03-04 17:31:10 +00:00
~~For now, `<recipient>` has to be numbers-only, starting with `+49`. It is planned to parse different number formats.~~ Should be done.
2021-03-04 19:41:00 +00:00
Spaces in filename seem to make trouble at the moment - avoid them.
`status.sh` shows ID, Date and Status of the last ten fax set from this device.
2021-03-04 17:31:10 +00:00
`balance.sh` just gives your account balance.
`faxreport.sh [options] [id]` loads the report of a given fax id (as shown by status.sh). If no `id` ist given, it takes the last fax sent from this machine.
2021-03-14 11:58:34 +00:00
Options:
* `-p` to only print and not save the report
* `-d` to delete the given id from `.fax_history`
2021-03-14 10:38:08 +00:00
2021-03-04 19:25:39 +00:00
## Recommendation
Put
```
alias fax="/your/path/to/this/project/fax.sh"
alias faxstatus="/your/path/to/this/project/status.sh"
alias faxbalance="/your/path/to/this/project/balance.sh"
fax-from-handle () { fax $1 "$(/your/path/to/this/project/Letterhead/Adressen/address.sh -f $2)"; }
2021-03-04 19:25:39 +00:00
```
2021-03-04 19:26:48 +00:00
into your `.bashrc` or `.bash_aliases`
2021-03-04 19:25:39 +00:00