Skip to main content

$dialer.getRetryIntervals

The method returns the duration of pauses between call attempts. You can get the values from the call campaign settings and from the current call series.

Syntax

The method is called without arguments:

$dialer.getRetryIntervals();

Return value

{
"retryIntervalInMinutes": 30,
"campaignRetryIntervalInMinutes": 15
}

The method returns an object where:

  • retryIntervalInMinutes is the pause between attempts in the current call series that was scheduled via $dialer.redial. The field is missing if no series was scheduled.
  • campaignRetryIntervalInMinutes is the value of the Pause between calls parameter form the call campaign settings.

Both values are specified in minutes.

How to use

In this example:

  1. The bot gets a pause that is set in the current call series or in the call campaign settings.
  2. The bot schedules a new call series.
state: CallBack
q!: * call me back *
a: Okay, I will call you back later
script:
// Get an object with pauses.
var intervals = $dialer.getRetryIntervals();
if (intervals.retryIntervalInMinutes) {
// If a call series is scheduled, get the pause from it.
var currentInterval = intervals.retryIntervalInMinutes;
} else {
// In the other case, get the pause from the call campaign settings.
var currentInterval = intervals.campaignRetryIntervalInMinutes;
}
// Create a new call series.
var now = new Date();
$dialer.redial({
// Series start time = current time + the pause.
startDateTime: new Date(now.getTime() + currentInterval * 60000),
maxAttempts: 2,
// In the new series, the pause duration is doubled.
retryIntervalInMinutes: currentInterval * 2
});
$dialer.hangUp();