TWILIO代码没有调用第二个数字

时间:2014-04-17 22:57:47

标签: twilio twiml

我有以下TWIMlet:

<?php if ($_REQUEST['Digits'] == '1') { ?>
    <Play>ConnectingSupport.wav</Play>
    <Dial callerId="15559998888" action="Call_in.php">
        <Number url="screen_for_machine.php">
        +1555XXXXXXX
        </Number>
        <Number url="screen_for_machine.php">
        +1555YYYYYYY
        </Number>
    </Dial>

<?php } elseif ($_REQUEST['Digits'] == '2') { ?>
    <Play>ConnectingAssociate.wav</Play>
    <Dial callerId="18889990000" action="Call_in.php">
        <Number url="screen_for_machine.php">
        +1555YYYYYYY
        </Number>
        <Number url="screen_for_machine.php">
        +1555XXXXXXX
        </Number>
    </Dial>
<?php } elseif ($_REQUEST['Digits'] == '3') { ?>
    <Play>leavemessage.wav</Play>
    <Record maxLength="180" action="recording.php" />
<?php } ?>

一切都按预期工作,除非他们手机上的#2中的来电键,只调用1555YYYYYYY。如果键入#1,则两个数字(1555XXXXXXX和1555YYYYYYYY)将按预期同时调用。

我错过了什么?非常感谢您的帮助。

1 个答案:

答案 0 :(得分:0)

使用上面的代码,如果一行直接进入语音邮件(即没有接收的手机),那就是一个接听。因此,第二行没有机会响起。

解决方案是将呼叫保持在队列中,然后呼叫每一行并使用“语音邮件”检测。 See details here

为我做更多编码:)这么久。

相关问题