Package com.sinch.sdk.models
Class DualToneMultiFrequency
java.lang.Object
com.sinch.sdk.models.DualToneMultiFrequency
DTMF played to the callee.
Valid characters in the string are "0"-"9", "#" and "w". A "w" will render a 500 ms pause.
Example: "ww1234#w#" will render a 1s pause, the DTMF tones "1", "2", "3", "4" and "#" followed by a 0.5s pause and finally the DTMF tone for "#".
This can be used if the callout destination for instance require a conference PIN code or an extension to be entered.
-
Constructor Summary
ConstructorDescriptionDualToneMultiFrequency
(String dtmf) Create an instance of DualToneMultiFrequency -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
hashCode()
static void
setStrict
(boolean strict) Configure if invalid string values will throw an Exception or notGet the DTMF valuetoString()
static boolean
Validate string against authorized values for DTMF valuestatic DualToneMultiFrequency
Create an instance from String
-
Constructor Details
-
DualToneMultiFrequency
Create an instance of DualToneMultiFrequency- Parameters:
dtmf
- The dtmf value. Valid characters in the string are "0"-"9", "#" and "w"- Throws:
IllegalArgumentException
- Throw an exception if value contains invalid characters
-
-
Method Details
-
valueOf
Create an instance from String- Parameters:
value
- SeeDualToneMultiFrequency(java.lang.String)
constructor- Returns:
- a DualToneMultiFrequency
-
setStrict
public static void setStrict(boolean strict) Configure if invalid string values will throw an Exception or not- Parameters:
strict
- Set strict mode to true/false
-
validate
Validate string against authorized values for DTMF value- Parameters:
value
- The value to be validated- Returns:
- Is string valid or not
-
stringValue
Get the DTMF value- Returns:
- The dtmf value
-
toString
-
equals
-
hashCode
public int hashCode()
-