Class StaticCallBehaviorCreator
java.lang.Object
com.sinch.sdk.domains.voice.models.v2.helpers.StaticCallBehaviorCreator
Fluent creator of a
STATIC service call behavior
Returned by CallBehaviorHelper.staticBehavior(SvamlCommand...).
Calling onHangup more than once appends the commands.
- Since:
- 2.4
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the call behaviorSet the name of the call, sent ascallNameonHangup(SvamlCommand... commands) Add commands to run when the call is hung uponHangup(Collection<? extends SvamlCommand> commands) Add commands to run when the call is hung uponHangup(Consumer<CommandsSequenceCreator> sequence) Add commands to run when the call is hung up
-
Method Details
-
name
Set the name of the call, sent ascallName- Parameters:
name- Name of the call, 1 to 32 characters without spaces- Returns:
- This creator
- Since:
- 2.4
-
onHangup
Add commands to run when the call is hung up- Parameters:
commands- Commands to append- Returns:
- This creator
- Since:
- 2.4
-
onHangup
Add commands to run when the call is hung up- Parameters:
commands- Commands to append- Returns:
- This creator
- Since:
- 2.4
-
onHangup
Add commands to run when the call is hung up- Parameters:
sequence- Lambda adding the commands to append- Returns:
- This creator
- Since:
- 2.4
-
build
Build the call behavior- Returns:
- The
STATICcall behavior - Throws:
IllegalStateException- if agotoMenucommand is outside a menu, or if a menu has a start menu or agotoMenutarget that is not one of its items- Since:
- 2.4
-