mirror of
https://github.com/donl/plivo-node.git
synced 2026-06-30 06:12:08 -06:00
commit
4bc5f0d385
3 changed files with 44 additions and 2 deletions
|
|
@ -1,5 +1,8 @@
|
|||
# Change Log
|
||||
|
||||
## [4.1.5](https://github.com/plivo/plivo-node/releases/tag/v4.1.5)(2019-11-13)
|
||||
- Add GetInput XML support
|
||||
|
||||
## [4.1.4](https://github.com/plivo/plivo-node/releases/tag/v4.1.4)(2019-11-06)
|
||||
- Add SSML support
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ export class PlivoXMLError extends Error { }
|
|||
*/
|
||||
export function Response() {
|
||||
this.element = 'Response';
|
||||
this.nestables = ['Speak', 'Play', 'GetDigits', 'Record', 'Dial', 'Message',
|
||||
this.nestables = ['Speak', 'Play', 'GetDigits', 'GetInput', 'Record', 'Dial', 'Message',
|
||||
'Redirect', 'Wait', 'Hangup', 'PreAnswer', 'Conference', 'DTMF'];
|
||||
this.valid_attributes = [];
|
||||
this.elem = xmlBuilder.begin().ele(this.element);
|
||||
|
|
@ -164,6 +164,31 @@ Response.prototype = {
|
|||
return this.add(new GetDigits(Response), '', attributes);
|
||||
},
|
||||
|
||||
/**
|
||||
* Add a GetInput element
|
||||
* @method
|
||||
* @param {object} attributes
|
||||
* @param {string} [attributes.action]
|
||||
* @param {string} [attributes.method]
|
||||
* @param {string} [attributes.inputType]
|
||||
* @param {number} [attributes.executionTimeout]
|
||||
* @param {number} [attributes.digitEndTimeout]
|
||||
* @param {number} [attributes.speechEndTimeout]
|
||||
* @param {string} [attributes.finishOnKey]
|
||||
* @param {number} [attributes.numDigits]
|
||||
* @param {string} [attributes.speechModel]
|
||||
* @param {string} [attributes.hints]
|
||||
* @param {string} [attributes.language]
|
||||
* @param {string} [attributes.interimSpeechResultsCallback]
|
||||
* @param {string} [attributes.interimSpeechResultsCallbackMethod]
|
||||
* @param {boolean} [attributes.log]
|
||||
* @param {boolean} [attributes.redirect]
|
||||
* @param {string} [attributes.profanityFilter]
|
||||
*/
|
||||
addGetInput: function (attributes) {
|
||||
return this.add(new GetInput(Response), '', attributes);
|
||||
},
|
||||
|
||||
/**
|
||||
* Add a Hangup element
|
||||
* @method
|
||||
|
|
@ -487,6 +512,20 @@ function GetDigits(Response) {
|
|||
}
|
||||
util.inherits(GetDigits, Response);
|
||||
|
||||
/**
|
||||
* GetInput element
|
||||
* @constructor
|
||||
*/
|
||||
function GetInput(Response) {
|
||||
this.element = 'GetInput';
|
||||
this.valid_attributes = ['action', 'method', 'inputType', 'executionTimeout',
|
||||
'digitEndTimeout', 'speechEndTimeout', 'finishOnKey', 'numDigits',
|
||||
'speechModel', 'hints','language', 'interimSpeechResultsCallback',
|
||||
'interimSpeechResultsCallbackMethod', 'log', 'redirect', 'profanityFilter'];
|
||||
this.nestables = ['Speak', 'Play', 'Wait'];
|
||||
}
|
||||
util.inherits(GetInput, Response);
|
||||
|
||||
/**
|
||||
* Hangup element
|
||||
* @constructor
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "plivo",
|
||||
"version": "4.1.4",
|
||||
"version": "4.1.5",
|
||||
"description": "A Node.js SDK to make voice calls and send SMS using Plivo and to generate Plivo XML",
|
||||
"homepage": "https://github.com/plivo/plivo-node",
|
||||
"files": [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue