When I call into the Twilio number, the Weather Report prompts for a zip code, but then reports an "application error."

This is the Twilio debugger reports:

ERROR: HTTP retrieval failure  06:51:03 PDT, Saturday March 19 2011  

Component: TwiML errors
httpResponse: 403
ErrorCode: 11200
url: http://petnotice.com/voip/twilio/callhandler/process_inbound_calls/

Permalink View Error Details 
Request: What Twilio sent your server HTTP Method: post 
HTTP URL: http://petnotice.com/voip/twilio/callhandler/process_get_input/193915 
HTTP BODY: Key Value 
 AccountSid ACff114e5460e16a788308233dc4a986a0 
 ToZip 50309 
 FromState IA 
 Called +15154120760 
 FromCountry US 
 CallerCountry US 
 CalledZip 50309 
 Direction inbound 
 FromCity DES MOINES 
 CalledCountry US 
 CallerState IA 
 CallSid CA42b5fc9028071afc29be8f0504a9dc81 
 CalledState IA 
 From +15154406604 
 CallerZip 50325 
 FromZip 50325 
 CallStatus in-progress 
 ToCity DES MOINES 
 ToState IA 
 To +15154120760 
 Digits 50312 
 ToCountry US 
 CallerCity DES MOINES 
 ApiVersion 2010-04-01 
 Caller +15154406604 
 CalledCity DES MOINES 

Response: What your web application responded with to Twilio HTTP Headers: Key Value 
 Status 403 Bad Behavior 
 Date Sat, 19 Mar 2011 13:51:00 GMT 
 Content-Length 848 
 Set-Cookie SESS701bf7582e6f193234abf39a530a7b5c=ffebd3d3cc8b25fb7d42646f1032c8b2; expires=Mon, 11-Apr-2011 17:24:20 GMT; path=/; domain=.petnotice.com 
 Connection close 
 Content-Type text/html 
 Server Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/5.2.9 
 X-Powered-By PHP/5.2.9 
HTTP BODY: 12345678910111213 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!--< html xmlns="http://www.w3.org/1999/xhtml">--><head> <title>HTTP Error 403</title> </head> <body> <h1>Error 403</h1> <p>We're sorry, but we could not fulfill your request for /voip/twilio/callhandler/process_get_input/193915 on this server.</p> <p>You do not have permission to access this server.</p> <p>Your technical support key is: <strong>ccec-d0b6-6c50-2ff1</strong></p> <p>You can use this key to <a href="http://www.ioerror.us/bb2-support-key?key=ccec-d0b6-6c50-2ff1">fix this problem yourself</a>.</p>  

I can see it looks like a permission error but do not know what to change. Thank you.

Comments

leoburd’s picture

Hello there,

I've checked your server and, apparently, Twilio requests are being blocked by a spam filter called "Bad Behavior" (http://ioerror.us/bb2-support-key?key=b849-6141-6c50-2ff1):

Your request was intercepted by Bad Behavior (http://www.bad-behavior.ioerror.us/), security software which protects the Web site you visited from malicious activity, such as hackers, spam and viruses. We apologize for the inconvenience, but your request matched a profile of suspicious activity. This problem is usually quite easy to fix.

This problem is caused by your software failing to conform to current Internet standards. Please update your software to conform to current standards-track RFCs and try again.

If the above suggestions fail to resolve the problem, click Back and contact the e-mail address you were given for further assistance.

Do you have any control over that software/service? Would it be possible to check its logs to find out whether the problem is something that should be solved via "Bad Behavior" configuration or if we need to contact Twilio itself to change the format of their requests?

itserich’s picture

Status: Active » Closed (works as designed)

Hello - Bad Behavior is a program with a Drupal module http://drupal.org/node/850374

I disabled the module and the sample weather script is working fine.

I am going to leave Bad Behavior disabled, there has not been a release in 3 years and I do not know if it is working properly. If you would like me to reinstall it so you can test it let me know.

Thanks a lot for your help, am eager to try out VoIP.

itserich’s picture

Title: voipscript_weather_report - Twilio reports: ERROR: HTTP retrieval failure » Bad Behavior - error report - Denied - Bot not fully compliant with RFC 2965

I have looked for an alternative to Bad Behavior and have not found one. Also, the module has been recently updated.

So, I am renaming this issue to make it easier to find and reopening it in case some modification can be made to make VOIP and Bad Behavior work together.

Here are the two full error reports from Bad Behavior when I call the sample weather script:


IP Addr	204.236.208.182
Hostname	ec2-204-236-208-182.compute-1.amazonaws.com (whois)
Date	2011-04-08 15:34:06
Request type	POST
URI	/voip/twilio/callhandler/process_get_input/194033
Protocol	HTTP/1.1
User Agent	TwilioProxy/0.7
Headers	POST /voip/twilio/callhandler/process_get_input/194033 HTTP/1.1 User-Agent: TwilioProxy/0.7 Host: petnotice.com Cookie: $Version=0; bb2_screener_=1302276828+50.16.21.20; $Path=/ X-Twilio-Signature: GBjnwzvCwGwPFRDTwdOTB1nm9EE= Cache-Control: max-age=259200 Referer: http://petnotice.com/voip/twilio/callhandler/process_inbound_calls/ Content-Type: application/x-www-form-urlencoded; charset=UTF-8 Content-Length: 502 Connection: close
Request Entity	AccountSid: ACff114e5460e16a788308233dc4a986a0 ToZip: 50309 FromState: IA Called:             +15154120760       FromCountry: US CallerCountry: US CalledZip: 50309 Direction: inbound FromCity: DES MOINES CalledCountry: US CallerState: IA CallSid: CAfcdaee8b6ca1d590dce53b052b556c85 CalledState: IA From:             +15154406604       CallerZip: 50325 FromZip: 50325 CallStatus: in-progress ToCity: DES MOINES ToState: IA To:             +15154120760       Digits: 50312 ToCountry: US CallerCity: DES MOINES ApiVersion: 2010-04-01 Caller:             +15154406604       CalledCity: DES MOINES
Denied Reason	Bot not fully compliant with RFC 2965
Explanation	You do not have permission to access this server.
Response	403


Details
IP Addr	184.73.13.122
Hostname	ec2-184-73-13-122.compute-1.amazonaws.com (whois)
Date	2011-04-08 15:34:12
Request type	POST
URI	/voip/twilio/callhandler/process_hangup/
Protocol	HTTP/1.1
User Agent	TwilioProxy/0.7
Headers	POST /voip/twilio/callhandler/process_hangup/ HTTP/1.1 User-Agent: TwilioProxy/0.7 Host: petnotice.com Cookie: $Version=0; bb2_screener_=1302276828+50.16.21.20; $Path=/ X-Twilio-Signature: m5D3bAo7uNQLiGYFtt9MCwU0BGQ= Cache-Control: max-age=259200 Referer: http://petnotice.com/voip/twilio/callhandler/process_get_input/194033 Content-Type: application/x-www-form-urlencoded; charset=UTF-8 Content-Length: 514 Connection: close
Request Entity	AccountSid: ACff114e5460e16a788308233dc4a986a0 ToZip: 50309 FromState: IA Called:             +15154120760       FromCountry: US CallerCountry: US CalledZip: 50309 Direction: inbound FromCity: DES MOINES CalledCountry: US Duration: 1 CallerState: IA CallSid: CAfcdaee8b6ca1d590dce53b052b556c85 CalledState: IA From:             +15154406604       CallerZip: 50325 FromZip: 50325 CallStatus: completed ToCity: DES MOINES ToState: IA To:             +15154120760       CallDuration: 17 ToCountry: US CallerCity: DES MOINES ApiVersion: 2010-04-01 Caller:             +15154406604       CalledCity: DES MOINES
Denied Reason	Bot not fully compliant with RFC 2965
Explanation	You do not have permission to access this server.
Response	403

itserich’s picture

Title: Bad Behavior - error report - Denied - Bot not fully compliant with RFC 2965 » Bad Behavior & Cloudflare appear to work with VOIP

The Bad Behavior module has been updated to work with the latest Bad Behavior script, and VOIP works in at least my test phone call.

And the Cloudflare module which provides some of the same web site protection as Bad Behavior also appears to work with VOIP.

leoburd’s picture

Glad to hear that all seems to be working now!