Writing an application on Twilio is easy as momma's pie. But here are a few tips we've found helpful...
Twilio logs information about it's interaction with your application, including all errors and warnings. You can check the contents of those logs to help you debug. There are two ways to do this:
While all errors and warnings are available in the the Twilio debugging interface, the REST API will also return a Twilio REST Exception XML block which contains the HTML error code, Twilio-specific error code, error message, and a link to the Error Code Reference.
<?xml version="1.0"?>
<TwilioResponse>
<RestException>
<Status>400</Status>
<Message>Dial: Invalid phone number format </Message>
<Code>13223</Code>
<MoreInfo>http://www.twilio.com/docs/errors/13223</MoreInfo>
</RestException>
</TwilioResponse>
All Twilio-specific errors are listed in the Error Code Reference
Remember, you're just writing a web application. There's nothing Twilio does that you can't test right there in your browser. Visit the URLs in your web browser, and see that you don't have any errors.
Make sure your application isn't sending debug output, because that will nearly always cause problems XML validation problem. You can, however, wrap any such output in XML comment blocks... they're the same as HTML comment blocks: <!-- COMMENTS HERE --><br/>