public void Page_Load(object sender, EventArgs args) { using (StreamReader reader = new StreamReader(Request.InputStream)) { Tropo tropo = new Tropo(); try { IEnumerable <string> redirect2 = new string[] { "sip:[email protected]" }; IEnumerable <string> redirect1 = new string[] { "sip:[email protected]:5678" }; IEnumerable <string> redirectfrank = new string[] { "sip:[email protected]:5678" }; string too = "sip:[email protected]:5678"; // in my test, X-Lite client did not success string too2 = "sip:[email protected]:5678"; // use another application success tropo.Redirect(too2, "redirectwindows", null); } catch (JsonReaderException) { tropo.Say("Sorry, an error occured. I choked on some JSON"); } catch (Exception ex) { tropo.Say("Sorry, an error occured. " + ex.Message); } finally { tropo.RenderJSON(Response); } } }
public void testRedirect() { Tropo tropo = new Tropo(); tropo.Redirect("sip:[email protected]:5678", "redirectTest", true); Assert.AreEqual(this.redirectJson, renderJSONToText(tropo)); }