Twilio中的活动呼叫列表

时间:2017-08-17 09:13:21

标签: twilio

有没有办法在Twilio中获取帐户的所有正在进行的呼叫列表?

类似的东西:

/2010-04-01/Accounts/{AccountSid}/Calls/List-In-Progress

任何帮助都非常感谢!

1 个答案:

答案 0 :(得分:3)

Twilio开发者传道者在这里。

确实有!当你list calls from the API时,filter by the Status可以https://laracasts.com/discuss/channels/laravel/running-multiple-queue-workers。可用状态包括:排队,响铃,进行中,取消,已完成,失败,忙碌或无应答。

要在Node中执行此操作(我不确定您使用的是哪种语言,但我们之前已在此处讨论过Node!),您可以这样做:

const accountSid = 'your_account_sid';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.calls.each({ status: 'in-progress' }, call =>
  // do something with the call
  console.log(call.sid);
);

让我知道这是否有帮助。

相关问题