@fonoster/voice 0.3.17 → 0.3.18
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/dist/answer/answer.js +1 -1
- package/dist/dial/dial.js +1 -1
- package/dist/dtmf/dtmf.js +1 -1
- package/dist/gather/source_dtmf.js +1 -1
- package/dist/hangup/hangup.js +1 -1
- package/dist/server.js +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +1 -1
- package/package.json +4 -4
package/dist/answer/answer.js
CHANGED
|
@@ -35,7 +35,7 @@ class AnswerVerb extends verb_1.Verb {
|
|
|
35
35
|
resolve();
|
|
36
36
|
pubsub_js_1.default.unsubscribe(token);
|
|
37
37
|
});
|
|
38
|
-
await super.post(
|
|
38
|
+
await super.post("events/user/Answer", (0, utils_1.objectToQString)({
|
|
39
39
|
// WARNING: Harcoded value
|
|
40
40
|
application: "mediacontroller"
|
|
41
41
|
}), {
|
package/dist/dial/dial.js
CHANGED
|
@@ -48,7 +48,7 @@ class DialVerb extends verb_1.Verb {
|
|
|
48
48
|
pubsub_js_1.default.unsubscribe(dialFailedToken);
|
|
49
49
|
pubsub_js_1.default.unsubscribe(statusChangeToken);
|
|
50
50
|
});
|
|
51
|
-
await super.post(
|
|
51
|
+
await super.post("events/user/Dial", (0, utils_1.objectToQString)({
|
|
52
52
|
// WARNING: Harcoded value
|
|
53
53
|
application: "mediacontroller"
|
|
54
54
|
}), {
|
package/dist/dtmf/dtmf.js
CHANGED
|
@@ -37,7 +37,7 @@ class DtmfVerb extends verb_1.Verb {
|
|
|
37
37
|
resolve();
|
|
38
38
|
pubsub_js_1.default.unsubscribe(token);
|
|
39
39
|
});
|
|
40
|
-
await super.post(
|
|
40
|
+
await super.post("events/user/SendDtmf", (0, utils_1.objectToQString)({
|
|
41
41
|
// WARNING: Harcoded value
|
|
42
42
|
application: "mediacontroller"
|
|
43
43
|
}), {
|
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const pubsub_js_1 = __importDefault(require("pubsub-js"));
|
|
7
7
|
const waitForDtmf = async (sessionId, options) => new Promise(async (resolve, reject) => {
|
|
8
|
-
|
|
8
|
+
const token = null;
|
|
9
9
|
try {
|
|
10
10
|
let timer;
|
|
11
11
|
let digits = "";
|
package/dist/hangup/hangup.js
CHANGED
|
@@ -35,7 +35,7 @@ class HangupVerb extends verb_1.Verb {
|
|
|
35
35
|
resolve();
|
|
36
36
|
pubsub_js_1.default.unsubscribe(token);
|
|
37
37
|
});
|
|
38
|
-
await super.post(
|
|
38
|
+
await super.post("events/user/Hangup", (0, utils_1.objectToQString)({
|
|
39
39
|
// WARNING: Harcoded value
|
|
40
40
|
application: "mediacontroller"
|
|
41
41
|
}), {
|
package/dist/server.js
CHANGED
|
@@ -56,7 +56,7 @@ class VoiceServer {
|
|
|
56
56
|
app.listen(port, this.config.bind);
|
|
57
57
|
}
|
|
58
58
|
init() {
|
|
59
|
-
logger_1.default.info(
|
|
59
|
+
logger_1.default.info("initializing voice server");
|
|
60
60
|
app.ws(this.config.base, (ws) => {
|
|
61
61
|
ws.on("message", (msg) => {
|
|
62
62
|
if (Buffer.isBuffer(msg)) {
|
package/dist/utils.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { Verb } from "./verb";
|
|
|
4
4
|
* Takes a json object and creates a query formatted string
|
|
5
5
|
*
|
|
6
6
|
* @param {object} - a one level json object with the query options
|
|
7
|
-
* @
|
|
7
|
+
* @return {string} a string in the form of 'key1=value1&key2=value2&...'
|
|
8
8
|
*/
|
|
9
9
|
export declare const objectToQString: (obj?: any) => string;
|
|
10
10
|
export declare function startMediaTransfer(verb: Verb, sessionId: string): Promise<void>;
|
package/dist/utils.js
CHANGED
|
@@ -10,7 +10,7 @@ const fs_1 = __importDefault(require("fs"));
|
|
|
10
10
|
* Takes a json object and creates a query formatted string
|
|
11
11
|
*
|
|
12
12
|
* @param {object} - a one level json object with the query options
|
|
13
|
-
* @
|
|
13
|
+
* @return {string} a string in the form of 'key1=value1&key2=value2&...'
|
|
14
14
|
*/
|
|
15
15
|
const objectToQString = (obj = {}) => Object.keys(obj)
|
|
16
16
|
.filter((key) => obj[key])
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fonoster/voice",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.18",
|
|
4
4
|
"description": "Voice verbs",
|
|
5
5
|
"author": "Pedro Sanders <psanders@fonoster.com>",
|
|
6
6
|
"homepage": "https://github.com/fonoster/fonoster#readme",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"url": "https://github.com/fonoster/fonoster/issues"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@fonoster/common": "^0.3.
|
|
33
|
-
"@fonoster/logger": "^0.3.
|
|
32
|
+
"@fonoster/common": "^0.3.18",
|
|
33
|
+
"@fonoster/logger": "^0.3.18",
|
|
34
34
|
"@opentelemetry/api": "^1.0.4",
|
|
35
35
|
"@opentelemetry/instrumentation": "^0.27.0",
|
|
36
36
|
"@opentelemetry/instrumentation-express": "^0.27.0",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"pubsub-js": "^1.9.3",
|
|
48
48
|
"sync": "^0.2.5"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "112ca8df92bb2b961d4c8c3a8aabc82f18d6f5d7",
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@types/express": "^4.17.13",
|
|
53
53
|
"@types/pubsub-js": "^1.8.2"
|