C# Class TelAPI.InboundXML.Response

ファイルを表示 Open project: TelAPI/telapi-dotnet Class Usage Examples

Private Properties

Property Type Description
ModifyXML string

Public Methods

Method Description
CreateXml ( ) : string

Create valid TelApi XML response

Dial ( Dial dial ) : Response

The Dial element starts an outgoing dial from the current call.

Gather ( Gather gather ) : Response

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.

GetSpeech ( GetSpeech speech ) : Response

The GetSpeech element is used to translate a callers voice into text.

Hangup ( ) : Response

The Hangup element will hangup the current call.

Hangup ( long schedule ) : Response

The Hangup element will hangup the current call.

Pause ( ) : Response

The Pause element will pause the call, holding for the number of seconds set by the length attribute.

Pause ( long length ) : Response

The Pause element will pause the call, holding for the number of seconds set by the length attribute.

Play ( string resource ) : Response

The Play element plays an mp3 file for the caller.

Play ( string resource, long loop ) : Response

The Play element plays an mp3 file for the caller.

Record ( RecordOptions recordOptions ) : Response

The Record element is used to record audio during a call.

Record ( string action ) : Response

The Record element is used to record audio during a call.

Record ( string action, HttpMethod method, long timeout, string finishOnKey, long maxLength, bool transcribe, string transcribeCallback, bool playBeep, bool bothLegs, RecordingFileFormat fileFormat ) : Response

The Record element is used to record audio during a call.

Redirect ( string url ) : Response

The Redirect element directs the call to another InboundXML document.

Redirect ( string url, HttpMethod method ) : Response

The Redirect element directs the call to another InboundXML document.

Reject ( ) : Response

The Reject element will reject an incoming call.

Reject ( RejectReason reason ) : Response

The Reject element will reject an incoming call.

Response ( ) : System
Say ( string text ) : Response

The Say element reads text to the caller using a text-to-speech engine.

Say ( string text, Voice voice, long loop ) : Response

The Say element reads text to the caller using a text-to-speech engine.

Sms ( string text, string to, string from ) : Response

The Sms element can be used to send SMS messages.

Sms ( string text, string to, string from, string action, HttpMethod method, string statusCallback ) : Response

The Sms element can be used to send SMS messages.

Private Methods

Method Description
ModifyXML ( System.Xml.Linq.XDocument result ) : string

Remove Yaxlib namespace and attributes from XML tree which were generated during XML serialization

Method Details

CreateXml() public method

Create valid TelApi XML response
public CreateXml ( ) : string
return string

Dial() public method

The Dial element starts an outgoing dial from the current call.
public Dial ( Dial dial ) : Response
dial TelAPI.InboundXML.Element.Dial Dial element
return Response

Gather() public method

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.
public Gather ( Gather gather ) : Response
gather TelAPI.InboundXML.Element.Gather Gather object
return Response

GetSpeech() public method

The GetSpeech element is used to translate a callers voice into text.
public GetSpeech ( GetSpeech speech ) : Response
speech TelAPI.InboundXML.Element.GetSpeech GetSpeech object.
return Response

Hangup() public method

The Hangup element will hangup the current call.
public Hangup ( ) : Response
return Response

Hangup() public method

The Hangup element will hangup the current call.
public Hangup ( long schedule ) : Response
schedule long Specifies in seconds when a hangup should occur during a call.
return Response

Pause() public method

The Pause element will pause the call, holding for the number of seconds set by the length attribute.
public Pause ( ) : Response
return Response

Pause() public method

The Pause element will pause the call, holding for the number of seconds set by the length attribute.
public Pause ( long length ) : Response
length long The length in seconds the pause should be.
return Response

Play() public method

The Play element plays an mp3 file for the caller.
public Play ( string resource ) : Response
resource string Resource URL of audio file to play
return Response

Play() public method

The Play element plays an mp3 file for the caller.
public Play ( string resource, long loop ) : Response
resource string Resource URL of audio file to play
loop long The amount of times the PlayW should be repeated. 0 indicates an infinite loop.
return Response

Record() public method

The Record element is used to record audio during a call.
public Record ( RecordOptions recordOptions ) : Response
recordOptions TelAPI.InboundXML.Option.RecordOptions Record options
return Response

Record() public method

The Record element is used to record audio during a call.
public Record ( string action ) : Response
action string URL where some parameters specific to Record will be sent for further processing.
return Response

Record() public method

The Record element is used to record audio during a call.
public Record ( string action, HttpMethod method, long timeout, string finishOnKey, long maxLength, bool transcribe, string transcribeCallback, bool playBeep, bool bothLegs, RecordingFileFormat fileFormat ) : Response
action string URL where some parameters specific to Record will be sent for further processing.
method HttpMethod Specifies the method to use when requesting the action or transcribeCallback URL.
timeout long The number of seconds Record should wait during silence before ending.
finishOnKey string The key a caller can press to end the Record.
maxLength long The maximum length in seconds a recording should be.
transcribe bool Boolean value specifying if the recording should be transcribed.
transcribeCallback string URL where the recording transcription will be sent.
playBeep bool Boolean value specifying if a beep should be played when the recording begins.
bothLegs bool Boolean value specifying if both call legs should be recorded.
fileFormat RecordingFileFormat The recording file format. Can be mp3 or wav. Default is mp3
return Response

Redirect() public method

The Redirect element directs the call to another InboundXML document.
public Redirect ( string url ) : Response
url string URL where redirection will occur
return Response

Redirect() public method

The Redirect element directs the call to another InboundXML document.
public Redirect ( string url, HttpMethod method ) : Response
url string URL where redirection will occur
method HttpMethod Method used to request the InboundXML doucment the call is being redirected to.
return Response

Reject() public method

The Reject element will reject an incoming call.
public Reject ( ) : Response
return Response

Reject() public method

The Reject element will reject an incoming call.
public Reject ( RejectReason reason ) : Response
reason RejectReason The reason to list as why the call was rejected.
return Response

Response() public method

public Response ( ) : System
return System

Say() public method

The Say element reads text to the caller using a text-to-speech engine.
public Say ( string text ) : Response
text string Text to speech
return Response

Say() public method

The Say element reads text to the caller using a text-to-speech engine.
public Say ( string text, Voice voice, long loop ) : Response
text string Text to speech
voice Voice The type of voice that will read the text to caller.
loop long The amount of times the spoken text should be repeated. 0 indicates an infinite loop.
return Response

Sms() public method

The Sms element can be used to send SMS messages.
public Sms ( string text, string to, string from ) : Response
text string Message text. Max 160 characters
to string The phone number that will receive the SMS message.
from string The number that will display as sending the SMS message.
return Response

Sms() public method

The Sms element can be used to send SMS messages.
public Sms ( string text, string to, string from, string action, HttpMethod method, string statusCallback ) : Response
text string Message text. Max 160 characters
to string The phone number that will receive the SMS message.
from string The number that will display as sending the SMS message.
action string URL where paramaters specific to are sent.
method HttpMethod Method used to request the action URL.
statusCallback string URL where the status of the SMS can be sent.
return Response