User Tools

Site Tools


api:pbx:recordingconsent:create

API : PBX : Recording Consent Create

Introduction

A recording consent item handles getting the callers consent to record the call.

The consent is stored into the call variable consent as 1 for consent or 0 for rejected.

If PBX settings says consent is not required, this just continues without doing anything.

If a previous consent has already been given and it is still valid - this just sets the call variable consent to 1 and continous.

When recording the prompt take into account that the keys a caller can press is 1 and 0 or 1, 2 and 0 - according to PBX settings.

Request

This request will create a recording consent. All properties are optional except for customer and name.

URL https://api.telecomx.dk/pbx/recordingconsent
Method POST
Access level MANAGER or OWNER if user belongs to the customer.
RESELLER if customer belongs to the reseller.
RESELLER_ADMIN.
ADMIN.
Body customer Id Id of the customer the recording consent belongs to.
name String Name/description of the recording consent.
number String The phone number to dial to reach this recording consent locally, null if it is not dial-able.
startAudio Id A PBX audio item to playback when the recording consent is entered. It is an override for the default in PBX settings, or the system default. Null if not used.
redirect String Number to redirect to when execution starts. Used to quickly circumvent the recording consent item.
notes String Notes about the recording consent item.
consentGivenMessage Id A PBX audio item to playback after the caller has given consent. Overrides PBX settings default and system default. Null if not used.
consentRejectedMessage Id A PBX audio item to playback after the caller has rejected consent. Overrides PBX settings default and system default. Null if not used.
goto Id Dialplan item to goto when done.
x Number X position in visual dialplan.
y Number Y position in visual dialplan.

Request body example

{
  customer: '12345678901234567890ABCD',
  name: 'Spørg om der må optages',
  number: '666',
  startAudio: '12345687901234567890AAAA',
  redirect: '',
  notes: '',
  consentGivenMessage: '12345678901234567890BBBB',
  consentRejectedMessage: '1234568790123456780CCCC',
  x: 123,
  y: 456
}

Response

JSON object
Property Type Description
_id Id Unique id of the recording consent.
type String Always 'RECORDING_CONSENT'.
customer Id Id of the customer the recording consent belongs to.
name String Name/description of the recording consent.
number String The phone number to dial to reach this recording consent locally, null if it is not dial-able.
startAudio Id A PBX audio item to playback when the recording consent is entered. It is an override for the default in PBX settings, or the system default. Null if not used.
redirect String Number to redirect to when execution starts. Used to quickly circumvent the recording consent item.
notes String Notes about the recording consent item.
consentGivenMessage Id A PBX audio item to playback after the caller has given consent. Overrides PBX settings default and system default. Null if not used.
consentRejectedMessage Id A PBX audio item to playback after the caller has rejected consent. Overrides PBX settings default and system default. Null if not used.
goto Id Dialplan item to goto when done.
x Number X position in visual dialplan.
y Number Y position in visual dialplan.

Example

{
  _id: '12345678901234567890FEED',
  type: 'RECORDING_CONSENT',
  customer: '12345678901234567890ABCD',
  name: 'Spørg om der må optages',
  number: '666',
  startAudio: '12345687901234567890AAAA',
  redirect: '',
  notes: '',
  consentGivenMessage: '12345678901234567890BBBB',
  consentRejectedMessage: '1234568790123456780CCCC',
  x: 123,
  y: 456
}

Errors

Error code Message Description
404 customer Customer not found or not active
422 name Name must be at least 3 characters
409 number Number is in use by another dialplan item
422 number Number is invalid, only 0-9 is allowed and no public service numbers
422 redirect Redirect number is invalid, only + 0-9, # and * is allowed
404 redirect Redirect number is local but does not point to an existing dialplan item
404 startAudio Audio file not found
404 consentGivenMessage Audio file not found
404 consentRejectedMessage Audio file not found
404 goto Dialplan item not found
403 access_denied Insufficient access level
500 internal_error <Unspecified>
api/pbx/recordingconsent/create.txt · Last modified: by Per Møller

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki