@memberjunction/telephony-adapters 6.2.0-edge.2 → 6.2.0-edge.3
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/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/dist/resolvers/LiveKitSipResolver.d.ts +21 -0
- package/dist/resolvers/LiveKitSipResolver.d.ts.map +1 -0
- package/dist/resolvers/LiveKitSipResolver.js +87 -0
- package/dist/resolvers/LiveKitSipResolver.js.map +1 -0
- package/dist/resolvers/RingCentralTelephonyResolver.d.ts.map +1 -1
- package/dist/resolvers/RingCentralTelephonyResolver.js +4 -1
- package/dist/resolvers/RingCentralTelephonyResolver.js.map +1 -1
- package/dist/resolvers/TelephonyResolver.d.ts.map +1 -1
- package/dist/resolvers/TelephonyResolver.js +4 -1
- package/dist/resolvers/TelephonyResolver.js.map +1 -1
- package/dist/resolvers/VonageTelephonyResolver.d.ts.map +1 -1
- package/dist/resolvers/VonageTelephonyResolver.js +4 -1
- package/dist/resolvers/VonageTelephonyResolver.js.map +1 -1
- package/dist/resolvers/index.d.ts +1 -0
- package/dist/resolvers/index.d.ts.map +1 -1
- package/dist/resolvers/index.js +1 -0
- package/dist/resolvers/index.js.map +1 -1
- package/dist/server-extensions/LiveKitSipExtension.d.ts +14 -0
- package/dist/server-extensions/LiveKitSipExtension.d.ts.map +1 -0
- package/dist/server-extensions/LiveKitSipExtension.js +93 -0
- package/dist/server-extensions/LiveKitSipExtension.js.map +1 -0
- package/dist/server-extensions/RingCentralTelephonyExtension.d.ts.map +1 -1
- package/dist/server-extensions/RingCentralTelephonyExtension.js +8 -2
- package/dist/server-extensions/RingCentralTelephonyExtension.js.map +1 -1
- package/dist/server-extensions/TwilioTelephonyExtension.d.ts.map +1 -1
- package/dist/server-extensions/TwilioTelephonyExtension.js +10 -4
- package/dist/server-extensions/TwilioTelephonyExtension.js.map +1 -1
- package/dist/server-extensions/VonageTelephonyExtension.d.ts.map +1 -1
- package/dist/server-extensions/VonageTelephonyExtension.js +8 -4
- package/dist/server-extensions/VonageTelephonyExtension.js.map +1 -1
- package/dist/telephony/LiveKitSipRouter.d.ts +26 -0
- package/dist/telephony/LiveKitSipRouter.d.ts.map +1 -0
- package/dist/telephony/LiveKitSipRouter.js +62 -0
- package/dist/telephony/LiveKitSipRouter.js.map +1 -0
- package/dist/telephony/LiveKitSipTelephonyService.d.ts +130 -0
- package/dist/telephony/LiveKitSipTelephonyService.d.ts.map +1 -0
- package/dist/telephony/LiveKitSipTelephonyService.js +453 -0
- package/dist/telephony/LiveKitSipTelephonyService.js.map +1 -0
- package/dist/telephony/RingCentralTelephonyService.d.ts +57 -8
- package/dist/telephony/RingCentralTelephonyService.d.ts.map +1 -1
- package/dist/telephony/RingCentralTelephonyService.js +137 -77
- package/dist/telephony/RingCentralTelephonyService.js.map +1 -1
- package/dist/telephony/TwilioTelephonyRouter.d.ts +36 -6
- package/dist/telephony/TwilioTelephonyRouter.d.ts.map +1 -1
- package/dist/telephony/TwilioTelephonyRouter.js +150 -54
- package/dist/telephony/TwilioTelephonyRouter.js.map +1 -1
- package/dist/telephony/TwilioTelephonyService.d.ts +64 -16
- package/dist/telephony/TwilioTelephonyService.d.ts.map +1 -1
- package/dist/telephony/TwilioTelephonyService.js +151 -77
- package/dist/telephony/TwilioTelephonyService.js.map +1 -1
- package/dist/telephony/VonageTelephonyRouter.d.ts +29 -1
- package/dist/telephony/VonageTelephonyRouter.d.ts.map +1 -1
- package/dist/telephony/VonageTelephonyRouter.js +84 -72
- package/dist/telephony/VonageTelephonyRouter.js.map +1 -1
- package/dist/telephony/VonageTelephonyService.d.ts +66 -8
- package/dist/telephony/VonageTelephonyService.d.ts.map +1 -1
- package/dist/telephony/VonageTelephonyService.js +152 -67
- package/dist/telephony/VonageTelephonyService.js.map +1 -1
- package/dist/telephony/agentIdentityLookup.d.ts +30 -0
- package/dist/telephony/agentIdentityLookup.d.ts.map +1 -0
- package/dist/telephony/agentIdentityLookup.js +129 -0
- package/dist/telephony/agentIdentityLookup.js.map +1 -0
- package/dist/telephony/callEndObserver.d.ts +47 -0
- package/dist/telephony/callEndObserver.d.ts.map +1 -0
- package/dist/telephony/callEndObserver.js +95 -0
- package/dist/telephony/callEndObserver.js.map +1 -0
- package/dist/telephony/callLifecycleTracker.d.ts +83 -0
- package/dist/telephony/callLifecycleTracker.d.ts.map +1 -0
- package/dist/telephony/callLifecycleTracker.js +155 -0
- package/dist/telephony/callLifecycleTracker.js.map +1 -0
- package/dist/telephony/callerIdentity.d.ts +65 -0
- package/dist/telephony/callerIdentity.d.ts.map +1 -0
- package/dist/telephony/callerIdentity.js +72 -0
- package/dist/telephony/callerIdentity.js.map +1 -0
- package/dist/telephony/handoffDestinations.d.ts +57 -0
- package/dist/telephony/handoffDestinations.d.ts.map +1 -0
- package/dist/telephony/handoffDestinations.js +78 -0
- package/dist/telephony/handoffDestinations.js.map +1 -0
- package/dist/telephony/index.d.ts +21 -0
- package/dist/telephony/index.d.ts.map +1 -1
- package/dist/telephony/index.js +23 -0
- package/dist/telephony/index.js.map +1 -1
- package/dist/telephony/interactionLifecycle.d.ts +100 -0
- package/dist/telephony/interactionLifecycle.d.ts.map +1 -0
- package/dist/telephony/interactionLifecycle.js +338 -0
- package/dist/telephony/interactionLifecycle.js.map +1 -0
- package/dist/telephony/livekit-sip-runtime.d.ts +12 -0
- package/dist/telephony/livekit-sip-runtime.d.ts.map +1 -0
- package/dist/telephony/livekit-sip-runtime.js +21 -0
- package/dist/telephony/livekit-sip-runtime.js.map +1 -0
- package/dist/telephony/mediaSocketAuth.d.ts +77 -0
- package/dist/telephony/mediaSocketAuth.d.ts.map +1 -0
- package/dist/telephony/mediaSocketAuth.js +136 -0
- package/dist/telephony/mediaSocketAuth.js.map +1 -0
- package/dist/telephony/numberPoolSelector.d.ts +62 -0
- package/dist/telephony/numberPoolSelector.d.ts.map +1 -0
- package/dist/telephony/numberPoolSelector.js +201 -0
- package/dist/telephony/numberPoolSelector.js.map +1 -0
- package/dist/telephony/outboundCallPolicy.d.ts +226 -0
- package/dist/telephony/outboundCallPolicy.d.ts.map +1 -0
- package/dist/telephony/outboundCallPolicy.js +364 -0
- package/dist/telephony/outboundCallPolicy.js.map +1 -0
- package/dist/telephony/roomCallSession.d.ts +136 -0
- package/dist/telephony/roomCallSession.d.ts.map +1 -0
- package/dist/telephony/roomCallSession.js +359 -0
- package/dist/telephony/roomCallSession.js.map +1 -0
- package/dist/telephony/roomCallTools.d.ts +99 -0
- package/dist/telephony/roomCallTools.d.ts.map +1 -0
- package/dist/telephony/roomCallTools.js +255 -0
- package/dist/telephony/roomCallTools.js.map +1 -0
- package/dist/telephony/runAsIdentity.d.ts +62 -0
- package/dist/telephony/runAsIdentity.d.ts.map +1 -0
- package/dist/telephony/runAsIdentity.js +89 -0
- package/dist/telephony/runAsIdentity.js.map +1 -0
- package/dist/telephony/sipTrunkCarrier.d.ts +100 -0
- package/dist/telephony/sipTrunkCarrier.d.ts.map +1 -0
- package/dist/telephony/sipTrunkCarrier.js +118 -0
- package/dist/telephony/sipTrunkCarrier.js.map +1 -0
- package/dist/telephony/teamsAcsMediaRegistry.d.ts.map +1 -1
- package/dist/telephony/teamsAcsMediaRegistry.js +3 -2
- package/dist/telephony/teamsAcsMediaRegistry.js.map +1 -1
- package/dist/telephony/telephonyCallSession.d.ts +130 -0
- package/dist/telephony/telephonyCallSession.d.ts.map +1 -0
- package/dist/telephony/telephonyCallSession.js +315 -0
- package/dist/telephony/telephonyCallSession.js.map +1 -0
- package/dist/telephony/telephonyCallTools.d.ts +112 -0
- package/dist/telephony/telephonyCallTools.d.ts.map +1 -0
- package/dist/telephony/telephonyCallTools.js +269 -0
- package/dist/telephony/telephonyCallTools.js.map +1 -0
- package/dist/telephony/telephonyCapacity.d.ts +63 -0
- package/dist/telephony/telephonyCapacity.d.ts.map +1 -0
- package/dist/telephony/telephonyCapacity.js +94 -0
- package/dist/telephony/telephonyCapacity.js.map +1 -0
- package/dist/telephony/telephonySettings.d.ts +40 -0
- package/dist/telephony/telephonySettings.d.ts.map +1 -0
- package/dist/telephony/telephonySettings.js +69 -0
- package/dist/telephony/telephonySettings.js.map +1 -0
- package/dist/telephony/twilioMediaRegistry.d.ts +83 -11
- package/dist/telephony/twilioMediaRegistry.d.ts.map +1 -1
- package/dist/telephony/twilioMediaRegistry.js +145 -22
- package/dist/telephony/twilioMediaRegistry.js.map +1 -1
- package/dist/telephony/vonageMediaRegistry.d.ts +96 -2
- package/dist/telephony/vonageMediaRegistry.d.ts.map +1 -1
- package/dist/telephony/vonageMediaRegistry.js +227 -26
- package/dist/telephony/vonageMediaRegistry.js.map +1 -1
- package/dist/telephony/webhookParams.d.ts +21 -0
- package/dist/telephony/webhookParams.d.ts.map +1 -0
- package/dist/telephony/webhookParams.js +45 -0
- package/dist/telephony/webhookParams.js.map +1 -0
- package/dist/types.d.ts +90 -7
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +16 -13
|
@@ -12,7 +12,7 @@ import { RegisterClass } from '@memberjunction/global';
|
|
|
12
12
|
import { LogStatus } from '@memberjunction/core';
|
|
13
13
|
import cors from 'cors';
|
|
14
14
|
import { BaseServerExtension, } from '@memberjunction/server-extensions-core';
|
|
15
|
-
import { createVonageTelephonyHandler, VONAGE_TELEPHONY_MOUNT_PATH, VONAGE_MEDIA_WSS_PATH, SetVonageTelephonyService, } from '../telephony/index.js';
|
|
15
|
+
import { createVonageTelephonyHandler, VONAGE_TELEPHONY_MOUNT_PATH, VONAGE_MEDIA_WSS_PATH, SetVonageTelephonyService, BuildCallbackUrl, ReadSharedTelephonySettings, ResolveOnMachine, } from '../telephony/index.js';
|
|
16
16
|
let VonageTelephonyExtension = class VonageTelephonyExtension extends BaseServerExtension {
|
|
17
17
|
constructor() {
|
|
18
18
|
super(...arguments);
|
|
@@ -32,6 +32,8 @@ let VonageTelephonyExtension = class VonageTelephonyExtension extends BaseServer
|
|
|
32
32
|
Message: 'Vonage telephony is not configured (missing mediaPublicUrl)',
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
|
+
const rootPath = context.config.RootPath || VONAGE_TELEPHONY_MOUNT_PATH;
|
|
36
|
+
const publicUrl = context.publicUrl || 'http://localhost:4000';
|
|
35
37
|
const config = {
|
|
36
38
|
applicationId: rawSettings.applicationId,
|
|
37
39
|
privateKey: rawSettings.privateKey,
|
|
@@ -39,11 +41,12 @@ let VonageTelephonyExtension = class VonageTelephonyExtension extends BaseServer
|
|
|
39
41
|
apiSecret: rawSettings.apiSecret,
|
|
40
42
|
mediaPublicUrl: rawSettings.mediaPublicUrl,
|
|
41
43
|
signatureSecret: rawSettings.signatureSecret,
|
|
42
|
-
|
|
44
|
+
// Outbound calls report lifecycle events back to the route this extension mounts; an explicit setting wins.
|
|
45
|
+
eventUrl: rawSettings.eventUrl ?? BuildCallbackUrl(publicUrl, rootPath, '/event'),
|
|
46
|
+
onMachine: ResolveOnMachine(rawSettings.onMachine),
|
|
47
|
+
...ReadSharedTelephonySettings(rawSettings),
|
|
43
48
|
};
|
|
44
49
|
this.config = config;
|
|
45
|
-
const rootPath = context.config.RootPath || VONAGE_TELEPHONY_MOUNT_PATH;
|
|
46
|
-
const publicUrl = context.publicUrl || 'http://localhost:4000';
|
|
47
50
|
const handler = createVonageTelephonyHandler(publicUrl, config);
|
|
48
51
|
this.service = handler.service;
|
|
49
52
|
// Mount public webhook router
|
|
@@ -68,6 +71,7 @@ let VonageTelephonyExtension = class VonageTelephonyExtension extends BaseServer
|
|
|
68
71
|
};
|
|
69
72
|
}
|
|
70
73
|
async Shutdown() {
|
|
74
|
+
this.service?.Dispose();
|
|
71
75
|
SetVonageTelephonyService(undefined);
|
|
72
76
|
this.service = null;
|
|
73
77
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VonageTelephonyExtension.js","sourceRoot":"","sources":["../../src/server-extensions/VonageTelephonyExtension.ts"],"names":[],"mappings":"AAAA;;;GAGG;;;;;;;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EACH,mBAAmB,GAMtB,MAAM,wCAAwC,CAAC;AAEhD,OAAO,EACH,4BAA4B,EAC5B,2BAA2B,EAC3B,qBAAqB,EACrB,yBAAyB,
|
|
1
|
+
{"version":3,"file":"VonageTelephonyExtension.js","sourceRoot":"","sources":["../../src/server-extensions/VonageTelephonyExtension.ts"],"names":[],"mappings":"AAAA;;;GAGG;;;;;;;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EACH,mBAAmB,GAMtB,MAAM,wCAAwC,CAAC;AAEhD,OAAO,EACH,4BAA4B,EAC5B,2BAA2B,EAC3B,qBAAqB,EACrB,yBAAyB,EAEzB,gBAAgB,EAChB,2BAA2B,EAC3B,gBAAgB,GACnB,MAAM,uBAAuB,CAAC;AAGxB,IAAM,wBAAwB,GAA9B,MAAM,wBAAyB,SAAQ,mBAAmB;IAA1D;;QAKK,YAAO,GAAkC,IAAI,CAAC;QAC9C,WAAM,GAAiC,IAAI,CAAC;IA+ExD,CAAC;IApFG,IAAoB,YAAY;QAC5B,OAAO,UAAU,CAAC;IACtB,CAAC;IAKM,KAAK,CAAC,UAAU,CACnB,YAAwC,EACxC,OAA+B;QAE/B,MAAM,OAAO,GAAG,YAAY,CAAC;QAC7B,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,QAAqD,CAAC;QAEzF,IAAI,CAAC,WAAW,EAAE,cAAc,EAAE,CAAC;YAC/B,OAAO;gBACH,OAAO,EAAE,KAAK;gBACd,OAAO,EAAE,IAAI;gBACb,OAAO,EAAE,6DA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S;gBACzB,QAAQ,QAAQ,QAAQ;gBACxB,OAAO,qBAAqB,EAAE;aACjC;YACD,OAAO,EAAE;gBACL,GAAG,EAAE,wBAAwB;gBAC7B,QAAQ,EAAE,OAAO,CAAC,OAAO;aAC5B;SACJ,CAAC;IACN,CAAC;IAEM,KAAK,CAAC,QAAQ;QACjB,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,CAAC;QACxB,yBAAyB,CAAC,SAAS,CAAC,CAAC;QACrC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;IACxB,CAAC;IAEM,KAAK,CAAC,WAAW;QACpB,OAAO;YACH,IAAI,EAAE,0BAA0B;YAChC,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO;YACvB,OAAO,EAAE;gBACL,UAAU,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM;gBACzB,aAAa,EAAE,IAAI,CAAC,MAAM,EAAE,aAAa;aAC5C;SACJ,CAAC;IACN,CAAC;CACJ,CAAA;AArFY,wBAAwB;IADpC,aAAa,CAAC,mBAAmB,EAAE,0BAA0B,CAAC;GAClD,wBAAwB,CAqFpC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Express wiring for the LiveKit SIP ingress.
|
|
3
|
+
*
|
|
4
|
+
* One public surface: `POST <mount>/webhook`, the URL configured as a webhook on the LiveKit project. LiveKit cannot present
|
|
5
|
+
* an MJ JWT, so the webhook's own signature is the gate: the request body is verified against the project's API secret before
|
|
6
|
+
* anything is read from it, and a body that does not verify is refused. A verified event is acknowledged at once and handled
|
|
7
|
+
* in the background (LiveKit retries a webhook that is slow to answer, and starting an agent takes seconds).
|
|
8
|
+
*
|
|
9
|
+
* The route reads the RAW body: the signature covers the exact bytes LiveKit sent, so a parsed-and-reserialised JSON body
|
|
10
|
+
* would never verify.
|
|
11
|
+
*
|
|
12
|
+
* @module @memberjunction/telephony-adapters
|
|
13
|
+
*/
|
|
14
|
+
import { Router, type Request, type Response } from 'express';
|
|
15
|
+
import type { LiveKitWebhookParser } from '@memberjunction/livekit-room-server';
|
|
16
|
+
import type { LiveKitSipSettings } from '../types.js';
|
|
17
|
+
import type { LiveKitSipTelephonyService } from './LiveKitSipTelephonyService.js';
|
|
18
|
+
/** The mount path for the LiveKit SIP public router. */
|
|
19
|
+
export declare const LIVEKIT_SIP_MOUNT_PATH = "/telephony/livekit-sip";
|
|
20
|
+
/** What the webhook route needs from the service (a structural subset, so tests inject a fake). */
|
|
21
|
+
export type LiveKitSipServiceLike = Pick<LiveKitSipTelephonyService, 'HandleWebhookEvent' | 'RefuseInboundCall'>;
|
|
22
|
+
/** Creates the public router carrying the webhook route. */
|
|
23
|
+
export declare function CreateLiveKitSipRouter(service: LiveKitSipServiceLike, parser: Pick<LiveKitWebhookParser, 'Parse'>, settings: LiveKitSipSettings): Router;
|
|
24
|
+
/** Handles one webhook delivery: verify, acknowledge, then handle the event in the background. */
|
|
25
|
+
export declare function HandleLiveKitWebhook(service: LiveKitSipServiceLike, parser: Pick<LiveKitWebhookParser, 'Parse'>, settings: LiveKitSipSettings, req: Request, res: Response): Promise<void>;
|
|
26
|
+
//# sourceMappingURL=LiveKitSipRouter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LiveKitSipRouter.d.ts","sourceRoot":"","sources":["../../src/telephony/LiveKitSipRouter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,MAAM,EAAO,KAAK,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEnE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAChF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEtD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAElF,wDAAwD;AACxD,eAAO,MAAM,sBAAsB,2BAA2B,CAAC;AAK/D,mGAAmG;AACnG,MAAM,MAAM,qBAAqB,GAAG,IAAI,CAAC,0BAA0B,EAAE,oBAAoB,GAAG,mBAAmB,CAAC,CAAC;AAEjH,4DAA4D;AAC5D,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,qBAAqB,EAAE,MAAM,EAAE,IAAI,CAAC,oBAAoB,EAAE,OAAO,CAAC,EAAE,QAAQ,EAAE,kBAAkB,GAAG,MAAM,CAMxJ;AAED,kGAAkG;AAClG,wBAAsB,oBAAoB,CACtC,OAAO,EAAE,qBAAqB,EAC9B,MAAM,EAAE,IAAI,CAAC,oBAAoB,EAAE,OAAO,CAAC,EAC3C,QAAQ,EAAE,kBAAkB,EAC5B,GAAG,EAAE,OAAO,EACZ,GAAG,EAAE,QAAQ,GACd,OAAO,CAAC,IAAI,CAAC,CA6Bf"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Express wiring for the LiveKit SIP ingress.
|
|
3
|
+
*
|
|
4
|
+
* One public surface: `POST <mount>/webhook`, the URL configured as a webhook on the LiveKit project. LiveKit cannot present
|
|
5
|
+
* an MJ JWT, so the webhook's own signature is the gate: the request body is verified against the project's API secret before
|
|
6
|
+
* anything is read from it, and a body that does not verify is refused. A verified event is acknowledged at once and handled
|
|
7
|
+
* in the background (LiveKit retries a webhook that is slow to answer, and starting an agent takes seconds).
|
|
8
|
+
*
|
|
9
|
+
* The route reads the RAW body: the signature covers the exact bytes LiveKit sent, so a parsed-and-reserialised JSON body
|
|
10
|
+
* would never verify.
|
|
11
|
+
*
|
|
12
|
+
* @module @memberjunction/telephony-adapters
|
|
13
|
+
*/
|
|
14
|
+
import { Router, raw } from 'express';
|
|
15
|
+
import { LogError } from '@memberjunction/core';
|
|
16
|
+
import { ResolveInboundContext } from './runAsIdentity.js';
|
|
17
|
+
/** The mount path for the LiveKit SIP public router. */
|
|
18
|
+
export const LIVEKIT_SIP_MOUNT_PATH = '/telephony/livekit-sip';
|
|
19
|
+
/** The largest webhook body accepted. LiveKit's events are small; anything near this is not one. */
|
|
20
|
+
const WEBHOOK_BODY_LIMIT = '256kb';
|
|
21
|
+
/** Creates the public router carrying the webhook route. */
|
|
22
|
+
export function CreateLiveKitSipRouter(service, parser, settings) {
|
|
23
|
+
const router = Router();
|
|
24
|
+
router.post('/webhook', raw({ type: () => true, limit: WEBHOOK_BODY_LIMIT }), (req, res) => {
|
|
25
|
+
void HandleLiveKitWebhook(service, parser, settings, req, res);
|
|
26
|
+
});
|
|
27
|
+
return router;
|
|
28
|
+
}
|
|
29
|
+
/** Handles one webhook delivery: verify, acknowledge, then handle the event in the background. */
|
|
30
|
+
export async function HandleLiveKitWebhook(service, parser, settings, req, res) {
|
|
31
|
+
if (!Buffer.isBuffer(req.body)) {
|
|
32
|
+
LogError('[Telephony][LiveKitSip] webhook body was not read as raw bytes; the signature cannot be checked. Is another body parser mounted ahead of this route?');
|
|
33
|
+
res.status(400).end();
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
let event;
|
|
37
|
+
try {
|
|
38
|
+
event = await parser.Parse(req.body.toString('utf8'), req.get('authorization') ?? undefined);
|
|
39
|
+
}
|
|
40
|
+
catch (e) {
|
|
41
|
+
LogError(`[Telephony][LiveKitSip] rejected a webhook that did not verify: ${e instanceof Error ? e.message : String(e)}`);
|
|
42
|
+
res.status(401).end();
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
res.status(200).end();
|
|
46
|
+
const context = ResolveInboundContext(settings.inboundRunAsUserEmail);
|
|
47
|
+
if (!context.Ok) {
|
|
48
|
+
// Only a new call needs a principal; room_finished and other events are cheap and harmless without one.
|
|
49
|
+
if (event.Event === 'participant_joined' && event.IsSipParticipant) {
|
|
50
|
+
LogError(`[Telephony][LiveKitSip] inbound call in ${event.RoomName} refused: ${context.Reason}`);
|
|
51
|
+
await service.RefuseInboundCall(event);
|
|
52
|
+
}
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
try {
|
|
56
|
+
await service.HandleWebhookEvent(event, context.User, context.Provider);
|
|
57
|
+
}
|
|
58
|
+
catch (e) {
|
|
59
|
+
LogError(`[Telephony][LiveKitSip] handling ${event.Event} for ${event.RoomName} failed: ${e instanceof Error ? e.message : String(e)}`);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=LiveKitSipRouter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LiveKitSipRouter.js","sourceRoot":"","sources":["../../src/telephony/LiveKitSipRouter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,MAAM,EAAE,GAAG,EAA+B,MAAM,SAAS,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAGhD,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAG3D,wDAAwD;AACxD,MAAM,CAAC,MAAM,sBAAsB,GAAG,wBAAwB,CAAC;AAE/D,oGAAoG;AACpG,MAAM,kBAAkB,GAAG,OAAO,CAAC;AAKnC,4DAA4D;AAC5D,MAAM,UAAU,sBAAsB,CAAC,OAA8B,EAAE,MAA2C,EAAE,QAA4B;IAC5I,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC;IACxB,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,GAAG,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,kBAAkB,EAAE,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;QACvF,KAAK,oBAAoB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;IACnE,CAAC,CAAC,CAAC;IACH,OAAO,MAAM,CAAC;AAClB,CAAC;AAED,kGAAkG;AAClG,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACtC,OAA8B,EAC9B,MAA2C,EAC3C,QAA4B,EAC5B,GAAY,EACZ,GAA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I,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC5E,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACT,QAAQ,CAAC,oCAAoC,KAAK,CAAC,KAAK,QAAQ,KAAK,CAAC,QAAQ,YAAY,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAC5I,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Phone calls carried by a SIP trunk and landed in a LiveKit room (inbound and outbound), for MJAPI.
|
|
3
|
+
*
|
|
4
|
+
* Every conversation lives in a LiveKit room. For a phone call the carrier's SIP trunk hands the call to LiveKit SIP, which
|
|
5
|
+
* puts the caller into a room as a participant; MJ's job is everything after that: notice the call (a signed LiveKit webhook
|
|
6
|
+
* says a SIP participant joined a room and which number was dialed), route it (the dialed number resolves to an agent identity
|
|
7
|
+
* row), admit it (run-as principal, call-capacity slot), and put the agent into the room with the call's framing and tools.
|
|
8
|
+
*
|
|
9
|
+
* Because the call is a room, the things that are carrier-specific on Twilio/Vonage/RingCentral are not here: the carrier
|
|
10
|
+
* does not move the call and does not run the agent. A transfer brings someone into the room (see `RoomHandoffEngine`); a
|
|
11
|
+
* hang-up removes the phone leg from the room.
|
|
12
|
+
*
|
|
13
|
+
* Guarantees kept from the carrier path: inbound calls run as the configured least-privilege user and are refused without
|
|
14
|
+
* one; the capacity cap applies and a refused call is hung up; outbound calls pass the same destination policy, rate limit
|
|
15
|
+
* and agent-permission gate as every `Place*Call`; a call is capped at `maxCallSeconds`; the caller-identity hook and the
|
|
16
|
+
* phone framing are the same.
|
|
17
|
+
*
|
|
18
|
+
* Collaborators are injected so the routing and admission logic is unit-tested with fakes. The call itself (a real trunk, a
|
|
19
|
+
* real room) is live-only.
|
|
20
|
+
*
|
|
21
|
+
* @module @memberjunction/telephony-adapters
|
|
22
|
+
*/
|
|
23
|
+
import { IMetadataProvider, UserInfo } from '@memberjunction/core';
|
|
24
|
+
import { AIBridgeEngine } from '@memberjunction/ai-bridge-server';
|
|
25
|
+
import { ResolveRealtimeCoAgentID } from '@memberjunction/ai-agents';
|
|
26
|
+
import { LiveKitAgentRoomCoordinator, LiveKitSipService, RoomHandoffEngine, type LiveKitRoomWebhookEvent } from '@memberjunction/livekit-room-server';
|
|
27
|
+
import type { LiveKitSipSettings } from '../types.js';
|
|
28
|
+
import { type IAgentSessionManager } from '../sessionManager.js';
|
|
29
|
+
import { type ICallerIdentityResolver } from './callerIdentity.js';
|
|
30
|
+
import { type ICallCapacity } from './telephonyCapacity.js';
|
|
31
|
+
import { type OutboundGuardDeps } from './outboundCallPolicy.js';
|
|
32
|
+
import { RoomCallSessionStarter } from './roomCallSession.js';
|
|
33
|
+
/** The part of the bridge engine this service drives (a `Pick` so tests inject a fake). */
|
|
34
|
+
type SipBridgeEngine = Pick<AIBridgeEngine, 'Config' | 'ProviderByDriverClass'>;
|
|
35
|
+
/** The default room-name prefix inbound calls land in. */
|
|
36
|
+
export declare const DEFAULT_LIVEKIT_SIP_ROOM_PREFIX = "call-";
|
|
37
|
+
/** The outcome of an inbound call webhook. */
|
|
38
|
+
export interface LiveKitSipInboundResult {
|
|
39
|
+
/** Whether the event was a new call that was admitted. */
|
|
40
|
+
accepted: boolean;
|
|
41
|
+
/** Why it was not (no agent for the number, at capacity, not a phone call, a repeat). */
|
|
42
|
+
reason?: string;
|
|
43
|
+
/** Set when the call was refused only because the server is at its concurrent-call cap. */
|
|
44
|
+
Busy?: boolean;
|
|
45
|
+
/** Resolves when the agent's session has started (or failed and been cleaned up). Never rejects. Callers ignore it; tests await it. */
|
|
46
|
+
Started?: Promise<void>;
|
|
47
|
+
}
|
|
48
|
+
/** Injectable collaborators (production defaults are wired in the constructor; fakes in tests). */
|
|
49
|
+
export interface LiveKitSipTelephonyServiceDeps {
|
|
50
|
+
sip?: LiveKitSipService;
|
|
51
|
+
engine?: SipBridgeEngine;
|
|
52
|
+
coordinator?: LiveKitAgentRoomCoordinator;
|
|
53
|
+
handoff?: RoomHandoffEngine;
|
|
54
|
+
sessionManager?: IAgentSessionManager;
|
|
55
|
+
coAgentResolver?: typeof ResolveRealtimeCoAgentID;
|
|
56
|
+
callerResolver?: ICallerIdentityResolver;
|
|
57
|
+
capacity?: ICallCapacity;
|
|
58
|
+
canRunAgent?: OutboundGuardDeps['CanRunAgent'];
|
|
59
|
+
/** Overrides the room-call starter (tests). */
|
|
60
|
+
starter?: RoomCallSessionStarter;
|
|
61
|
+
}
|
|
62
|
+
/** Admits and places phone calls over LiveKit SIP. One instance per server. */
|
|
63
|
+
export declare class LiveKitSipTelephonyService {
|
|
64
|
+
private readonly config;
|
|
65
|
+
private readonly sip;
|
|
66
|
+
private readonly engine;
|
|
67
|
+
private readonly coordinator;
|
|
68
|
+
private readonly handoff;
|
|
69
|
+
private readonly capacity;
|
|
70
|
+
private readonly outboundGuard;
|
|
71
|
+
private readonly starter;
|
|
72
|
+
private readonly tracker;
|
|
73
|
+
private readonly roomPrefix;
|
|
74
|
+
/** Rooms already handled as a call (inbound admitted/refused, or placed by us), so a retried webhook or a second phone leg starts nothing. */
|
|
75
|
+
private readonly handledRooms;
|
|
76
|
+
/** The room each live agent session's bridge is in (the lifecycle tracker only knows bridge ids). */
|
|
77
|
+
private readonly roomByBridge;
|
|
78
|
+
constructor(config: LiveKitSipSettings, deps?: LiveKitSipTelephonyServiceDeps);
|
|
79
|
+
/**
|
|
80
|
+
* Startup work that talks to LiveKit: checks the carrier settings, verifies the outbound trunk, and (when
|
|
81
|
+
* `autoProvision` is set) creates the inbound trunk and dispatch rule. Never throws: a LiveKit that is down at boot must
|
|
82
|
+
* not stop the server, and every problem is logged where an operator will read it.
|
|
83
|
+
*/
|
|
84
|
+
Initialize(): Promise<void>;
|
|
85
|
+
/**
|
|
86
|
+
* Handles one LiveKit webhook event. A new SIP participant in a room under the call prefix is an inbound call: it is
|
|
87
|
+
* routed to an agent by the dialed number and admitted, or hung up. Anything else is ignored. Never throws.
|
|
88
|
+
*/
|
|
89
|
+
HandleWebhookEvent(event: LiveKitRoomWebhookEvent, contextUser: UserInfo, provider: IMetadataProvider): Promise<LiveKitSipInboundResult>;
|
|
90
|
+
/** Hangs up a new inbound phone call that cannot be admitted at all (no run-as user). A repeat event for the same room is ignored. */
|
|
91
|
+
RefuseInboundCall(event: LiveKitRoomWebhookEvent): Promise<void>;
|
|
92
|
+
/**
|
|
93
|
+
* Places an OUTBOUND call from an agent identity to a number, after the shared outbound gate (agent permission,
|
|
94
|
+
* destination policy, rate limit, capacity) has authorized it. The agent joins a new room, then the room dials the number.
|
|
95
|
+
*
|
|
96
|
+
* @returns The room the call is in.
|
|
97
|
+
* @throws {OutboundCallRefusedError} when the gate refuses the call (the message is caller-safe).
|
|
98
|
+
*/
|
|
99
|
+
PlaceOutboundCall(agentIdentityId: string, toNumber: string, contextUser: UserInfo, provider: IMetadataProvider): Promise<string>;
|
|
100
|
+
/** Cancels every timer and drops tracked state (server shutdown). */
|
|
101
|
+
Dispose(): void;
|
|
102
|
+
private admitInbound;
|
|
103
|
+
private recordRefusedInteraction;
|
|
104
|
+
/** Starts the inbound agent session; on failure logs, hangs the phone leg up and frees the call's state. Never rejects. */
|
|
105
|
+
private startInboundInBackground;
|
|
106
|
+
private startAndDial;
|
|
107
|
+
/** The call hit its cap (or was ended from outside): stop the agent and hang up the phone leg(s). */
|
|
108
|
+
private stopCall;
|
|
109
|
+
/** Removes every phone (SIP) participant from the room. Best-effort: a leg that is already gone is not an error. */
|
|
110
|
+
private hangUpPhoneLegs;
|
|
111
|
+
/** Removes one participant (the caller of a refused call). Best-effort. */
|
|
112
|
+
private hangUpLeg;
|
|
113
|
+
private cachedTrunkNumbers?;
|
|
114
|
+
private lastMissRefresh;
|
|
115
|
+
private static readonly TRUNK_CACHE_REFRESH_MIN_INTERVAL_MS;
|
|
116
|
+
private loadTrunkNumbers;
|
|
117
|
+
private refreshTrunkNumbersOnMiss;
|
|
118
|
+
private validateFromNumber;
|
|
119
|
+
/** Gives the handoff engine what only the LiveKit SIP path can: dialing a number into a room, and starting another agent in one. */
|
|
120
|
+
private wireHandoffEngine;
|
|
121
|
+
private checkCarrier;
|
|
122
|
+
private checkOutboundTrunk;
|
|
123
|
+
private provisionInbound;
|
|
124
|
+
/** Resolves the seeded LiveKit provider row. */
|
|
125
|
+
private resolveProvider;
|
|
126
|
+
/** Remembers a room as handled; returns false when it already was. Bounded so a long-running server cannot grow without limit. */
|
|
127
|
+
private claimRoom;
|
|
128
|
+
}
|
|
129
|
+
export {};
|
|
130
|
+
//# sourceMappingURL=LiveKitSipTelephonyService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LiveKitSipTelephonyService.d.ts","sourceRoot":"","sources":["../../src/telephony/LiveKitSipTelephonyService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,OAAO,EAAE,iBAAiB,EAAuB,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAExF,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAErE,OAAO,EACH,2BAA2B,EAC3B,iBAAiB,EAEjB,iBAAiB,EAEjB,KAAK,uBAAuB,EAE/B,MAAM,qCAAqC,CAAC;AAC7C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAA8B,KAAK,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAE7F,OAAO,EAAgC,KAAK,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AACjG,OAAO,EAA6C,KAAK,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvG,OAAO,EAA2H,KAAK,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAG1L,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAA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