Twilio传真:架构验证警告 - 12200

时间:2017-10-30 21:03:35

标签: php laravel-5 twilio

接收传真的我的控制器代码:

$twimlResponse = new \SimpleXMLElement("<Response></Response>");
$recieveEl = $twimlResponse->addChild('Receive');
$recieveEl->addAttribute('action', '/api/fax/received/file');       
return response($twimlResponse->asXML(), 200)
      ->header('Content-Type', 'text/xml');

输入由上述代码定义的传入网络摘要

<?xml version="1.0"?>
<Response>
    <Receive action="/api/fax/received/file"/>
</Response>

Twilio错误日志(警告消息)

Msg: XML Validation warning
line: 2
parserMessage: Invalid content was found starting with element 'Receive'. One of '{Play
ErrorCode:12200
cols:79
LogLevel:WARN
url:http://......./api/fax/incoming

https://www.twilio.com/docs/api/fax/quickstart#allow-twilio-to-talk-to-your-web-application

https://www.twilio.com/docs/api/twiml/fax/receive

1 个答案:

答案 0 :(得分:1)

Twilio配置不匹配。 我根据@Patrick Q的评论得到了这个问题,我查看了我的号码,其中有10个电话号码,其中几个号码我忘了更改配置如下。我意识到电话号码必须配置为传真号码并解决了我的问题。

我的几个电话号码问题(为传真创建) enter image description here

解决方案(配置传真) enter image description here

谢谢 Patrick Q