void OnIdle(WorkflowApplicationIdleEventArgs args) { // if the response is empty, redirect back to ourselves periodically if (!TwilioResponse.HasElements) { TwilioResponse.Add(new XElement("Pause", new XAttribute("length", 2))); TwilioResponse.Add(new XElement("Redirect", SelfUrl)); } }
void OnCompleted(WorkflowApplicationCompletedEventArgs args) { // we're done, hang up on the user TwilioResponse.Add(new XElement("Hangup")); }