0

I'm new to PHP and development in general(come from a VOIP background). I've been learning for a few months now. I'm not sure what I'm doing wrong here but I'm having an issue receiving faxes from Twilio. I can see that Twilio is sending the request, but the debugger is showing 11200 errors for every attempted fax. I'm assuming it has something to do with how my XML file is being sent out.

Here is what my xml doc looks like:

And the code I'm using to generate this:

$timlresponse = new \SimpleXMLElement("<Response></Response>");
$response = $timlresponse->addChild('Receive');
$response->addAttribute('action','mysite.com/received');
Header('Content-type: text/xml');
echo $timlresponse->asXML();
dd();

I've gone as far as running a pcap and inspecting the HTTP headers, after I post to the page I'm getting an HTTP 200 response and the content-type is for sure set to "test/xml".

Any help would be greatly appreciated! Thank you.

1 Answers1

0

NVM I figured it out, ran tcpdump on server and noticed that my application was throwing a TokenMismatchException. WOW! The edit verifycsrftoken.php to exclude these routes and I'm good to go!