diff --git a/models/bxml/verbs/Connect.ts b/models/bxml/verbs/Connect.ts
index af48eff..19ae2f2 100644
--- a/models/bxml/verbs/Connect.ts
+++ b/models/bxml/verbs/Connect.ts
@@ -3,6 +3,7 @@ import { Endpoint } from './Endpoint';
export interface ConnectAttributes {
eventCallbackUrl?: string;
+ eventFallbackUrl?: string;
}
/**
diff --git a/models/bxml/verbs/Forward.ts b/models/bxml/verbs/Forward.ts
index 05923a2..c411f9d 100644
--- a/models/bxml/verbs/Forward.ts
+++ b/models/bxml/verbs/Forward.ts
@@ -7,6 +7,8 @@ export interface ForwardAttributes {
diversionTreatment?: string;
diversionReason?: string;
uui?: string;
+ privacy?: boolean;
+ callerDisplayName?: string;
}
/**
diff --git a/models/bxml/verbs/Gather.ts b/models/bxml/verbs/Gather.ts
index 027f83e..b3e202e 100644
--- a/models/bxml/verbs/Gather.ts
+++ b/models/bxml/verbs/Gather.ts
@@ -21,6 +21,14 @@ export interface GatherAttributes {
interDigitTimeout?: number;
firstDigitTimeout?: number;
repeatCount?: number;
+ input?: string;
+ hints?: string;
+ language?: string;
+ partialResultCallback?: string;
+ partialResultCallbackMethod?: string;
+ profanityFilter?: boolean;
+ speechModel?: string;
+ speechTimeout?: number;
}
/**
diff --git a/models/bxml/verbs/Record.ts b/models/bxml/verbs/Record.ts
index 0119578..3eff957 100644
--- a/models/bxml/verbs/Record.ts
+++ b/models/bxml/verbs/Record.ts
@@ -19,6 +19,8 @@ export interface RecordAttributes {
maxDuration?: number;
silenceTimeout?: number;
fileFormat?: string;
+ detectLanguage?: boolean;
+ recordingName?: string;
}
/**
diff --git a/models/bxml/verbs/StartRecording.ts b/models/bxml/verbs/StartRecording.ts
index 5878423..1717dfb 100644
--- a/models/bxml/verbs/StartRecording.ts
+++ b/models/bxml/verbs/StartRecording.ts
@@ -11,6 +11,8 @@ export interface StartRecordingAttributes {
tag?: string;
fileFormat?: string;
multiChannel?: boolean;
+ detectLanguage?: boolean;
+ recordingName?: string;
}
/**
diff --git a/models/bxml/verbs/StartTranscription.ts b/models/bxml/verbs/StartTranscription.ts
index 8787efa..6617865 100644
--- a/models/bxml/verbs/StartTranscription.ts
+++ b/models/bxml/verbs/StartTranscription.ts
@@ -10,6 +10,8 @@ export interface StartTranscriptionAttributes {
password?: string
destination?: string;
stabilized?: boolean;
+ detectLanguage?: boolean;
+ preferredLanguages?: string;
}
/**
diff --git a/models/bxml/verbs/Transfer.ts b/models/bxml/verbs/Transfer.ts
index c78f355..21e902e 100644
--- a/models/bxml/verbs/Transfer.ts
+++ b/models/bxml/verbs/Transfer.ts
@@ -19,6 +19,7 @@ export interface TransferAttributes {
tag?: string;
diversionTreatment?: string;
diversionReason?: string;
+ privacy?: boolean;
}
/**
diff --git a/tests/smoke/bxml.test.ts b/tests/smoke/bxml.test.ts
index feaa610..b603c19 100644
--- a/tests/smoke/bxml.test.ts
+++ b/tests/smoke/bxml.test.ts
@@ -72,7 +72,15 @@ describe('BXML Integration Tests', () => {
maxDigits: 1,
interDigitTimeout: 1.1,
firstDigitTimeout: 1.1,
- repeatCount: 1
+ repeatCount: 1,
+ input: 'dtmf_speech',
+ hints: 'yes, no',
+ language: 'en-US',
+ partialResultCallback: 'https://initial.com',
+ partialResultCallbackMethod: 'POST',
+ profanityFilter: true,
+ speechModel: 'default',
+ speechTimeout: 2
};
const speakSentenceAttributes: SpeakSentenceAttributes = {
@@ -99,7 +107,9 @@ describe('BXML Integration Tests', () => {
terminatingDigits: '#',
maxDuration: 2,
silenceTimeout: 2,
- fileFormat: 'wav'
+ fileFormat: 'wav',
+ detectLanguage: true,
+ recordingName: 'initialRecordingName'
};
const sendDtmfAttributes: SendDtmfAttributes = {
@@ -130,7 +140,7 @@ describe('BXML Integration Tests', () => {
const transferAttributes: TransferAttributes = {
transferCallerId: '+19195551234',
- transferCallerDisplayName: 'initialDisplayName',
+ transferCallerDisplayName: 'Anonymous',
callTimeout: 5,
transferCompleteUrl: 'https://initial.com',
transferCompleteMethod: 'POST',
@@ -142,7 +152,8 @@ describe('BXML Integration Tests', () => {
fallbackPassword: 'initialFallbackPassword',
tag: 'initialTag',
diversionTreatment: 'propagate',
- diversionReason: 'user-busy'
+ diversionReason: 'user-busy',
+ privacy: true
};
const phoneNumber = new Bxml.PhoneNumber('+19195551234');
@@ -197,7 +208,9 @@ describe('BXML Integration Tests', () => {
password: 'initialPassword',
tag: 'initialTag',
fileFormat: 'wav',
- multiChannel: true
+ multiChannel: true,
+ detectLanguage: true,
+ recordingName: 'initialRecordingName'
};
const startStreamAttributes: StartStreamAttributes = {
@@ -218,7 +231,9 @@ describe('BXML Integration Tests', () => {
username: 'initialUsername',
password: 'initialPassword',
destination: 'wss://initial.com',
- stabilized: true
+ stabilized: true,
+ detectLanguage: false,
+ preferredLanguages: 'en-US,fr-FR'
};
const stopStreamAttributes: StopStreamAttributes = {
@@ -267,7 +282,9 @@ describe('BXML Integration Tests', () => {
callTimeout: 5,
diversionTreatment: 'propagate',
diversionReason: 'user-busy',
- uui: '93d6f3c0be5845960b744fa28015d8ede84bd1a4;encoding=base64,asdf;encoding=jwt'
+ uui: '93d6f3c0be5845960b744fa28015d8ede84bd1a4;encoding=base64,asdf;encoding=jwt',
+ privacy: true,
+ callerDisplayName: 'Anonymous'
};
const forward = new Bxml.Forward(forwardAttributes);
diff --git a/tests/unit/models/bxml/verbs/Connect.test.ts b/tests/unit/models/bxml/verbs/Connect.test.ts
index fba6b6d..f77ee31 100644
--- a/tests/unit/models/bxml/verbs/Connect.test.ts
+++ b/tests/unit/models/bxml/verbs/Connect.test.ts
@@ -4,14 +4,15 @@ import { Endpoint } from '../../../../../models/bxml/verbs/Endpoint';
describe('Connect', () => {
const attributes: ConnectAttributes = {
- eventCallbackUrl: 'https://example.com/events'
+ eventCallbackUrl: 'https://example.com/events',
+ eventFallbackUrl: 'https://example.com/fallback'
};
const endpoint = new Endpoint('ep-123456');
test('should create a Connect Verb', () => {
const connect = new Connect(attributes);
- const expected = '';
+ const expected = '';
expect(connect).toBeInstanceOf(Connect);
expect(connect).toBeInstanceOf(Verb);
@@ -20,7 +21,7 @@ describe('Connect', () => {
test('should create a Connect Verb with nested Endpoint', () => {
const connect = new Connect(attributes, endpoint);
- const expected = 'ep-123456';
+ const expected = 'ep-123456';
expect(connect).toBeInstanceOf(Connect);
expect(connect).toBeInstanceOf(Verb);
@@ -30,7 +31,7 @@ describe('Connect', () => {
test('should create a Connect Verb with multiple nested Endpoints', () => {
const endpoint2 = new Endpoint('ep-789012');
const connect = new Connect(attributes, [endpoint, endpoint2]);
- const expected = 'ep-123456ep-789012';
+ const expected = 'ep-123456ep-789012';
expect(connect).toBeInstanceOf(Connect);
expect(connect).toBeInstanceOf(Verb);
@@ -39,7 +40,7 @@ describe('Connect', () => {
test('should test the addEndpoints method when no verbs are initially nested', () => {
const connect = new Connect(attributes);
- const expected = 'ep-123456';
+ const expected = 'ep-123456';
connect.addEndpoints(endpoint);
expect(connect.toBxml()).toBe(expected);
diff --git a/tests/unit/models/bxml/verbs/Forward.test.ts b/tests/unit/models/bxml/verbs/Forward.test.ts
index 10c43a5..d165555 100644
--- a/tests/unit/models/bxml/verbs/Forward.test.ts
+++ b/tests/unit/models/bxml/verbs/Forward.test.ts
@@ -8,10 +8,12 @@ describe('Forward', () => {
callTimeout: 5,
diversionTreatment: 'propagate',
diversionReason: 'user-busy',
- uui: '93d6f3c0be5845960b744fa28015d8ede84bd1a4;encoding=base64,asdf;encoding=jwt'
+ uui: '93d6f3c0be5845960b744fa28015d8ede84bd1a4;encoding=base64,asdf;encoding=jwt',
+ privacy: true,
+ callerDisplayName: 'Anonymous'
};
- const expected = '';
+ const expected = '';
test('should create a Forward Verb', () => {
const forward = new Forward(attributes);
diff --git a/tests/unit/models/bxml/verbs/Gather.test.ts b/tests/unit/models/bxml/verbs/Gather.test.ts
index 97dc282..32b8dd2 100644
--- a/tests/unit/models/bxml/verbs/Gather.test.ts
+++ b/tests/unit/models/bxml/verbs/Gather.test.ts
@@ -18,7 +18,15 @@ describe('Gather', () => {
maxDigits: 5,
interDigitTimeout: 5,
firstDigitTimeout: 5,
- repeatCount: 5
+ repeatCount: 5,
+ input: 'dtmf_speech',
+ hints: 'yes,no',
+ language: 'en-US',
+ partialResultCallback: 'https://initial.com',
+ partialResultCallbackMethod: 'POST',
+ profanityFilter: true,
+ speechModel: 'default',
+ speechTimeout: 5
};
const playAudio = new PlayAudio('https://audio.url/audio1.wav');
@@ -26,7 +34,7 @@ describe('Gather', () => {
test('should create a Gather Verb', () => {
const gather = new Gather(attributes);
- const expected = '';
+ const expected = '';
expect(gather).toBeInstanceOf(Gather);
expect(gather).toBeInstanceOf(Verb);
@@ -35,9 +43,9 @@ describe('Gather', () => {
test('should create a Gather Verb with nested PlayAudio and SpeakSentence', () => {
let gather = new Gather(attributes, playAudio);
- const expected = 'https://audio.url/audio1.wav';
- const expectedSingle = 'https://audio.url/audio1.wavHolanodejs speak sentence SSML test';
- const expectedMultiple = 'https://audio.url/audio1.wavHolanodejs speak sentence SSML testHolanodejs speak sentence SSML testhttps://audio.url/audio1.wav';
+ const expected = 'https://audio.url/audio1.wav';
+ const expectedSingle = 'https://audio.url/audio1.wavHolanodejs speak sentence SSML test';
+ const expectedMultiple = 'https://audio.url/audio1.wavHolanodejs speak sentence SSML testHolanodejs speak sentence SSML testhttps://audio.url/audio1.wav';
expect(gather).toBeInstanceOf(Gather);
expect(gather).toBeInstanceOf(Verb);
@@ -52,7 +60,7 @@ describe('Gather', () => {
test('should test the addAudioVerbs method when no verbs are initially nested', () => {
const gather = new Gather(attributes);
- const expected = 'https://audio.url/audio1.wav';
+ const expected = 'https://audio.url/audio1.wav';
gather.addAudioVerbs(playAudio);
expect(gather.toBxml()).toBe(expected);
diff --git a/tests/unit/models/bxml/verbs/Record.test.ts b/tests/unit/models/bxml/verbs/Record.test.ts
index c47b113..b85bfcb 100644
--- a/tests/unit/models/bxml/verbs/Record.test.ts
+++ b/tests/unit/models/bxml/verbs/Record.test.ts
@@ -20,10 +20,12 @@ describe('Record', () => {
terminatingDigits: '5',
maxDuration: 5,
silenceTimeout: 5,
- fileFormat: 'wav'
+ fileFormat: 'wav',
+ detectLanguage: true,
+ recordingName: 'initialRecordingName'
};
- const expected = '';
+ const expected = '';
test('should create a Record Verb', () => {
const record = new Record(attributes);
diff --git a/tests/unit/models/bxml/verbs/StartRecording.test.ts b/tests/unit/models/bxml/verbs/StartRecording.test.ts
index 780064c..0b2d5e3 100644
--- a/tests/unit/models/bxml/verbs/StartRecording.test.ts
+++ b/tests/unit/models/bxml/verbs/StartRecording.test.ts
@@ -12,10 +12,12 @@ describe('StartRecording', () => {
password: 'initialPassword',
tag: 'initialTag',
fileFormat: 'wav',
- multiChannel: true
+ multiChannel: true,
+ detectLanguage: true,
+ recordingName: 'initialRecordingName'
};
- const expected = '';
+ const expected = '';
test('should create a StartRecording Verb', () => {
const startRecording = new StartRecording(attributes);
diff --git a/tests/unit/models/bxml/verbs/StartTranscription.test.ts b/tests/unit/models/bxml/verbs/StartTranscription.test.ts
index 162c5ea..8b2222e 100644
--- a/tests/unit/models/bxml/verbs/StartTranscription.test.ts
+++ b/tests/unit/models/bxml/verbs/StartTranscription.test.ts
@@ -11,7 +11,9 @@ describe('StartTranscription', () => {
username: 'initialUsername',
password: 'initialPassword',
destination: 'https://initial.com',
- stabilized: true
+ stabilized: true,
+ detectLanguage: true,
+ preferredLanguages: 'en-US,es-US'
};
const customParam1 = new CustomParam({ name: 'customParamName1', value: 'customParamValue1' });
@@ -19,7 +21,7 @@ describe('StartTranscription', () => {
test('should create a StartTranscription Verb', () => {
const startTranscription = new StartTranscription(attributes);
- const expected = '';
+ const expected = '';
expect(startTranscription).toBeInstanceOf(StartTranscription);
expect(startTranscription).toBeInstanceOf(Verb);
@@ -28,9 +30,9 @@ describe('StartTranscription', () => {
test('should create a StartTranscription Verb with nested CustomParam', () => {
let startTranscription = new StartTranscription(attributes, customParam1);
- const expected = '';
- const expectedSingle = '';
- const expectedMultiple = '';
+ const expected = '';
+ const expectedSingle = '';
+ const expectedMultiple = '';
expect(startTranscription).toBeInstanceOf(StartTranscription);
expect(startTranscription).toBeInstanceOf(Verb);
@@ -45,7 +47,7 @@ describe('StartTranscription', () => {
test('should test the addCustomParams method method when no verbs are initially nested', () => {
const startTranscription = new StartTranscription(attributes);
- const expected = '';
+ const expected = '';
startTranscription.addCustomParams(customParam1);
expect(startTranscription.toBxml()).toBe(expected);
diff --git a/tests/unit/models/bxml/verbs/Transfer.test.ts b/tests/unit/models/bxml/verbs/Transfer.test.ts
index b086152..39dd95d 100644
--- a/tests/unit/models/bxml/verbs/Transfer.test.ts
+++ b/tests/unit/models/bxml/verbs/Transfer.test.ts
@@ -18,7 +18,8 @@ describe('Transfer', () => {
fallbackPassword: 'initialFallbackPassword',
tag: 'initialTag',
diversionTreatment: 'propagate',
- diversionReason: 'user-busy'
+ diversionReason: 'user-busy',
+ privacy: true
};
const phoneNumber = new PhoneNumber('+19195551234');
@@ -26,7 +27,7 @@ describe('Transfer', () => {
test('should create a Transfer Verb', () => {
const transfer = new Transfer(attributes);
- const expected = '';
+ const expected = '';
expect(transfer).toBeInstanceOf(Transfer);
expect(transfer).toBeInstanceOf(Verb);
@@ -35,9 +36,9 @@ describe('Transfer', () => {
test('should create a Transfer Verb with nested PhoneNumber and SipUri', () => {
let transfer = new Transfer(attributes, phoneNumber);
- const expected = '+19195551234';
- const expectedSingle = '+19195551234sip:1-999-123-4567@voip-provider.example.net';
- const expectedMultiple = '+19195551234sip:1-999-123-4567@voip-provider.example.netsip:1-999-123-4567@voip-provider.example.net+19195551234';
+ const expected = '+19195551234';
+ const expectedSingle = '+19195551234sip:1-999-123-4567@voip-provider.example.net';
+ const expectedMultiple = '+19195551234sip:1-999-123-4567@voip-provider.example.netsip:1-999-123-4567@voip-provider.example.net+19195551234';
expect(transfer).toBeInstanceOf(Transfer);
expect(transfer).toBeInstanceOf(Verb);
@@ -52,7 +53,7 @@ describe('Transfer', () => {
test('should test the addTransferRecipients method method when no verbs are initially nested', () => {
const transfer = new Transfer(attributes);
- const expected = '+19195551234';
+ const expected = '+19195551234';
transfer.addTransferRecipients(phoneNumber);
expect(transfer.toBxml()).toBe(expected);