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.

S_Ali
已提问 1 年前378 查看次数
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.

profile picture
专家
已回答 1 年前
profile pictureAWS
专家
已审核 1 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则