Skip to content

Instantly share code, notes, and snippets.

@zengfenfei
Created May 22, 2017 03:22
Show Gist options
  • Save zengfenfei/d2323e07b7d0ed31c6b3a1573f59d955 to your computer and use it in GitHub Desktop.
Save zengfenfei/d2323e07b7d0ed31c6b3a1573f59d955 to your computer and use it in GitHub Desktop.
// Builds the url: '/account/~/extension/~/ringout', and make a POST request to it
rc.account().extension().ringout().post({
from: { phoneNumber: 'xxx' },
to: { phoneNumber: 'xxx' },
callerId: { phoneNumber: 'xxx' }
}).then(ringout => {
console.log('Ringout sucess', ringout);
// To check the call status: `rc.account().extension().ringout(ringout.id).get();`
}, e => {
console.error('Fail to ringout', e);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment