C# 클래스 TropoCSharp.Tropo.Tropo

The main tropo class.
파일 보기 프로젝트 열기: hack4reno/hack4reno2011 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
tropo ArrayList

공개 메소드들

메소드 설명
Tropo ( ) : System

Class constructor.

ask ( Ask ask ) : void

Overload for Ask that allows an Ask object to be passed.

ask ( int attempts, bool bargein, Choices choices, int minConfidence, string name, bool required, Say say, float timeout ) : void

Sends a prompt to the user and optionally waits for a response.

ask ( int attempts, bool bargein, Choices choices, int minConfidence, string name, bool required, Say say, float timeout, Array events ) : void

Overload method for Ask that allows an array of events to be used.

call ( ArrayList to ) : void

Overload for call that allows multiple calls to be made with one parmameter.

call ( ArrayList to, Endpoint from, string network, string channel, bool answerOnMedia, float timeout, Hashtable headers, StartRecording recording ) : void

Places a call or sends an an IM, Twitter, or SMS message. To start a call, use the Session API to tell Tropo to launch your code.

call ( Call call ) : void

Overload for call that allows a Call object to be passed.

call ( String to ) : void

Overload for Call that allows one parameter.

call ( String to, string from, string network, string channel, bool answerOnMedia, float timeout, Hashtable headers, StartRecording recording ) : void

Overload for Call that allows the To parameter to be passed as a String.

conference ( TropoCSharp.Tropo.Conference conference ) : void

Overload for Conference that allows a Conference object to be passed.

conference ( string id, bool mute, string name, bool playTones, bool required, string terminator ) : void

This object allows multiple lines in separate sessions to be conferenced together so that the parties on each line can talk to each other simultaneously. This is a voice channel only feature.

hangup ( ) : void

This function instructs Tropo to "hang-up" or disconnect the session associated with the current session.

message ( TropoCSharp.Tropo.Message message ) : void

Overload for Message that allows a Message object to be passed.

message ( Say say, ArrayList to, bool answerOnMedia, string channel, Endpoint from, string name, string network, bool required, float timeout ) : void

A shortcut method to create a session, say something, and hang up, all in one step. This is particularly useful for sending out a quick SMS or IM.

on ( On on ) : void

Overload for On that allows an On object to be passed.

on ( string @event, string next, Say say ) : void

Adds an event callback so that your application may be notified when a particular event occurs.

record ( TropoCSharp.Tropo.Record record ) : void

Overload for Record that allows a Record object to be passed.

record ( int attempts, bool bargein, bool beep, Choices choices, string format, float maxSilence, float maxTime, string method, string password, bool required, Say say, float timeout, TropoCSharp.Tropo.Transcription transcription, string username, string url ) : void

Overload for Record that allows a Transcription object to be passed.

record ( int attempts, bool bargein, bool beep, Choices choices, string format, float maxSilence, float maxTime, string method, string password, bool required, Say say, float timeout, string username, string url ) : void

Plays a prompt (audio file or text to speech) and optionally waits for a response from the caller that is recorded. If collected, responses may be in the form of DTMF or speech recognition using a simple grammar format defined below. The record funtion is really an alias of the prompt function, but one which forces the record option to true regardless of how it is (or is not) initially set. At the conclusion of the recording, the audio file may be automatically sent to an external server via FTP or an HTTP POST/Multipart Form. If specified, the audio file may also be transcribed and the text returned to you via an email address or HTTP POST/Multipart Form.

redirect ( ArrayList to, string name, bool required ) : void

The redirect function forwards an incoming call to another destination / phone number before answering it. The redirect function must be called before answer is called; redirect expects that a call be in the ringing or answering state. Use transfer when working with active answered calls.

redirect ( TropoCSharp.Tropo.Redirect redirect ) : void

Overload for Redirect that allow a Redirect object to be passed.

reject ( ) : void

Allows Tropo applications to reject incoming sessions before they are answered.

say ( Array says ) : void

Ooverload method for Say that allows an arrat of prompts to be used.

say ( Say say ) : void

Overload method for Say that allows a Say object to be passed directly.

say ( string @value ) : void

Overload method for Say that allows only a string value to be passed.

say ( string @value, string @as, string name, bool required ) : void

When the current session is a voice channel this key will either play a message or an audio file from a URL. In the case of an text channel it will send the text back to the user via i nstant messaging or SMS.

startRecording ( StartRecording startRecording ) : void

Overload for StartRecording that allows a a StartRecording object to be passed directly.

startRecording ( string format, string method, string url, string username, string password ) : void

Allows Tropo applications to begin recording the current session. The resulting recording may then be sent via FTP or an HTTP POST/Multipart Form.

stopRecording ( ) : void

Stops a previously started recording.

transfer ( TropoCSharp.Tropo.Transfer transfer ) : void

Overload for Transfer that allows a Transfer object to be passed directly.

transfer ( bool answerOnMedia, Choices choices, Endpoint from, On on, int ringRepeat, float timeout, ArrayList to ) : void

Transfers an already answered call to another destination / phone number. Call may be transferred to another phone number or SIP address, which is set through the "to" parameter and is in URL format.

비공개 메소드들

메소드 설명
serialize ( TropoBase action, string prefix ) : void

Method to serialize Tropo action objects and add to the base Tropo array.

메소드 상세

Tropo() 공개 메소드

Class constructor.
public Tropo ( ) : System
리턴 System

ask() 공개 메소드

Overload for Ask that allows an Ask object to be passed.
public ask ( Ask ask ) : void
ask Ask An Ask object.
리턴 void

ask() 공개 메소드

Sends a prompt to the user and optionally waits for a response.
public ask ( int attempts, bool bargein, Choices choices, int minConfidence, string name, bool required, Say say, float timeout ) : void
attempts int How many times the caller can attempt input before an error is thrown.
bargein bool Should the user be allowed to barge in before TTS is complete?
choices Choices The grammar to use in recognizing and validating input.
minConfidence int How confident should Tropo be in a speech recognition match?
name string identifies the return value of an ask, so you know the context for the returned information.
required bool Is input required here?
say Say This determines what is played or sent to the caller.
timeout float The amount of time Tropo will wait, in seconds, after sending or playing the prompt for the user to begin a response.
리턴 void

ask() 공개 메소드

Overload method for Ask that allows an array of events to be used.
public ask ( int attempts, bool bargein, Choices choices, int minConfidence, string name, bool required, Say say, float timeout, Array events ) : void
attempts int How many times the caller can attempt input before an error is thrown.
bargein bool Should the user be allowed to barge in before TTS is complete?
choices Choices The grammar to use in recognizing and validating input
minConfidence int How confident should Tropo be in a speech reco match?
name string Identifies the return value of an Ask, so you know the context for the returned information.
required bool Is input required here?
say Say This determines what is played or sent to the caller.
timeout float The amount of time Tropo will wait, in seconds, after sending or playing the prompt for the user to begin a response.
events System.Array ??
리턴 void

call() 공개 메소드

Overload for call that allows multiple calls to be made with one parmameter.
public call ( ArrayList to ) : void
to ArrayList An ArryList containing recipients to call.
리턴 void

call() 공개 메소드

Places a call or sends an an IM, Twitter, or SMS message. To start a call, use the Session API to tell Tropo to launch your code.
public call ( ArrayList to, Endpoint from, string network, string channel, bool answerOnMedia, float timeout, Hashtable headers, StartRecording recording ) : void
to ArrayList An ArryList containing recipients to call.
from Endpoint An Endpoint object representing who the call is from.
network string Network is used mainly by the text channels; values can be SMS when sending a text message, or a valid IM network name such as AIM, MSN, JABBER, YAHOO and GTALK.
channel string This defines the channel used to place new calls.
answerOnMedia bool If this is set to true, the call will be considered "answered" and audio will begin playing as soon as media is received from the far end
timeout float The amount of time Tropo will wait, in seconds, after sending or playing the prompt for the user to begin a response.
headers Hashtable This contains the Session Initiation Protocol (SIP) Headers for the current session.
recording StartRecording This is a shortcut to allow you to start call recording as soon as the call is answered.
리턴 void

call() 공개 메소드

Overload for call that allows a Call object to be passed.
public call ( Call call ) : void
call Call A Call object.
리턴 void

call() 공개 메소드

Overload for Call that allows one parameter.
public call ( String to ) : void
to String The number of the person to call.
리턴 void

call() 공개 메소드

Overload for Call that allows the To parameter to be passed as a String.
public call ( String to, string from, string network, string channel, bool answerOnMedia, float timeout, Hashtable headers, StartRecording recording ) : void
to String A String containing the recipient to call.
from string An Endpoint object representing who the call is from.
network string Network is used mainly by the text channels; values can be SMS when sending a text message, or a valid IM network name such as AIM, MSN, JABBER, YAHOO and GTALK.
channel string This defines the channel used to place new calls.
answerOnMedia bool If this is set to true, the call will be considered "answered" and audio will begin playing as soon as media is received from the far end.
timeout float The amount of time Tropo will wait, in seconds, after sending or playing the prompt for the user to begin a response.
headers Hashtable This contains the Session Initiation Protocol (SIP) Headers for the current session.
recording StartRecording This is a shortcut to allow you to start call recording as soon as the call is answered.
리턴 void

conference() 공개 메소드

Overload for Conference that allows a Conference object to be passed.
public conference ( TropoCSharp.Tropo.Conference conference ) : void
conference TropoCSharp.Tropo.Conference A Conference object.
리턴 void

conference() 공개 메소드

This object allows multiple lines in separate sessions to be conferenced together so that the parties on each line can talk to each other simultaneously. This is a voice channel only feature.
public conference ( string id, bool mute, string name, bool playTones, bool required, string terminator ) : void
id string This defines the id/name of the conference room to create.
mute bool Adds the user to the conference room with their audio muted.
name string Identifies the return value of a Conference, so you know the context for the returned information.
playTones bool This defines whether to send touch tone phone input to the conference or block the audio.
required bool Determines whether Tropo should move on to the next action.
terminator string This is the touch-tone key (also known as "DTMF digit") used to exit the conference.
리턴 void

hangup() 공개 메소드

This function instructs Tropo to "hang-up" or disconnect the session associated with the current session.
public hangup ( ) : void
리턴 void

message() 공개 메소드

Overload for Message that allows a Message object to be passed.
public message ( TropoCSharp.Tropo.Message message ) : void
message TropoCSharp.Tropo.Message A Message object.
리턴 void

message() 공개 메소드

A shortcut method to create a session, say something, and hang up, all in one step. This is particularly useful for sending out a quick SMS or IM.
public message ( Say say, ArrayList to, bool answerOnMedia, string channel, Endpoint from, string name, string network, bool required, float timeout ) : void
say Say This determines what is played or sent to the caller.
to ArrayList The destination to make a call to or send a message to.
answerOnMedia bool If this is set to true, the call will be considered "answered" and audio will begin playing as soon as media is received from the far end.
channel string This defines the channel used to place new calls.
from Endpoint An Endpoint object representing who the call is from.
name string Identifies the return value of a Message, so you know the context for the returned information.
network string Network is used mainly by the text channels; values can be SMS when sending a text message, or a valid IM network name such as AIM, MSN, JABBER, YAHOO and GTALK.
required bool Determines whether Tropo should move on to the next action.
timeout float The amount of time Tropo will wait, in seconds, after sending or playing the prompt for the user to begin a response.
리턴 void

on() 공개 메소드

Overload for On that allows an On object to be passed.
public on ( On on ) : void
on On An On object.
리턴 void

on() 공개 메소드

Adds an event callback so that your application may be notified when a particular event occurs.
public on ( string @event, string next, Say say ) : void
@event string
next string When an associated event occurs, Tropo will post to the URL defined here. If left blank, Tropo will simply hangup.
say Say This determines what is played or sent to the caller.
리턴 void

record() 공개 메소드

Overload for Record that allows a Record object to be passed.
public record ( TropoCSharp.Tropo.Record record ) : void
record TropoCSharp.Tropo.Record A Record object.
리턴 void

record() 공개 메소드

Overload for Record that allows a Transcription object to be passed.
public record ( int attempts, bool bargein, bool beep, Choices choices, string format, float maxSilence, float maxTime, string method, string password, bool required, Say say, float timeout, TropoCSharp.Tropo.Transcription transcription, string username, string url ) : void
attempts int How many times the caller can attempt input before an error is thrown.
bargein bool Should the user be allowed to barge in before TTS is complete?
beep bool When set to true, callers will hear a tone indicating the recording has begun.
choices Choices The grammar to use in recognizing and validating input.
format string This specifies the format for the audio recording.
maxSilence float The maximum amount of time, in seconds, to wait for silence after a user stops speaking.
maxTime float The maximum amount of time, in seconds, the user is allotted for input.
method string This defines how you want to send the audio file.
password string This identifies the FTP account password.
required bool Determines whether Tropo should move on to the next action.
say Say This determines what is played or sent to the caller.
timeout float The amount of time Tropo will wait, in seconds, after sending or playing the prompt for the user to begin a response.
transcription TropoCSharp.Tropo.Transcription This allows you to submit a recording to be transcribed and specifies where to send the transcription.
username string This identifies the FTP account username.
url string This is the destination URL to send the recording.
리턴 void

record() 공개 메소드

Plays a prompt (audio file or text to speech) and optionally waits for a response from the caller that is recorded. If collected, responses may be in the form of DTMF or speech recognition using a simple grammar format defined below. The record funtion is really an alias of the prompt function, but one which forces the record option to true regardless of how it is (or is not) initially set. At the conclusion of the recording, the audio file may be automatically sent to an external server via FTP or an HTTP POST/Multipart Form. If specified, the audio file may also be transcribed and the text returned to you via an email address or HTTP POST/Multipart Form.
public record ( int attempts, bool bargein, bool beep, Choices choices, string format, float maxSilence, float maxTime, string method, string password, bool required, Say say, float timeout, string username, string url ) : void
attempts int How many times the caller can attempt input before an error is thrown.
bargein bool Should the user be allowed to barge in before TTS is complete?
beep bool When set to true, callers will hear a tone indicating the recording has begun.
choices Choices The grammar to use in recognizing and validating input.
format string This specifies the format for the audio recording.
maxSilence float The maximum amount of time, in seconds, to wait for silence after a user stops speaking.
maxTime float The maximum amount of time, in seconds, the user is allotted for input.
method string This defines how you want to send the audio file.
password string This identifies the FTP account password.
required bool Determines whether Tropo should move on to the next action.
say Say This determines what is played or sent to the caller.
timeout float The amount of time Tropo will wait, in seconds, after sending or playing the prompt for the user to begin a response.
username string This identifies the FTP account username.
url string This is the destination URL to send the recording.
리턴 void

redirect() 공개 메소드

The redirect function forwards an incoming call to another destination / phone number before answering it. The redirect function must be called before answer is called; redirect expects that a call be in the ringing or answering state. Use transfer when working with active answered calls.
public redirect ( ArrayList to, string name, bool required ) : void
to ArrayList The SIP destination for the incoming call, as a URL.
name string Identifies the return value of a Redirect, so you know the context for the returned information.
required bool Determines whether Tropo should move on to the next action.
리턴 void

redirect() 공개 메소드

Overload for Redirect that allow a Redirect object to be passed.
public redirect ( TropoCSharp.Tropo.Redirect redirect ) : void
redirect TropoCSharp.Tropo.Redirect A Redirect object.
리턴 void

reject() 공개 메소드

Allows Tropo applications to reject incoming sessions before they are answered.
public reject ( ) : void
리턴 void

say() 공개 메소드

Ooverload method for Say that allows an arrat of prompts to be used.
public say ( Array says ) : void
says System.Array The prompts to say or send to the caller.
리턴 void

say() 공개 메소드

Overload method for Say that allows a Say object to be passed directly.
public say ( Say say ) : void
say Say A Say object.
리턴 void

say() 공개 메소드

Overload method for Say that allows only a string value to be passed.
public say ( string @value ) : void
@value string
리턴 void

say() 공개 메소드

When the current session is a voice channel this key will either play a message or an audio file from a URL. In the case of an text channel it will send the text back to the user via i nstant messaging or SMS.
public say ( string @value, string @as, string name, bool required ) : void
@value string
@as string
name string Identifies the return value of a Say, so you know the context for the returned information.
required bool Determines whether Tropo should move on to the next action.
리턴 void

startRecording() 공개 메소드

Overload for StartRecording that allows a a StartRecording object to be passed directly.
public startRecording ( StartRecording startRecording ) : void
startRecording StartRecording A StartRecording object.
리턴 void

startRecording() 공개 메소드

Allows Tropo applications to begin recording the current session. The resulting recording may then be sent via FTP or an HTTP POST/Multipart Form.
public startRecording ( string format, string method, string url, string username, string password ) : void
format string This specifies the format for the audio recording; it can be 'audio/wav' or 'audio/mp3'.
method string This defines how you want to send the audio file.
url string This is the destination URL to send the recording.
username string This identifies the FTP account username.
password string This identifies the FTP account password.
리턴 void

stopRecording() 공개 메소드

Stops a previously started recording.
public stopRecording ( ) : void
리턴 void

transfer() 공개 메소드

Overload for Transfer that allows a Transfer object to be passed directly.
public transfer ( TropoCSharp.Tropo.Transfer transfer ) : void
transfer TropoCSharp.Tropo.Transfer A Transfer object.
리턴 void

transfer() 공개 메소드

Transfers an already answered call to another destination / phone number. Call may be transferred to another phone number or SIP address, which is set through the "to" parameter and is in URL format.
public transfer ( bool answerOnMedia, Choices choices, Endpoint from, On on, int ringRepeat, float timeout, ArrayList to ) : void
answerOnMedia bool If this is set to true, the call will be considered "answered" and audio will begin playing as soon as media is received from the far end.
choices Choices The grammar to use in recognizing and validating input.
from Endpoint An Endpoint object representing who the call is from.
on On An On object.
ringRepeat int The number of rings to allow on the outbound call attempt.
timeout float The amount of time Tropo will wait, in seconds, after sending or playing the prompt for the user to begin a response.
to ArrayList The new destination for the incoming call as a URL.
리턴 void

프로퍼티 상세

tropo 공개적으로 프로퍼티

public ArrayList tropo
리턴 ArrayList