dsfdfdfd6576578 2014-02-26 21:38
浏览 66
已采纳

需要帮助在Twilio上设置语音信箱

I need help to setup Twilio voicemail box. I think I've setup everything correctly and I am getting voice message on my email when someone submit their voice message but when people trying to submit a voice message then Twilio automatically saying "I am sorry, The personal you're trying to calling has a voice mail box but it doesn't setup yet" and then the voice mail can be submit. Can anyone please let me know why I am getting this message from Twilio?

I've setup voice mail box like the below:

<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" />

And the mail.php is:

<?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      = "example@gmail.com"; // 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: voicemail@twimlets.com"; // Who should it come from?

mail($to, $subject, $message, $headers);
  • 写回答

2条回答 默认 最新

  • dongyuan8469 2014-02-28 16:15
    关注

    Twilio evangelist here.

    Twilio executes TwiML in a serial fashion and waits for each TwiML verb to finish before moving to the next. In your case that means Twilio is going to execute the <Dial> verb first and not move on to the <Say> verb until the call you've dialed completes.

    What I suspect is happening is when Twilio dials the phone number your specified in the <Dial> (which I beleive is your own home or cell phone?), its going to your telcos default voicemail system which it looks like you've not set up. When the telco realizes you don't have voicemail set up in their system, they inform the user then terminate the call.

    Once your telco terminates their leg of the call, Twilio then sees that the <Dial> has completed and moves on to execute the <Say> and <Record> verbs.

    I'm not sure there is a way via Twilio to change this behavior. You would likely need to contact your telco and see if they can prevent your number from trying to go to their voicemail system.

    Hope that helps.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 #MATLAB仿真#车辆换道路径规划
  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
  • ¥15 数据可视化Python
  • ¥15 要给毕业设计添加扫码登录的功能!!有偿
  • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘