First Name | Last Name | URL | Phone |
---|---|---|---|
John | Wang | http://github.com/grokify |
Installation of the RingCentral softphone or mobile phone app is necessary if you wish to use the URI Scheme click-to-dial functionality described below. You can download these here:
Download and install the RingCentral for Desktop softphone
The navigate to the MacOS directory which may be /Applications/RingCentral for Mac.app/Contents/MacOS and add a config.ini file with the following contents:
HttpRegServer = "http://agentconnect.devtest.ringcentral.com"
PlatformServer = "https://platform.devtest.ringcentral.com"
RingCentral for Desktop can support dialing out using the tel or rcmobile URI schemes as follows:
<!-- rcmobile is only used by RingCentral -->
<a href="rcmobile://call?number=16501112222">1-650-111-2222</a>
<!-- tel can be used by may be used by multiple apps -->
<a href="tel:1-650-111-2222">1-650-111-2222</a>
<a href="tel:16501112222">1-650-111-2222</a>
Additionally, for Google Chrome, it may be necessary to execute a JavaScript redirect as follows:
// Use the following for Google Chrome only
var w = (window.parent)?window.parent:window;
w.location.assign('rcmobile://call?number=16501112222');
// For more info, see http://stackoverflow.com/questions/2330545/
For more inforomation on Google Chrome, please see this Stack Overflow link.
function ringOutHelper(rcsdk) {
var t=this;
t.rcsdk = rcsdk;
t.init = function() {
t.platform = t.rcsdk.platform();
var helpers = RingCentral.Helpers;
t.Ringout = helpers.ringout();
t.Utils = helpers.utils;
t.timeout = null; // reference to timeout object
t.ringout = {};
}
t.handleError = function(e) {
console.log("ERROR: " + e);
}
t.create = function(unsavedRingout) {
console.log("CREATE " + JSON.stringify(unsavedRingout));
t.platform
.send(t.Ringout.saveRequest(unsavedRingout))
.then(function(response) {
console.log('RINGOUT_CALL_SUCCESS');
//t.Utils.extend(t.ringout, response.data);
//console.log('Info: First status:', t.ringout.status.callStatus);
//t.timeout = t.Utils.poll(update, 500, t.timeout);
})
.catch(function(e) {
console.log('RINGOUT_ERROR: ' + e.message);
});
}
t.init();
}
t.createRingOut = function(unsavedRingout) {
var roHelper = new ringOutHelper(t.rcSdk);
roHelper.create(unsavedRingout);
return roHelper;
}
}
platform.post('/account/~/extension/~/sms', {
from: {phoneNumber:from}, // Your sms-enabled phone number
to: [
{phoneNumber:to} // Second party's phone number
],
text: text
}).then(function(response) {
console.log('SMS_SEND_Success: ' + response.json().id);
}).catch(function(e) {
console.log('SMS_SEND_Error: ' + e);
});