@fonoster/apiserver 0.7.13 → 0.7.16
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.
|
@@ -36,12 +36,10 @@ function handleStasisStart(params) {
|
|
|
36
36
|
return (_, channel) => __awaiter(this, void 0, void 0, function* () {
|
|
37
37
|
try {
|
|
38
38
|
yield bridge.addChannel({ channel: dialed.id });
|
|
39
|
-
if (
|
|
40
|
-
recordDirection === common_1.DialRecordDirection.BOTH) {
|
|
39
|
+
if ([common_1.DialRecordDirection.IN, common_1.DialRecordDirection.BOTH].includes(recordDirection)) {
|
|
41
40
|
(0, recordChannel_1.recordChannel)(ari, common_1.DialRecordDirection.IN, channel.id);
|
|
42
41
|
}
|
|
43
|
-
if (
|
|
44
|
-
recordDirection === common_1.DialRecordDirection.BOTH) {
|
|
42
|
+
if ([common_1.DialRecordDirection.OUT, common_1.DialRecordDirection.BOTH].includes(recordDirection)) {
|
|
45
43
|
(0, recordChannel_1.recordChannel)(ari, common_1.DialRecordDirection.OUT, dialed.id);
|
|
46
44
|
}
|
|
47
45
|
}
|
|
@@ -31,15 +31,16 @@ exports.recordChannel = recordChannel;
|
|
|
31
31
|
const common_1 = require("@fonoster/common");
|
|
32
32
|
function recordChannel(ari, direction, sessionRef) {
|
|
33
33
|
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
const spy = direction.toLowerCase();
|
|
34
35
|
const channel = yield ari.channels.snoopChannel({
|
|
35
36
|
app: common_1.STASIS_APP_NAME,
|
|
36
37
|
channelId: sessionRef,
|
|
37
|
-
spy
|
|
38
|
+
spy
|
|
38
39
|
});
|
|
39
40
|
return ari.channels.record({
|
|
40
41
|
channelId: channel.id,
|
|
41
42
|
format: common_1.RecordFormat.WAV,
|
|
42
|
-
name: `${sessionRef}_${
|
|
43
|
+
name: `${sessionRef}_${spy}`
|
|
43
44
|
});
|
|
44
45
|
});
|
|
45
46
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fonoster/apiserver",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.16",
|
|
4
4
|
"description": "APIServer for Fonoster",
|
|
5
5
|
"author": "Pedro Sanders <psanders@fonoster.com>",
|
|
6
6
|
"homepage": "https://github.com/fonoster/fonoster#readme",
|
|
@@ -21,12 +21,12 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@deepgram/sdk": "^3.5.1",
|
|
24
|
-
"@fonoster/common": "^0.7.
|
|
25
|
-
"@fonoster/identity": "^0.7.
|
|
26
|
-
"@fonoster/logger": "^0.7.
|
|
27
|
-
"@fonoster/sipnet": "^0.7.
|
|
28
|
-
"@fonoster/streams": "^0.7.
|
|
29
|
-
"@fonoster/types": "^0.7.
|
|
24
|
+
"@fonoster/common": "^0.7.16",
|
|
25
|
+
"@fonoster/identity": "^0.7.16",
|
|
26
|
+
"@fonoster/logger": "^0.7.16",
|
|
27
|
+
"@fonoster/sipnet": "^0.7.16",
|
|
28
|
+
"@fonoster/streams": "^0.7.16",
|
|
29
|
+
"@fonoster/types": "^0.7.16",
|
|
30
30
|
"@google-cloud/speech": "^6.6.0",
|
|
31
31
|
"@google-cloud/text-to-speech": "^5.3.0",
|
|
32
32
|
"@grpc/grpc-js": "~1.10.6",
|
|
@@ -72,5 +72,5 @@
|
|
|
72
72
|
"@types/uuid": "^9.0.8",
|
|
73
73
|
"@types/validator": "^13.12.0"
|
|
74
74
|
},
|
|
75
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "1d2898f38de4690f0b9c2dac5506c2ddaeebedbb"
|
|
76
76
|
}
|