diff --git a/docs/reference/controller.md b/docs/reference/controller.md new file mode 100644 index 0000000..b02b1fb --- /dev/null +++ b/docs/reference/controller.md @@ -0,0 +1,58 @@ +# FieldPOC controller + +The FieldPOC controller is an interactive console to help managing the current state of the FieldPOC system. + +Connect to it via the IP address von port set in the [FieldPOC configuration](configuration.md) with `telnet`. + +## Commands + +### Help + +`help` + +Show help info. + +### Show handlers + +`handlers` + +Show currently running handlers + +### Reconfigure all components + +`sync` + +Notify all parts of FieldPOC to check configuration of connected components and update it. + +### Show queue stats + +`queues` + +### Reload configuration + +`reload` + +Read [FieldPOC configuration](configuration.md) file and apply it. + +### Bind extension to DECT device + +`claim ` + +- `ext` is the current extension number of the DECT device. +- `token` is the `dect_claim_token` of the extension that should get applied. + +This works because newly connected DECT phones get a temporary number assigned. +This temporary number is usually the current number. +But it is possible to use any extension, so the extension for a device can be changed any time. + +### Disconnect + +`exit` + +Disconnect telnet session. + +### Stop controller + +`stop` + +Shutdown the controller, but FieldPOC continues running. diff --git a/docs/reference/extensions.md b/docs/reference/extensions.md new file mode 100644 index 0000000..e02f259 --- /dev/null +++ b/docs/reference/extensions.md @@ -0,0 +1,100 @@ +# Extensions data + +`extensions.json` contains all extension a FieldPOC instance provides. + +## Example + +``` +{ + "extensions": { + "2574": { + "name": "clerie", + "type": "dect", + "trunk": false, + "dialout_allowed": true, + "dect_claim_token": "2574" + }, + "5375": { + "name": "n0emis", + "type": "callgroup", + "dialout_allowed": true, + "trunk": false, + "callgroup_members": [ + "5376", + "5377", + "5379" + ] + }, + "5376": { + "name": "n0emis SIP", + "type": "sip", + "dialout_allowed": true, + "trunk": false, + "outgoing_extension": "5375", + "sip_password": "wieK5xal" + }, + "5377": { + "name": "n0emis DECT", + "type": "dect", + "dialout_allowed": true, + "trunk": false, + "outgoing_extension": "5375", + "dect_ipei": "10345 0136625 3" + }, + "9998": { + "name": "Temporary Numbers", + "trunk": false, + "dialout_allowed": true, + "type": "temp" + }, + "9997": { + "name": "DECT Claim Extensions", + "type": "static", + "dialout_allowed": false, + "trunk": true, + "static_target": "external/nodata//run/current-system/sw/bin/dect_claim" + } + } +} + +``` + +## Extensions definition + +The key for an extension is always the number of the extension. + +Following keys are required: + +- `name`: Description of the extension. +- `type`: Type of the extension. + +## Extension types + +Based on the type of the extension more options are required. + +### SIP extension + +- `type`: `sip` +- `sip_password`: Plain text password for the SIP account. + +### DECT extension + +- `type`: `dect` +- `dect_claim_token`: Phone number part used to connect a DECT phone to this extension. +- `dect_ipei`: IPEI of the DECT phone this extension should be connected to. + +`dect_claim_token` and `dect_ipei` are mutally exclusive. + +### Static extension + +- `type`: `static` +- `static_target`: Path to script that is executed on calling this extension. + +### Temporary extension + +- `type`: `temp` + +### Callgroup extension + +- `type`: `callgroup` +- `callgroup_members`: List of extension numbers that belong to this callgroup. diff --git a/mkdocs.yml b/mkdocs.yml index 9129dc0..a41b836 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -16,3 +16,5 @@ nav: - Reference: - reference/command-line-options.md - reference/configuration.md + - reference/extensions.md + - reference/controller.md