Voice for Dynamics exposes a JavaScript API which can be called by any custom or out-of-the-box JS plugin to carry out certain tasks. All functions within the API are asynchronous and the proper way to call is to use await statement
Enreach.API.executeQuery
Parameters:
query
(string): path within Enreach APIpostData
: Object which gets sent to Enreach API in a POST request.
Sends a request to Enreach API. Authentication is managed automatically, by adding the token to request header.
If postData
parameter is NULL then a GET request is sent, whereas any object passed here means a POST request. The object passed here is serialized as JSON in the request payload.
Detailed Enreach API documentation can be found here: https://doc.enreachvoice.com/beneapi
Enreach.API.setANumber
Parameters:
aNumber
(string): the A-number to set
Sets the A-number (the phone number the call appears to come from) before making an outbound call. This way the called party can see a meaningful caller when answering the call. In practice makes a call to Enreach API using the path /users/{userId}/features/cli/configuration/
Detailed documentation: https://doc.enreachvoice.com/beneapi#user-features
The user has to have correct settings in Enreach Cloud (among others CallAsSetting
parameter, pool membership) to be able to impersonate (use the A-number) of a certain pool.