如果我使用Twilio同时拨号:
<Response>
<Dial>
<Client>Jenny</Client>
<Client>Tom</Client>
</Dial>
</Response>
Jenny接着,我怎么以编程方式识别Jenny那个拿起来了?
答案 0 :(得分:3)
给每个客户提供一个答案网址,如下所示
<Response>
<Dial>
<Client url="answer_url.php?client_name=jenny">Jenny</Client>
<Client url="answer_url.php?client_name=tom">Tom</Client>
</Dial>
</Response>
<强> answer_url.php 强>
<Response>
<Say voice="woman">
<?php echo $_REQUEST["client_name"]." has answered call"; ?>
</Say>
</Response>
在接听电话时,answer_url.php将在连接到客户端之前执行。