Nirmal
Nirmal

Reputation: 119

VoxImplant with DialogFlow CX Telephony Integration with Background MUSIC Tone

I have been working to integrate DialogFlow CX with VoxImplant Telephony Integration and It works great.

But we experience latency in the conversation response from DialogFlow CX. As we are using DialogFlow CX webhooks which connects to multiple services there always exists some latency. To solve this we decided to play some progress/music tone in the call so that the user knows that something is going on in the backend.

As per the documentation here, https://voximplant.com/docs/references/voxengine/call#startplayback

I tried few options like sendMedia but it disconnected the original call

Would like to know how to play some progress tone/music inbetween the duration of request/response between VoxImplant<=>DialogFlow CX

Upvotes: 2

Views: 363

Answers (1)

Nirmal
Nirmal

Reputation: 119

After multiple conversation with VoxImplant Support team, i was able to finally configure to play background music.

Here the snippet to be used.


conversationParticipant.addEventListener(CCAI.Events.Participant.Response, (e) => {


  if (e.response.recognitionResult?.messageType === "TRANSCRIPT" && e.response.recognitionResult?.isFinal) {
      call.startPlayback(audio_bg_url);
    }


  if (e.response.automatedAgentReply) {
      conversationParticipant.sendMediaTo(call);
    }else{
     
    }

});

Upvotes: 1

Related Questions