Class Event
java.lang.Object
dev.truewinter.twiliocallrouter.plugin.Event
- Direct Known Subclasses:
ForwardCallEvent,InboundCallEvent,OutboundCallEvent,TransferCallEvent
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionOptional<com.twilio.twiml.VoiceResponse>booleanvoidsetCancelled(boolean cancelled) This method allows plugin developers to reject the callvoidsetCustomTwiML(com.twilio.twiml.VoiceResponse customTwiML) Using this method allows plugin developers to control how this call (or part of call) will be handledvoidsetCustomTwiML(String customTwiML) Using this method allows plugin developers to control how this call (or part of call) will be handled.
-
Constructor Details
-
Event
public Event()
-
-
Method Details
-
setCancelled
public void setCancelled(boolean cancelled) This method allows plugin developers to reject the call- Parameters:
cancelled- whether this call should be rejected
-
isCancelled
public boolean isCancelled()- Returns:
- true if the call has been cancelled
-
setCustomTwiML
public void setCustomTwiML(@NotNull com.twilio.twiml.VoiceResponse customTwiML) Using this method allows plugin developers to control how this call (or part of call) will be handled- Parameters:
customTwiML- The TwiML to provide to Twilio, in aVoiceResponseobject
-
setCustomTwiML
Using this method allows plugin developers to control how this call (or part of call) will be handled. This is a convenience method provided to developers who wish to use a different TwiML library.- Parameters:
customTwiML- The TwiML to provide to Twilio- Throws:
com.twilio.twiml.TwiMLException- if the TwiML is invalid- See Also:
-
getCustomTwiML
- Returns:
- The custom TwiML set, wrapped in an
Optional
-
getCustomTwiMLAsString
- Returns:
- The custom TwiML set, wrapped in an
Optional - See Also:
-