Twilio 음성 사서함을 설정하는 데 도움이 필요합니다. 나는 모든 것을 올바르게 설정했다고 생각하고 누군가가 자신의 음성 메시지를 제출할 때 내 이메일에 음성 메시지를 받고 있지만 사람들이 음성 메시지를 제출하려고 할 때 Twilio가 자동으로 "미안하다. 음성 메일 상자가 있지만 아직 설정되지 않았습니다. "그런 다음 음성 메일을 제출할 수 있습니다. 아무도 내가 왜 Twilio에서이 메시지를 받고 있는지 알려주실 수 있습니까?Twilio에서 음성 메일을 설정하는 데 도움이 필요합니다.
나는 설정 음성 메일 상자 아래와 같이했습니다 :
<Dial>++1xxxxxxxxx</Dial>
<Say voice="woman">Please, leave a message after the tone and press the # when you are finished.</Say>
<Record action="mail.php" method="POST" maxLength="120" playBeep="true" />
그리고 mail.php입니다 : 다음
<?php
/**
* This section ensures that Twilio gets a response.
*/
header('Content-type: text/xml');
echo '<?xml version="1.0" encoding="UTF-8"?>';
echo '<Response></Response>'; //Place the desired response (if any) here.
/**
* This section actually sends the email.
*/
$to = "[email protected]"; // Your email address.
$subject = "Message from {$_REQUEST['From']}";
$message = "You have received a message from {$_REQUEST['From']}.";
$message .= "To listen to this message, please visit this URL: {$_REQUEST['RecordingUrl']}";
$headers = "From: [email protected]"; // Who should it come from?
mail($to, $subject, $message, $headers);