Feedback

  • Contents
 

IS_Action_Record

Definition

This call control action provides the ability to record the current call or another call by passing in the callid of the call. When a record operation is invoked in this way, it functions like pressing the record button in a CIC client. If the user is associated with an email account, that user will receive a recording in their inbox. This action records the call specified by the callid attribute. The recording is saved as a .WAV file on the CIC Server. (See the online help file for the CIC client that you are using.) Selecting the IS_Action_Record element starts a recording session for a call; selecting the IS_Action_Record element again stops the recording session for a call. See also: IS_Action RecordPause.

All recordings associated with a call are saved in a single .WAV file. (There might be more than one recording associated with a call if the agent started and stopped the recording more than once during the call.) After the call is completed, the .WAV file can be attached to an email and sent to a CIC user, or stored in a database—see the Interaction Recorder online help for details concerning storage of recordings in a database. The current or active call of the current campaign in the queue is assumed to be the target of this action, if the callid attribute is not set.

Scripter will recognize click events from any HTML element whose name has an associated action documented in this API (e.g.: "IS_Action_CallComplete"). If the script needs to associate several buttons with the same action, then define the action using a meta element and call the click event on the meta element from the button(s).

Attributes

The IS_Action_Record element has the following attributes:

[callid]

Optional. The callid to which this action applies (e.g. "89900001"). Dialer scripts use the current Dialer callid by default. A "debug mode" error is logged for non-Dialer scripts if the callid attribute is not specified.

[callback]

The callback property ensures that this action executes asynchronously in Interaction Connect. Starting with 2018 R3, all Interaction Scripter actions (IS_Actions) provide a callback property for use in Connect scripts only. In the example below, statements inside the highlighted callback function block execute only after the action completes. The callback will return an error if the action fails. See Writing custom scripts for Interaction Connect or Scripter .NET.

Here's how to use the .callback property in a script for Interaction Connect:

function IS_Action_Record() {
  IS_Action_Record.callback = function(error) {
    if (error) {
      console.error("IS_Action_Record failed.");
    } else {
      console.log("IS_Action_Record succeeded.");
    }
  }
}

Example 1

This is an example of a "Record" button that allows the agent to record a call.

<body>
    <input type=button name="IS_Action_Record" value="Record">
</body>

Example 2

This is an example of a "Record" button that invokes the "Record" script function. The "record" script function records a call.

<head>
    <meta name="IS_Action_Record">
    <script language=javascript>
        function Record() {
            IS_Action_Record.callid = IS_Attr_CallId.value;
            IS_Action_Record.click();
        }
    </script>
</head>
<body>     <input type=button value="Record" onclick="Record();"> </body>

Example 3

<head>
    <meta name="IS_Action_Record">
    <script language="javascript">
        function IS_RecordCall(p_CallId, p_page) {
            if (p_CallId != null) {
                IS_Action_Record.callid = p_CallId;
            }
            IS_Action_Record.click();
            if (p_page != null) location.href = p_page;
        }
    </script>
</head>
<body>     <input type=button value="Record Call"   onclick="IS_RecordCall();"> </body>

Example 4

This example toggles recording on and off

<head>
    <meta name="IS_Action_Record">
    <script language="javascript">
        function RecordCall(obj) {
            if (obj.value != "Recording...") {
                obj.value = "Recording...";
                IS_Action_Record.click();
            } else {
                obj.value = "Record Call";
                IS_Action_Record.click();
            }
        }
    </script>
</head>
<body>     <input type=button id='rcrdCall' onclick="RecordCall(this);" value="Record Call"> </body>