How to connect Anywhere365 REST Recording API in Dialogue Studio

Introduction

In this guide we will be connecting to our own REST Recording API, Learn More

This can be useful for managing the recording the be PCI compliant.

 

Prerequisites

For this scenario the following point must be done first:

 

Configuration

Trigger on new active dialogue

A recording starts when an agent accepts a conversation. This start of a conversation is also a trigger we can use. For this step we will be using the InDialogue node.

Steps:

  1. Drag and drop a InDialogue node

  2. Open node

    1. Select / Configure server

    2. Filter on Audio/Video

Now we can use the output as triggers for the next steps. This node will have 2 outputs, one for the customer and the other for the customer.

 

Check if recording is active

To verify if the recording is active, we can make a HTTP request. This is done using a HTTP request node.

Steps:

  1. Drag and drop a HTTP Request node

  2. Open node

    1. Set Method to GET

    2. Use the following URL

      https://[FQDN]/attendantservice/api/recording/[UCC]/{{{session.id}}}

    3. Set Return to a parsed JSON object

  3. Connect the end of the previous node with the begin of this HTTP Request node

You will now receive the response in payload.RecordingState. If 1, than this conversation is being recorded, Learn More

 

Stop recording

If you want to stop the recording you can send a request to the REST Recording API. First we need to make a payload to send, this is done in a Function node.

Steps:

  1. Drag and drop a Function node

  2. Open node

  3. Edit function:

    msg.payload =

    {

    "Action":2,

    "RequesterSipUri":"[Agent]",

    "CorrelationId":msg.session.id,

    "UCCName":"[UCC]"

    }

    return msg;

  4. Connect end of the previous node with the begin of this Function node

 

Next we want to send the HTTP request. This is done using a HTTP request node.

Steps:

  1. Drag and drop a HTTP Request node

  2. Open node

    1. Set Method to POST

    2. Use the following URL

      Note Replace [FQDN] with the url of your server.

      https://[FQDN]/attendantservice/api/recording/set

    3. Set Return to a parsed JSON object

  3. Connect the end of the Function node with the begin of this HTTP Request node

The recording is now stopped. Optionally you can use a Say node to inform the caller and/or agent.