スキップしてコンテンツを表示

Mocking an Inbound call event in amazon connect

0

I tried to mock an inbound call event for amazon connect. I have tried with following code.

const mockEvent = {
      Details: {
        ContactData: {
          ContactId: "30435683-7566-4dfa-8060-af4cf3295cd2",
          Attributes: {
            "name": "jhon"
          },
          CustomerEndpoint: {
            Address: "<My PhoneNumber>",
            Type: "TELEPHONE_NUMBER"
          }
        }
      }
    };

    // Create a new contact object
    connect.contact((contact) => {
      console.log(`Connected to contact ${contact.getContactId()}`);
    
      contact.onIncoming((incoming) => {
        console.log(`Incoming call from ${incoming.getEndpoint().phoneNumber}`);
    
        // Answer the call
        incoming.accept();
      });
    }, mockEvent.Details.ContactData, {
      softphone: {
        allowFramedSoftphone: true
      }
    });

With this code I am unable to initiate an inbound call. Is there any way that we can initiate an inbound call with a button clicked Please mention.

1回答
0

based on the code you provided, it looks like you are using the Amazon Connect Streams API to interact with the contact center.

The Amazon Connect Streams API is primarily used for integrating Amazon Connect with web-based applications and enabling custom real-time voice and chat capabilities. It allows developers to interact with Amazon Connect and perform various operations such as initiating and managing contacts, handling audio and video streams, and managing call routing and queuing.

To initiate an inbound call using Amazon Connect, you will need to use the Amazon Connect Contact Control Panel (CCP) or a third-party tool that integrates with Amazon Connect. You can use the CCP to place an outbound call or simulate an inbound call. However, you cannot initiate an inbound call using the Amazon Connect Streams API alone.

If you want to initiate an inbound call with a button click, you can add a click event listener to your button and use the Amazon Connect CCP or a third-party tool to simulate the inbound call. You can also use the Amazon Connect APIs to initiate the call programmatically.

エキスパート
回答済み 3年前
AWS
エキスパート
レビュー済み 3年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

関連するコンテンツ