简体   繁体   English

通过 Twilio MMS 发送音频/wav 文件

[英]Sending audio/wav file through Twilio MMS

I have a special case situation, where I'm trying to forward voicemail files that come encoded from a system as type "audio/wav" as an MMS to a phone number using the Twilio SMS/MMS API.我有一个特殊情况,我正在尝试使用 Twilio SMS/MMS API 将从系统编码为“audio/wav”类型的语音邮件文件作为 MMS 转发到电话号码。 I am using PHP 8.0 to try to accomplish this.我正在使用 PHP 8.0 来尝试实现这一点。

I did see that "audio/wav" is not a supported file type, and I confirmed this when trying to send the MMS using the API and the message failed due to the unsupported file type.我确实看到“音频/wav”不是受支持的文件类型,我在尝试使用 API 发送彩信时确认了这一点,但由于文件类型不受支持,消息失败。

Msg "Attempt to retrieve MediaUrl returned an unsupported Content-Type."
EmailNotification   "false"
contentType "audio/wav"
url "https://URL/test.wav"
LogLevel    "ERROR"
  1. I'm wondering if anyone has come up with a workaround for this issue, or knows of possible solutions.我想知道是否有人提出了解决此问题的方法,或者知道可能的解决方案。

  2. Are audio/wav not supported, because carriers don't support this format as mms?不支持音频/wav,因为运营商不支持这种格式作为 mms?

As per the docs WAV is supported根据文档 WAV 受支持

Twilio docs Twilio 文档

audio/vnd.wave is a wave media type audio/vnd.wave 是一种波形媒体类型

Wiki source维基来源

In the MMS docs page在 MMS 文档页面中

If the content-type header of your MediaUrl does not match the media at that URL, Twilio will reject the request.如果您的 MediaUrl 的内容类型标头与该 URL 处的媒体不匹配,Twilio 将拒绝该请求。

Make sure you have set the correct content type.确保您设置了正确的内容类型。

Source 资源

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM