Samples for VoicePulse FIVE CallCode feature
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
NotifyHipChat.js
NotifyPushBullet.js
NotifySlack.js
NotifyZapier.js
README.md
Requestbin.js
ZendeskContactToSlack.js

README.md

CallCodeSamples

This repository contains sample code for the VoicePulse FIVE CallCode feature.

Getting Started with CallCode

CallCode apps are written in standard Node.js. Every CallCode app needs a function defined as follows:

exports.onCallStarted = function (data, context) {
  // your code goes here
  context.done();
};

The data object contains information about the phone call that triggered your CallCode app. This is how it looks in JSON:

{  
  "from":"17325551212",
  "to":"16095551000"
}

PLEASE NOTE: The from field is based on the Caller ID sent to VoicePulse, so its format is not guaranteed. For US numbers it may (or may not) have a leading 1 before the area code, and may (or may not) have a + in front of the 1. As of 2015-08-21 the format of to is also not guaranteed, but we will release an update in the very near future to normalize it to 11 digits.

The context.done callback function takes no data, it is simply to inform us that you are done processing the call to minimize the number of CPU cycles you use.

Several Node.js modules are available to you, notably http and https. See the examples in this repository for some great ideas on how you can use these modules in your CallCode app to connect your VoicePulse FIVE gateway to any web service offering webhook integration.