【发布时间】:2021-11-21 23:51:34
【问题描述】:
const accountSid = 'ACf36...'
const authToken = '094...'
const client = require('twilio')(accountSid, authToken)
const VoiceResponse = require('twilio').twiml.VoiceResponse;
client = Client()
twiml = VoiceResponse()
twiml.dial('+912345674127')
call = client.calls.create(
from_ = '+14809078750',
to = '+916395545354',
twiml = str(twiml),
)
console.log(call)
我正在尝试使用此代码和 twilio 的拨号功能进行电话会议。
【问题讨论】:
-
来自 Twilio 的文档:
You can initiate an outbound call by POSTing to the Call resource, creating a new call. You can also initiate a call from an active call (e.g., forwarding to another number or dialing into a conference) by including TwiML’s <Dial> verb in your TwiML application. However, the only way to initiate a call directly from Twilio is with an API request.参考:* twilio.com/docs/voice/api/call-resource * twilio.com/docs/voice/twiml/conference#examples-5