twilio nodejs回调函数(动作)用于收集

时间:2015-05-28 12:26:26

标签: javascript node.js twilio

我不知道如何在nodejs中执行此代码:

  <?php
    // page located at http://example.com/process_gather.php
    echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
    echo "<Response><Say>You entered " . $_REQUEST['Digits'] . "</Say></Response>";
        ?>

这是教程 我在nodejs中创建frist函数,但对于/process_gather.php,我不知道我们如何在nodejs中回声(回声说)

<?xml version="1.0" encoding="UTF-8"?>
<!-- page located at http://example.com/complex_gather.xml -->
<Response>
    <Gather action="/process_gather.php" method="GET">
        <Say>
            Please enter your account number,
            followed by the pound sign
        </Say>
    </Gather>
    <Say>We didn't receive any input. Goodbye!</Say>
</Response>




  <?php
    // page located at http://example.com/process_gather.php
    echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
    echo "<Response><Say>You entered " . $_REQUEST['Digits'] . "</Say></Response>";
    ?>

1 个答案:

答案 0 :(得分:0)

Twilio传道者在这里。

我建议您查看Twilio Node帮助程序库的TwiML Basics部分。

希望有所帮助。