最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

twilio - Playing a custom message to visitor before it joins the conference in twilo - Stack Overflow

programmeradmin14浏览0评论

So here's the situation currently there is conference going on where i have called my client through the twilio number and after that I call the visitor to join him in the conference as well now what i want is when the visitor picks up the call he should first listen to a ivr "This call will be recorded for quality and training purposes" and then the client and visitor should be able to talk. But what's happening is visitor picks up the call and the client gets connected and the ivr isn't played

async callVisitorInConference(callOptions: CallListInstanceCreateOptions) {
        try {
            this.logger.debug(`Calling visitor in conference`);

            const response = new twiml.VoiceResponse();

            response.dial({ answerOnBridge: true }).conference({ startConferenceOnEnter: true, endConferenceOnExit: true }, "my-room");
             response.say(this.voiceSettings, "This call will be recorded for training and quality purposes. "); // not working

            await this.twilio.calls.create({
                from: callOptions.from,
                to: callOptions.to,
                twiml: response.toString(),
            });
            return response.toString();
        } catch (error) {
            this.logger.error(`Error calling visitor in conference`, error);
            throw error;
        }
    }

This is achievable by doing response.dial().number({ url: "www.url/play-visitor-ivr}) this first will play the message to the visitor then the client and visitor gets connected but how to do this with conference.

发布评论

评论列表(0)

  1. 暂无评论