|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.telapi.api.inboundxml.elements.Response
public class Response
| Constructor Summary | |
|---|---|
protected |
Response()
|
| Method Summary | |
|---|---|
static Response |
create()
Creates a new basic response object. |
String |
createXml()
|
Response |
dial(Dial dial)
Adds a Dial element to a Response element. |
Response |
gather(Gather gather)
Adds a Gather element to the current Response element. |
Response |
getSpeech(GetSpeech getSpeech)
Adds a GetSpeech element to the current Response element. |
Response |
hangup()
Conveniece method for creating a new Hangup element. |
Response |
hangup(Long schedule)
Adds a Hangup element to the Response element. |
Response |
pause()
Adds a Pause element to the Response element. |
Response |
pause(Long length)
Adds a Pause element to the Response element. |
Response |
play(Long loop,
String resource)
Adds a Play element to a Response element. |
Response |
record(RecordParameters params)
Convenience method for appending a new Record element. |
Response |
record(String action)
Convenience method for appending a new Record element. |
Response |
record(String action,
HttpMethod method,
Long timeout,
String finishOnKey,
Long maxLength,
Boolean transcribe,
String transcribeCallback,
Boolean playBeep,
Boolean bothLegs,
RecordingFileFormat fileFormat)
Adds a Record element to a Response element. |
Response |
redirect(String url)
Convenience method for creating a redirect element. |
Response |
redirect(String url,
HttpMethod method)
Adds a Redirect element to the Response element. |
Response |
reject()
Convenience method for adding a Reject element to the current Response element. |
Response |
reject(RejectReason reason)
Adds a Reject element to the Response element. |
Response |
say(String text)
Convenience method for creating a Say element. |
Response |
say(String text,
Voice voice,
Long loop)
Adds a Say element to a Response element. |
Response |
sms(String text,
String to,
String from)
Convenience method for adding an Sms element. |
Response |
sms(String text,
String to,
String from,
String action,
HttpMethod method,
String statusCallback)
Appends an SMS Element to the current Response element. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected Response()
| Method Detail |
|---|
public static Response create()
public Response play(Long loop,
String resource)
loop - The amount of times the Play should be repeated. Zero
indicates an infinite loop. The allowed values are greater
than or equal to 0. Defaults to 1.resource - The URL to the mp3 file which should be played (required).
public Response say(String text,
Voice voice,
Long loop)
text - The text to be spoken (required).voice - The type of voice that will read the text to the caller. Defaults to WOMAN.loop - The amount of times the spoken text should be repeated. Zero
indicates an infinite loop. The allowed values are greater
than or equal to 0. Defaults to 1.
public Response say(String text)
text - The text to be spoken.
public Response record(String action,
HttpMethod method,
Long timeout,
String finishOnKey,
Long maxLength,
Boolean transcribe,
String transcribeCallback,
Boolean playBeep,
Boolean bothLegs,
RecordingFileFormat fileFormat)
action - URL where some parameters specific to Record will be sent for
further processing (required).method - Specifies the method to use when requesting the action or
transcribeCallback URL.timeout - The number of seconds Record should wait during silence before
ending. Greater than or equal to 0. Defaults to 5.finishOnKey - The key a caller can press to end the Record. Allowed values
are 0-9, # or *. Defaults to #.maxLength - The maximum length in seconds a recording should be. Defaults
to 3600.transcribe - Boolean value specifying if the recording should be
transcribed. Defaults to false.transcribeCallback - URL where the recording transcription will be sent. Defaults
to the current InboundXML document.playBeep - Boolean value specifying if a beep should be played when the
recording begins. Defaults to false.bothLegs - Boolean value specifying if both call legs should be recorded.
Defaults to false.fileFormat - The recording file format. Can be mp3 or wav. Default is mp3.
public Response record(String action)
action - URL where some parameters specific to Record will be sent for
further processing (required).
record(String, HttpMethod, Long, String, Long, Boolean, String,
Boolean, Boolean, RecordingFileFormat)public Response record(RecordParameters params)
params - The RecordParameters used to create the Record element.
record(String, HttpMethod, Long, String, Long, Boolean, String,
Boolean, Boolean, RecordingFileFormat)public Response dial(Dial dial)
dial - A new Dial element which must be created by calling
Dial.create(...).
public Response hangup(Long schedule)
schedule - Specifies in seconds when a hangup should occur during a call.
Defaults to 0
public Response hangup()
hangup(Long)public Response redirect(String url)
url - The URL to which to redirect.
redirect(String, HttpMethod)
public Response redirect(String url,
HttpMethod method)
url - The URL to which to redirect.method - Method used to request the InboundXML doucment the call is
being redirected to. Defaults to POST.
public Response reject(RejectReason reason)
reason - The reason to list as why the call was rejected. Defaults to
rejected.
public Response reject()
reject(RejectReason)public Response pause(Long length)
length - The length in seconds the pause should be. Allowed values are
1 or greater. Defaults to 1.
public Response pause()
pause(Long)
public Response sms(String text,
String to,
String from,
String action,
HttpMethod method,
String statusCallback)
text - The content of the SMS.to - The phone number that will receive the SMS message (required).from - The number that will display as sending the SMS message
(required).action - URL where parameters specific to Sms are sent.method - Method used to request the action URL. Defaults to POST.statusCallback - URL where the status of the SMS can be sent.
public Response sms(String text,
String to,
String from)
text - The content of the SMS.to - The phone number that will receive the SMS message (required).from - The number that will display as sending the SMS message
(required).
sms(String, String, String, String, HttpMethod, String)public Response gather(Gather gather)
gather - The Gather element to add. It must be created by calling the
Gather.create(...) method.
public Response getSpeech(GetSpeech getSpeech)
getSpeech - The GetSpeech element to add. It must be created by calling
the GetSpeech.create(...) method.
public String createXml()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||