可以使用Amazon Connect Streams API发送按键输入。以下是使用JavaScript发送数字1的示例代码:
connect.core.initCCP(containerDiv, {
ccpUrl: "",
loginPopup: true,
// Add an event listener to monitor the agent's state
ccpLoadFlow: function(event) {
// Add a listener for the `fullAgentLayout` event
event.detail.core.agent.addListener("fullAgentLayout", function(agent) {
// Get the agent's softphone object
var softphone = agent.getSoftphone();
// Use the `sendDigits` function to send the digit `1`
softphone.sendDigits("1");
});
}
});