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
질문됨 일 년 전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
전문가
답변함 일 년 전
profile pictureAWS
전문가
검토됨 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠