简体   繁体   English

Twilio,使用Rest api通话之间可能会有5分钟的延迟吗?

[英]Twilio, is it possible to have 5 minute delays between a call with Rest api?

I have a sequential dialling app but I want to add 5 minute delays between each call.. I am thinking cron job. 我有一个顺序拨号应用程序,但我想在每次通话之间增加5分钟的延迟。 is this possible? 这可能吗? If so what do I need to do to make this happen? 如果是这样,我需要怎么做才能做到这一点? I have no experience with cron.. 我没有cron的经验。

I would just set up some sort of queue in a database, then every 5 minutes execute a script that reads the next phone number to call from the queue. 我只是在数据库中设置某种队列,然后每隔5分钟执行一个脚本,该脚本从队列中读取下一个要拨打的电话号码。 Running a script every 5 minutes with a cron will look like this: 使用cron每5分钟运行一次脚本,如下所示:

*/5 * * * * php /path/to/call/script.php

I just found sleep function in PHP manual which did just what I needed. 我刚刚在PHP手册中找到了满足我需要的睡眠功能。 Plus its really simple, can't believe not many knew of this. 加上它真的很简单,简直难以置信。

http://php.net/manual/en/function.sleep.php http://php.net/manual/zh/function.sleep.php

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM