Created
October 23, 2015 16:02
-
-
Save dtolb/cc0518ec62a4b6f57fda to your computer and use it in GitHub Desktop.
Create a simple transfer with speak sentence with NodeJS XML
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var xml = require('node-bandwidth').xml; | |
/// Start the XML response | |
var response = new xml.Response(); | |
// Create the sentence | |
var speakSentence = new xml.SpeakSentence({sentence: "Thank you for calling, please wait while we connect you.", | |
voice: "paul", gender: "male", locale: "en_US"}); | |
var transfer = new xml.Transfer({ | |
transferTo: "+19198281234" | |
}); | |
//Push all the XML to the response | |
response.push(speakSentence); | |
response.push(transfer); | |
// Create the xml to send | |
var bxml = response.toXml(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment