The POST v0/{accountKey}/calls/
endpoint allows you to request a call either on behalf of a specific agent or agent group. The endpoint supports a number of potential "from" and "to" selectors for future use.
Panel | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
|
...
Code Block | ||||
---|---|---|---|---|
| ||||
{
"from": {
"agentId": "5464",
"groups": [
"030"
],
"presentedCLID": "01256636451",
"consent": "OneParty"
},
"to": {
"telephoneNumber": "07970303957",
"agentId": "4567"
},
"regarding": {
"reference": "http://Test.com"
},
"application": "TestApp"
} |
...
from
agentId
. The display ID, in string format, of the agent the call will be made from. Use eitheragentID
orgroups
.groups
. The display IDs of the groups that the call will be made from. Use eithergroups
oragentId
.presentedCLID
. The CLID to present to the party being called. This number must be configured as a callback number in your VCC account. The parameter is optional.consent
. A string indicating the level of consent thefrom
party requires with regards
to
the call being recorded. The parameter is optional. Possible values are:Unknown
. Consent status is unknownOneParty
. Only one party must consent for the call to be recordedTwoParty
. Both parties must consent for the call to be recorded
to
telephoneNumber
. The telephone number, in E164 format, that the call will be made to. Use eithertelephoneNumber
oragentId
.agentId
. The display ID, in string format, of the agent the call will be made to. Use eitheragentId
ortelephoneNumber
.consent
. A string indicating the level of consent theto
party requires with regards to the call being recorded. This parameter is optional. Possible values are:Unknown
. Consent status is unknownTwoParty
. Both parties must consent for the call to be recorded
OneParty
. Only one party must consent for the call to be recorded
regarding
reference
. Wherereference
is an alphanumeric string or a valid URL with a maximum length of 2000 characters that contains an external ID of an object this call is regarding.
application
. Where application
is an alphanumeric string — up to 32 characters — specifying which application is calling the API. If integrated with Salesforce, and the feature is enabled, application
appears in the task's subject as "Outbound application
call to 02072068888"...
How does VCC use the consent parameters?
The consent
parameter provides information about how many parties on a call must provide consent for either one or both legs of the call to be recorded. Agent consent is implicit when they make the call, therefore consent for one party on the call is always given.
Whether you need to provide a value for consent
depends on who the call is being made from
and to
as described in the following table:
...
from
...
to
...
Usage
...
agentId
...
telephoneNumber
...
agentId
or groups
...
agentId
...
groups
...
telephoneNumber
...
The consent
values provided enable call recording as described in the following table:
...
Both consent
parameters are provided and are both OneParty
...
Two-sided call recording is enabled.
...
Both consent
parameters are provided and one or both are TwoParty
or Unknown
...
Agent-only call recording is enabled.
...
Neither of the consent
parameters are provided
...
Your account configuration determines how to record the call.
Make call from agent 1234 to telephone number 02072068888
...
Code Block | ||||
---|---|---|---|---|
| ||||
{ "from": { "agentId": "1234", "presentedCLID": "08008888888" }, "to": { "telephoneNumber": "02072068888" }, "regarding": { "reference": "0012400000ATTUQ" }, "application": "appName" } |
Make call from agent 1234 to telephone number 02072068888 with consent
Code Block | ||||
---|---|---|---|---|
| ||||
curl -X POST "https://***.newvoicemedia.com/v0/a1b2c3d4e5/calls/"
-d '{ "from": { "agentId": "1234", "consent": "OneParty" }, "to": { "telephoneNumber": "02072068888", "consent": "OneParty" } }'
-H "Authorization: Bearer <ACCESS_TOKEN>"
-H "Content-Type: application/json;version=6" |
Body
Code Block | ||||
---|---|---|---|---|
| ||||
{ "from": { "agentId": "1234", "consent": "OneParty" }, "to": { "telephoneNumber": "02072068888", "consent": "OneParty" } } |
Response examples
Successful calls return HTTP status code of 201, containing the following message and headers.
...
Code Block | ||||
---|---|---|---|---|
| ||||
{ "id": "017db4a2-44b5-672e-8b9f-1a805fed07ad", "links": [ { "href": "https://emea.newvoicemedia.com/V0/lmccg0ujju4/Calls/017db4a2-44b5-672e-8b9f-1a805fed07ad", "rel": "_self" } ], "from": { "presentedClid": "123456789", "agentId": "1234", "consent": "OneParty" }, "to": { "telephoneNumber": "02072068888", "consent": "OneParty" }, "regarding": { "reference": "0012400000ATTUQ" }, "status": "Active", "recordingStatus": "Stopped", "application": "ExampleAppName", "dispositionCode": null } |
...
Ccxml must be enabled for this account
: CCXML is not enabledUnable to place call - Agent number busy
: Calling agent busyUnable to place call - dialed Agent is not currently available
: Destination agent busyUnable to place call - invalid Agent Id
: Unknown destination agentUnable to place call - Agent Id is unknown
: Unknown calling agentUnable to place call - number is invalid
: Invalid number dialedUnable to place call to Agent. Please try again
: Call FailedTelephone number exceeds 30 characters
Agent Id exceeds 11 digits
Agent Id must contain digits only
Telephone number not supported in this context
Agent Id must be specified
Either telephone number or agent id required
Either telephone number or agent id required, not both
Reference exceeded 2000 characters
Reference contained invalid characters
Application exceeded 32 characters
Application contains non-alphanumeric characters
...