Skip to content

Instantly share code, notes, and snippets.

@zengfenfei
Created May 22, 2017 03:30
Show Gist options
  • Save zengfenfei/0ade56b38dcf1859e28d5aca42383197 to your computer and use it in GitHub Desktop.
Save zengfenfei/0ade56b38dcf1859e28d5aca42383197 to your computer and use it in GitHub Desktop.
// Builds the url: '/account/~/extension/~/active-calls/', and make a GET request to it
rc.account().extension().activeCalls().list({
page: 1, // Get the 1st page of the result
direction: "Inbound" // Specify the direction of the call, omit to get all directions
}).then(results => {
console.log("Active calls", results.records);
}, e => {
console.error("Fail to get active calls", e);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment