Update User Terminal authored by Jan Janak's avatar Jan Janak
......@@ -200,8 +200,25 @@ curl http://<hostname>:<port>/api/settings/default
"rx_error" : null
}
```
To apply the default settings, send a HTTP DELETE request to `/api/settings`:
To obtain the supported values for selected settings, send a GET to `/api/settings/supported`:
```sh
curl -X DELETE http://<hostname>:<port>/api/settings
curl http://<hostname>:<port>/api/settings/supported
```
```json
{
"codec" : {
"values" : {
"L16" : ["l16" , "l16" , 10, 60],
"G.711" : ["g711" , "g711" , 10, 60],
"GSM" : ["gsm" , "gsm" , 20, 20],
"AMR" : ["amr" , "amr" , 20, 20],
"Opus" : ["opus" , "opus" , 10, 60],
"CODEC2" : ["codec2", "codec2", 20, 20],
"P.25 Phase 1" : ["p25p1" , "ambe" , 20, 20, { "ambe_rate" : "0x0558,0x086b,0x1030,0x0000,0x0000,0x0190" }],
"P.25 Phase 2" : ["p25p2" , "ambe" , 20, 20, { "ambe_rate": 33 }]
}
}
}
```
The terminal will return new settings in a 200 OK response.
\ No newline at end of file
At the moment, the API provides supported values only for the settings `codec` and `packet_time`. The first value in each array represents one supported value for the setting 'codec'. The last two numbers represent the minimum and maximum value for the setting 'packet_time' that can be used when the particular codec is selected.
\ No newline at end of file