@fonoster/apiserver 0.24.0 → 0.25.0
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/calls/runCallManager.js +3 -1
- package/dist/envs.d.ts +2 -0
- package/dist/envs.js +15 -2
- package/package.json +10 -10
|
@@ -62,7 +62,9 @@ function createCreateCallSubscriber(config) {
|
|
|
62
62
|
extension: common_1.CALL_EXTENSION,
|
|
63
63
|
endpoint: `PJSIP/${envs_1.ASTERISK_TRUNK}/sip:${to}@${envs_1.ASTERISK_SYSTEM_DOMAIN}`,
|
|
64
64
|
timeout,
|
|
65
|
-
variables: Object.assign({ "PJSIP_HEADER(add,X-Call-Ref)": ref, "PJSIP_HEADER(add,X-Dod-Number)": from, "PJSIP_HEADER(add,X-Access-Key-Id)": accessKeyId, "PJSIP_HEADER(add,X-Is-Api-Originated-Type)": "true", CALL_DIRECTION: "peer-to-pstn", INGRESS_NUMBER: from, APP_REF: appRef, METADATA: JSON.stringify(metadata), CALL_REF: ref }, (envs_1.AMD_ENABLED ? { AMD_ENABLED: "true" } : {}))
|
|
65
|
+
variables: Object.assign(Object.assign(Object.assign({ "PJSIP_HEADER(add,X-Call-Ref)": ref, "PJSIP_HEADER(add,X-Dod-Number)": from, "PJSIP_HEADER(add,X-Access-Key-Id)": accessKeyId, "PJSIP_HEADER(add,X-Is-Api-Originated-Type)": "true", CALL_DIRECTION: "peer-to-pstn", INGRESS_NUMBER: from, APP_REF: appRef, METADATA: JSON.stringify(metadata), CALL_REF: ref }, (envs_1.AMD_ENABLED ? { AMD_ENABLED: "true" } : {})), (envs_1.AMD_ENABLED && envs_1.AMD_ENGINE === "ml" ? { AMD_ENGINE: "ml" } : {})), (envs_1.AMD_ENABLED && envs_1.AMD_ENGINE === "ml" && envs_1.AMD_MODE === "full"
|
|
66
|
+
? { AMD_MODE: "full" }
|
|
67
|
+
: {}))
|
|
66
68
|
});
|
|
67
69
|
});
|
|
68
70
|
}
|
package/dist/envs.d.ts
CHANGED
|
@@ -10,6 +10,8 @@ export declare const ASTERISK_TRUNK = "routr";
|
|
|
10
10
|
export declare const CALLS_CREATE_SUBJECT = "calls.create";
|
|
11
11
|
export declare const CALLS_TRACK_CALL_SUBJECT = "calls.track";
|
|
12
12
|
export declare const AMD_ENABLED: boolean;
|
|
13
|
+
export declare const AMD_ENGINE: string;
|
|
14
|
+
export declare const AMD_MODE: string;
|
|
13
15
|
export declare const CLOAK_ENCRYPTION_KEY: string;
|
|
14
16
|
export declare const DEFAULT_NATS_QUEUE_GROUP = "apiserver";
|
|
15
17
|
export declare const HTTP_BRIDGE_PORT: number;
|
package/dist/envs.js
CHANGED
|
@@ -4,8 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
var _a;
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.
|
|
8
|
-
exports.TWILIO_PHONE_NUMBER = exports.TWILIO_AUTH_TOKEN = exports.TWILIO_ACCOUNT_SID = exports.TEMPLATES_DIR = exports.SMTP_SENDER = exports.SMTP_SECURE = exports.SMTP_PORT = exports.SMTP_HOST = exports.SMTP_AUTH_USER = exports.SMTP_AUTH_PASS = void 0;
|
|
7
|
+
exports.ROUTR_DEFAULT_PEER_NAME = exports.ROUTR_DEFAULT_PEER_AOR = exports.ROUTR_API_ENDPOINT = exports.OWNER_PASSWORD = exports.OWNER_NAME = exports.OWNER_EMAIL = exports.NATS_URL = exports.INTEGRATIONS_FILE = exports.INFLUXDB_USERNAME = exports.INFLUXDB_URL = exports.INFLUXDB_TOKEN = exports.INFLUXDB_PASSWORD = exports.INFLUXDB_ORG = exports.AUTHZ_SERVICE_METHODS = exports.AUTHZ_SERVICE_PORT = exports.AUTHZ_SERVICE_HOST = exports.AUTHZ_SERVICE_ENABLED = exports.IDENTITY_DATABASE_URL = exports.IDENTITY_WORKSPACE_INVITE_URL = exports.IDENTITY_WORKSPACE_INVITE_EXPIRATION = exports.IDENTITY_WORKSPACE_INVITE_FAIL_URL = exports.IDENTITY_REFRESH_TOKEN_EXPIRES_IN = exports.IDENTITY_PUBLIC_KEY = exports.IDENTITY_PRIVATE_KEY = exports.IDENTITY_OAUTH2_GITHUB_CLIENT_SECRET = exports.IDENTITY_OAUTH2_GITHUB_CLIENT_ID = exports.IDENTITY_OAUTH2_GITHUB_ENABLED = exports.IDENTITY_TWO_FACTOR_AUTHENTICATION_REQUIRED = exports.IDENTITY_CONTACT_VERIFICATION_REQUIRED = exports.IDENTITY_ISSUER = exports.IDENTITY_ID_TOKEN_EXPIRES_IN = exports.IDENTITY_AUDIENCE = exports.IDENTITY_ACCESS_TOKEN_EXPIRES_IN = exports.HTTP_BRIDGE_PORT = exports.DEFAULT_NATS_QUEUE_GROUP = exports.CLOAK_ENCRYPTION_KEY = exports.AMD_MODE = exports.AMD_ENGINE = exports.AMD_ENABLED = exports.CALLS_TRACK_CALL_SUBJECT = exports.CALLS_CREATE_SUBJECT = exports.ASTERISK_TRUNK = exports.ASTERISK_SYSTEM_DOMAIN = exports.ASTERISK_ARI_USERNAME = exports.ASTERISK_ARI_SECRET = exports.ASTERISK_ARI_PROXY_URL = exports.APP_URL = exports.APISERVER_SIGNALING_SERVER = exports.APISERVER_HOST = exports.APISERVER_BIND_ADDR = void 0;
|
|
8
|
+
exports.TWILIO_PHONE_NUMBER = exports.TWILIO_AUTH_TOKEN = exports.TWILIO_ACCOUNT_SID = exports.TEMPLATES_DIR = exports.SMTP_SENDER = exports.SMTP_SECURE = exports.SMTP_PORT = exports.SMTP_HOST = exports.SMTP_AUTH_USER = exports.SMTP_AUTH_PASS = exports.ROUTR_DEFAULT_PEER_USERNAME = exports.ROUTR_DEFAULT_PEER_PASSWORD = void 0;
|
|
9
9
|
/**
|
|
10
10
|
* Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
|
|
11
11
|
* http://github.com/fonoster/fonoster
|
|
@@ -77,6 +77,19 @@ exports.CALLS_TRACK_CALL_SUBJECT = "calls.track";
|
|
|
77
77
|
// default: when on, the caller hears silence for up to amd.conf's
|
|
78
78
|
// total_analysis_time before the voice application is dispatched.
|
|
79
79
|
exports.AMD_ENABLED = e.APISERVER_AMD_ENABLED === "true";
|
|
80
|
+
// Which detector runs behind AMD_ENABLED: Asterisk's native AMD() heuristic
|
|
81
|
+
// ("native", the default) or the amd sidecar's ONNX classifier ("ml"),
|
|
82
|
+
// selected by asterisk/config/extensions.conf's AMD_ENGINE gate. Either way
|
|
83
|
+
// the verdict lands in the same AMDSTATUS/AMDCAUSE channel variables, so
|
|
84
|
+
// nothing downstream of runCallManager.ts needs to know which one ran.
|
|
85
|
+
exports.AMD_ENGINE = e.APISERVER_AMD_ENGINE === "ml" ? "ml" : "native";
|
|
86
|
+
// Feature flag for the "ml" engine only: "compact" (the default) makes
|
|
87
|
+
// amd report the same native-AMD-compatible AMDSTATUS/AMDCAUSE pair
|
|
88
|
+
// as the "native" engine above, so switching engines never changes what
|
|
89
|
+
// apiserver reads. "full" additionally reports AMDCONFIDENCE/AMDDETECTOR/
|
|
90
|
+
// AMDLATENCYMS and the classifier's own five-way status (HUMAN/MACHINE/
|
|
91
|
+
// VOICEMAIL/IVR/UNKNOWN) — a consumer must opt into "full" to see those.
|
|
92
|
+
exports.AMD_MODE = e.APISERVER_AMD_MODE === "full" ? "full" : "compact";
|
|
80
93
|
// Other configurations
|
|
81
94
|
exports.CLOAK_ENCRYPTION_KEY = e.APISERVER_CLOAK_ENCRYPTION_KEY;
|
|
82
95
|
exports.DEFAULT_NATS_QUEUE_GROUP = "apiserver";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fonoster/apiserver",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.0",
|
|
4
4
|
"description": "APIServer for Fonoster",
|
|
5
5
|
"author": "Pedro Sanders <psanders@fonoster.com>",
|
|
6
6
|
"homepage": "https://github.com/fonoster/fonoster#readme",
|
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@deepgram/sdk": "^3.5.1",
|
|
25
|
-
"@fonoster/authz": "^0.
|
|
26
|
-
"@fonoster/autopilot": "^0.
|
|
27
|
-
"@fonoster/common": "^0.
|
|
28
|
-
"@fonoster/identity": "^0.
|
|
29
|
-
"@fonoster/logger": "^0.
|
|
30
|
-
"@fonoster/sipnet": "^0.
|
|
31
|
-
"@fonoster/streams": "^0.
|
|
32
|
-
"@fonoster/types": "^0.
|
|
25
|
+
"@fonoster/authz": "^0.25.0",
|
|
26
|
+
"@fonoster/autopilot": "^0.25.0",
|
|
27
|
+
"@fonoster/common": "^0.25.0",
|
|
28
|
+
"@fonoster/identity": "^0.25.0",
|
|
29
|
+
"@fonoster/logger": "^0.25.0",
|
|
30
|
+
"@fonoster/sipnet": "^0.25.0",
|
|
31
|
+
"@fonoster/streams": "^0.25.0",
|
|
32
|
+
"@fonoster/types": "^0.25.0",
|
|
33
33
|
"@google-cloud/speech": "^6.6.0",
|
|
34
34
|
"@google-cloud/text-to-speech": "^5.3.0",
|
|
35
35
|
"@grpc/grpc-js": "~1.10.11",
|
|
@@ -76,5 +76,5 @@
|
|
|
76
76
|
"@types/uuid": "^10.0.0",
|
|
77
77
|
"@types/validator": "^13.15.10"
|
|
78
78
|
},
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "3f63a173d31c0dbf2391b1eff907c8880e60614d"
|
|
80
80
|
}
|