hangup() публичный Метод

This function instructs Tropo to "hang-up" or disconnect the session associated with the current session.
public hangup ( ) : void
Результат void
        protected void Page_Load(object sender, EventArgs e)
        {
            // Create a new instance of the Tropo object.
            Tropo tropo = new Tropo();

            // Create a transcription object to use with recording.
            Transcription trancription = new Transcription();
            trancription.url = "mailto:[email protected]";
            trancription.emailFormat = "omit";

            // Set up grammar for recording.
            Choices choices = new Choices();
            choices.value = "[10 DIGITS]";
            choices.terminator = "#";

            // Construct a prompt to use with the recording.
            Say say = new Say();
            say.value = "Please say your account number";

            // Use the record() method to set up a recording.
            tropo.record(3, false, true, choices, AudioFormat.wav, 10, 60, Method.post, null, true, say, 5, trancription, null, "http://somehost.com/record.aspx");

            // Hangup when finished.
            tropo.hangup();

            // Render the JSON for Tropo to consume.
            Response.Write(TropoJSON.render(tropo));
        }
Пример #2
0
 public void testHangup()
 {
     Tropo tropo = new Tropo();
     tropo.hangup();
     Assert.AreEqual(@"{""tropo"":[{ ""hangup"":{}}]}", TropoJSON.render(tropo), true);
 }