Class CalloutRequestParametersCustom.Builder

java.lang.Object
com.sinch.sdk.domains.voice.models.requests.CalloutRequestParameters.Builder<CalloutRequestParametersCustom.Builder>
com.sinch.sdk.domains.voice.models.requests.CalloutRequestParametersCustom.Builder
Enclosing class:
CalloutRequestParametersCustom

public static class CalloutRequestParametersCustom.Builder extends CalloutRequestParameters.Builder<CalloutRequestParametersCustom.Builder>
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • setMaxDuration

      public CalloutRequestParametersCustom.Builder setMaxDuration(Integer maxDuration)
      The maximum amount of time in seconds that the call will last.
      Parameters:
      maxDuration - Max duration value
      Returns:
      current builder
    • setIce

      You can use inline SVAML to replace a callback URL when using custom callouts.

      Ensure that the JSON object is escaped correctly

      If inline ICE SVAML is passed, exclude cli and destination properties from the customCallout request body. Example: "{\"action\": {\"name\": \"RunMenu\",\"locale\": \"en-US\",\"menus\": [{\"id\": \"main\",\"mainPrompt\": \"#tts[ Welcome to the main menu. Press 1 for a callback or 2 for a cancel<\/speak>]\",\"timeoutMills\": 5000,\"options\": [ {\"dtmf\": \"1\",\"action\": \"return(callback)\"}, {\"dtmf\": \"2\",\"action\": \"return(cancel)\"}]}]}}""

      Parameters:
      ice - The Incoming Call Event value
      Returns:
      current builder
    • setAce

      You can use inline SVAML to replace a callback URL when using custom callouts.

      Ensure that the JSON object is escaped correctly Example: "{\"action\":{\"name\":\"connectPstn\",\"number\":\"46000000001\",\"maxDuration\":90}}"

      Parameters:
      ace - The Answered Call Event value
      Returns:
      current builder
    • setPie

      Note: PIE callbacks are not available for DATA Calls; only PSTN and SIP calls.

      You can use inline SVAML to replace a callback URL when using custom callouts.

      Ensure that the JSON object is escaped correctly. A PIE event will contain a value chosen from an IVR choice. Usually a PIE event wil contain a URL to a callback sever that will receive the choice and be able to parse it. This could result in further SVAML or some other application logic function.

      Parameters:
      pie - Prompt Input Event value
      Returns:
      current builder
    • build