@phone::waitForSilence

Some deployments have encountered an issue with Voice Devices using the SIP protocol where only a portion of the notification message is being played, or the notification is being logged as a missed call, without the connection ever completing.This issue is primarily due to the varying length of answering machine messages that xMatters needs to process. This method enables Administrators to prevent xMatters from beginning to leave the notification message until a certain amount of silence has been detected.

Note: This method is provided for SIP Devices only, on xMatters 4.0 (patch 008 and later) and xMatters 4.1.

Syntax:

@phone::waitForSilence(int maxSilence[, int maxTimeout])

Parameters:

The parameters specify the maximum amount of time, in milliseconds, to wait for a certain period of silence after a machine detection has occurred.

Note that if the maxSilence is greater than or equal to the maxTimeout setting, the method will throw a FailedToExecuteScriptException error.

Returns:

(Boolean) true if the maximum amount of silence was detected; false if the specified duration of silence was not detected before the maximum timeout was reached.

Usage

To use this method:
  1. Using the Developer IDE, check out the callout > CONTACT > callout script, and locate the following section of code:
ELSE-IF ( $result == "MACHINE_DETECT" )
  $connected = true
  $voiceMail = true
  @recipient::report("Reached Voicemail.",$notId)
  $connectionEventMessage.message = "Callout to " & $targetName & " unsuccessful (" & $result & ")."
  @connectionEventMessage::send()
ELSE
...
  1. Replace the above code with the following:
ELSE-IF ( $result == "MACHINE_DETECT" )
  $connected = true
  $voiceMail = true
  @recipient::report("Reached Voicemail.",$notId)
  $connectionEventMessage.message = "Callout to " & $targetName & " unsuccessful (" & $result & ")."
  @connectionEventMessage::send()
  $waitOK = @phone::waitForSilence(2000)
  IF ( ! $waitOK )
    $failed = TRUE
    $failureType = "TIMED_OUT"
    $reportedFailure = @session::reportFailure($notId, $failureType)
    exit
  ENDIF
ELSE
...
  1. Save, validate, and check in your scripts.