Created
July 2, 2018 17:43
-
-
Save phm200/4b6d572ae370b7187bdd544f0c94dc99 to your computer and use it in GitHub Desktop.
Transfers via Amazon Connect Streams API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var agent = new lily.Agent(); | |
agent.getEndpoints(agent.getAllQueueARNs(), { | |
success: function(data){ | |
console.log("valid_queue_phone_agent_endpoints", data.endpoints, "You can transfer the call to any of these endpoints"); | |
}, | |
failure:function(){ | |
console.log("failed") | |
} | |
}); | |
agent.getContacts(lily.ContactType.VOICE)[0].addConnection(any_valid_queue_or_phone_or_agent_endpoint, { | |
success: function(data) { | |
alert("transfer success"); | |
}, | |
failure: function(data) { | |
alert("transfer failed"); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment