Skip to content

Instantly share code, notes, and snippets.

@aylarov
Created July 19, 2017 15:49
Show Gist options
  • Save aylarov/48ccf16975e01289276db88b1df36b8b to your computer and use it in GitHub Desktop.
Save aylarov/48ccf16975e01289276db88b1df36b8b to your computer and use it in GitHub Desktop.
Call-Out for ZoomBridge
// Handle commands for PSTN Call-out
// To initiate call-out use the URL that looks as follows: media_session_access_url/CallOut/phonenumber
VoxEngine.addEventListener(AppEvents.HttpRequest, function (e) {
//Logger.write("HTTP REQUEST:");
//Logger.write(e.path);
var path = e.path.split("/"),
num;
if (path[path.length - 2] == "CallOut") {
num = path[path.length - 1];
handleCallOut(num);
return '{"result":"callingto:' + num + '"}';
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment