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 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南