@fonoster/voice 0.7.56 → 0.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/VoiceResponse.d.ts +3 -3
- package/dist/VoiceResponse.js +3 -3
- package/dist/createSession.js +2 -2
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -127,7 +127,7 @@ new VoiceServer().listen(handler, { port: 3000 })
|
|
|
127
127
|
|
|
128
128
|
### voiceResponse.answer()
|
|
129
129
|
Answer the call. Before running any other verb you
|
|
130
|
-
must run the
|
|
130
|
+
must run the answer command.
|
|
131
131
|
|
|
132
132
|
**Kind**: instance method of [<code>VoiceResponse</code>](#VoiceResponse)
|
|
133
133
|
**Example**
|
|
@@ -224,7 +224,7 @@ Waits for data entry from the user's keypad or from a speech provider.
|
|
|
224
224
|
| options.maxDigits | <code>number</code> | Maximum number of digits to collect. Defaults to 1 |
|
|
225
225
|
| options.timeout | <code>number</code> | Milliseconds to wait before timeout. Defaults to 4000. Use zero for no timeout. |
|
|
226
226
|
| options.finishOnKey | <code>string</code> | Optional last character to wait for. Defaults to '#'. It will not be included in the returned digits |
|
|
227
|
-
| options.source | <code>GatherSource</code> | Where to listen as input source. This option accepts `DTMF` and `SPEECH`. A speech provider must be configure when including the `SPEECH` source. You might
|
|
227
|
+
| options.source | <code>GatherSource</code> | Where to listen as input source. This option accepts `DTMF` and `SPEECH`. A speech provider must be configure when including the `SPEECH` source. You might include both with `SPEECH_AND_DTMF`. Defaults to `SPEECH_AND_DTMF` |
|
|
228
228
|
|
|
229
229
|
**Example**
|
|
230
230
|
```js
|
|
@@ -377,7 +377,7 @@ async function handler (request, response) {
|
|
|
377
377
|
<a name="VoiceResponse+unmute"></a>
|
|
378
378
|
|
|
379
379
|
### voiceResponse.unmute(options)
|
|
380
|
-
|
|
380
|
+
Unmute a call.
|
|
381
381
|
|
|
382
382
|
**Kind**: instance method of [<code>VoiceResponse</code>](#VoiceResponse)
|
|
383
383
|
**See**: mute
|
package/dist/VoiceResponse.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ declare class VoiceResponse {
|
|
|
29
29
|
constructor(request: VoiceRequest, voice: VoiceSessionStreamServer);
|
|
30
30
|
/**
|
|
31
31
|
* Answer the call. Before running any other verb you
|
|
32
|
-
* must run the
|
|
32
|
+
* must run the answer command.
|
|
33
33
|
* @example
|
|
34
34
|
*
|
|
35
35
|
* async function handler (request, response) {
|
|
@@ -98,7 +98,7 @@ declare class VoiceResponse {
|
|
|
98
98
|
* @param {number} options.timeout - Milliseconds to wait before timeout. Defaults to 4000. Use zero for no timeout.
|
|
99
99
|
* @param {string} options.finishOnKey - Optional last character to wait for. Defaults to '#'. It will not be included in the returned digits
|
|
100
100
|
* @param {GatherSource} options.source - Where to listen as input source. This option accepts `DTMF` and `SPEECH`. A speech provider must be configure
|
|
101
|
-
* when including the `SPEECH` source. You might
|
|
101
|
+
* when including the `SPEECH` source. You might include both with `SPEECH_AND_DTMF`. Defaults to `SPEECH_AND_DTMF`
|
|
102
102
|
* @note When including `SPEECH` the default timeout is 10000 (10s).
|
|
103
103
|
* @example
|
|
104
104
|
*
|
|
@@ -215,7 +215,7 @@ declare class VoiceResponse {
|
|
|
215
215
|
*/
|
|
216
216
|
mute(options?: MuteOptions): Promise<void>;
|
|
217
217
|
/**
|
|
218
|
-
*
|
|
218
|
+
* Unmute a call.
|
|
219
219
|
*
|
|
220
220
|
* @param {MuteOptions} options - Options to control the unmute operation
|
|
221
221
|
* @param {MuteDirection} options.direction - The direction to unmute the call (IN, OUT, BOTH). Default is BOTH
|
package/dist/VoiceResponse.js
CHANGED
|
@@ -61,7 +61,7 @@ class VoiceResponse {
|
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
63
63
|
* Answer the call. Before running any other verb you
|
|
64
|
-
* must run the
|
|
64
|
+
* must run the answer command.
|
|
65
65
|
* @example
|
|
66
66
|
*
|
|
67
67
|
* async function handler (request, response) {
|
|
@@ -161,7 +161,7 @@ class VoiceResponse {
|
|
|
161
161
|
* @param {number} options.timeout - Milliseconds to wait before timeout. Defaults to 4000. Use zero for no timeout.
|
|
162
162
|
* @param {string} options.finishOnKey - Optional last character to wait for. Defaults to '#'. It will not be included in the returned digits
|
|
163
163
|
* @param {GatherSource} options.source - Where to listen as input source. This option accepts `DTMF` and `SPEECH`. A speech provider must be configure
|
|
164
|
-
* when including the `SPEECH` source. You might
|
|
164
|
+
* when including the `SPEECH` source. You might include both with `SPEECH_AND_DTMF`. Defaults to `SPEECH_AND_DTMF`
|
|
165
165
|
* @note When including `SPEECH` the default timeout is 10000 (10s).
|
|
166
166
|
* @example
|
|
167
167
|
*
|
|
@@ -359,7 +359,7 @@ class VoiceResponse {
|
|
|
359
359
|
});
|
|
360
360
|
}
|
|
361
361
|
/**
|
|
362
|
-
*
|
|
362
|
+
* Unmute a call.
|
|
363
363
|
*
|
|
364
364
|
* @param {MuteOptions} options - Options to control the unmute operation
|
|
365
365
|
* @param {MuteDirection} options.direction - The direction to unmute the call (IN, OUT, BOTH). Default is BOTH
|
package/dist/createSession.js
CHANGED
|
@@ -37,8 +37,8 @@ function createSession(handler) {
|
|
|
37
37
|
let sessionRef;
|
|
38
38
|
voice.once(common_1.StreamEvent.DATA, (params) => __awaiter(this, void 0, void 0, function* () {
|
|
39
39
|
const { request } = params;
|
|
40
|
-
if (
|
|
41
|
-
sessionRef =
|
|
40
|
+
if (request) {
|
|
41
|
+
sessionRef = request.sessionRef;
|
|
42
42
|
const response = new VoiceResponse_1.VoiceResponse(request, voice);
|
|
43
43
|
yield handler(request, response);
|
|
44
44
|
resolve();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fonoster/voice",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.4",
|
|
4
4
|
"description": "Voice Server for Fonoster",
|
|
5
5
|
"author": "Pedro Sanders <psanders@fonoster.com>",
|
|
6
6
|
"homepage": "https://github.com/fonoster/fonoster#readme",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"fonoster": "./dist/index.js"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@fonoster/common": "^0.
|
|
25
|
-
"@fonoster/identity": "^0.
|
|
26
|
-
"@fonoster/logger": "^0.
|
|
24
|
+
"@fonoster/common": "^0.8.4",
|
|
25
|
+
"@fonoster/identity": "^0.8.4",
|
|
26
|
+
"@fonoster/logger": "^0.8.4",
|
|
27
27
|
"@grpc/grpc-js": "~1.10.6",
|
|
28
28
|
"deepmerge": "^4.3.1",
|
|
29
29
|
"grpc-health-check": "^2.0.2",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"bugs": {
|
|
45
45
|
"url": "https://github.com/fonoster/fonoster/issues"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "230bf0c9b793e5de49ffeb30ee1bd62226f55cba"
|
|
48
48
|
}
|