com.telapi.api.inboundxml.elements
Class Gather
java.lang.Object
com.telapi.api.inboundxml.elements.Gather
- All Implemented Interfaces:
- ResponseElement
public class Gather
- extends Object
- implements ResponseElement
|
Constructor Summary |
protected |
Gather()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Gather
protected Gather()
createGather
public static Gather createGather(String action,
HttpMethod method,
Long timeout,
String finishOnKey,
Long numDigits)
- Creates a Gather element. The Gather element allows callers to input
digits to the call using their keypads which are then sent via POST or
GET to a URL for further processing. There are many ways to get creative
with Gather but its most common use case is in creating IVR menus. This
is accomplished by nesting prompts for input from the caller using the
Say or Play elements.
By default an unlimited number of digits can be gathered, the Gather will
timeout after 5 seconds pass without any new digits or once the '#' key
is pressed, and the gathered digits will be submitted to the current
InboundXML document. This default behavior of Gather can be altered using
its provided element attributes.
- Parameters:
action - URL where the gathered digits will be sent for further processing (required).method - Method used to request the action URL. Defaults to POST.timeout - The number of seconds Gather should wait for digits to be entered before requesting the action URL. Timeout resets with each new digit input. Defaults to 5.finishOnKey - The key a caller can press to end the Gather. Allowed values are digits, # and *. Defaults to #.numDigits - The maximum number of digits to Gather. A number greater than or equal to 0. Defaults to no limit.
- Returns:
- The Gather element which is being created.
createGather
public static Gather createGather(String action)
- Convenience method for creating a new Gather element.
- Parameters:
action - URL where the gathered digits will be sent for further processing (required).
- Returns:
- The Gather element which is being created.
play
public Gather play(Long loop,
String resource)
- Parameters:
loop - resource -
- Returns:
- See Also:
Response.play(Long, String)
say
public Gather say(String text,
Voice voice,
Long loop)
- Parameters:
text - voice - loop -
- Returns:
- See Also:
Response.say(String, Voice, Long)
say
public Gather say(String text)
- Parameters:
text -
- Returns:
- See Also:
Response.say(String)
pause
public Gather pause(Long length)
- Parameters:
length -
- Returns:
- See Also:
Response.pause(Long)
pause
public Gather pause()
- Returns:
- See Also:
Response.pause()
Copyright © 2012. All Rights Reserved.