@onereach/step-voice 7.0.46-deskphoneintegration.21 → 7.0.46-deskphoneintegration.23
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/dst/Conference Dial.js +22 -2
- package/package.json +1 -1
package/dst/Conference Dial.js
CHANGED
|
@@ -69,9 +69,29 @@ class ConferenceDial extends voice_1.default {
|
|
|
69
69
|
botNumberRaw: this.data.botNumber ?? null,
|
|
70
70
|
sipUser,
|
|
71
71
|
transferTrigger: `in/voice/deskphone/${sipUser}/transfer`,
|
|
72
|
-
accountId: this.helpers.providersAccountId
|
|
72
|
+
accountId: this.helpers.providersAccountId,
|
|
73
|
+
subscribeTarget: this.config.accountId,
|
|
74
|
+
providersAccountId: this.helpers.providersAccountId
|
|
73
75
|
});
|
|
74
|
-
this
|
|
76
|
+
// FIX B: the controller emits this event ACCOUNT-ADDRESSED (`source`/`target = accountId`), so
|
|
77
|
+
// the subscription MUST be session-registered (`this.triggers.on`), NOT session-local
|
|
78
|
+
// (`this.triggers.local`, which only matches events already routed to THIS step's own call
|
|
79
|
+
// session and therefore never receives an externally emitted account-addressed event). This
|
|
80
|
+
// mirrors the working `Wait For Desk-Phone Call.ts` subscription to the sibling `/call` event.
|
|
81
|
+
//
|
|
82
|
+
// ACCOUNT-ADDRESSING SCOPE (the actual delivery gate): the kamailio-controller emits the
|
|
83
|
+
// transfer event addressed to the RESOLVED DESK-PHONE / FLOW account (fa201fca-…), i.e.
|
|
84
|
+
// `source`/`target = accountId` where `accountId` is the resolved desk-phone account
|
|
85
|
+
// (kamailio-controller/src/deskphone/deskphone-transfer-emit.service.ts:224-233) — the same
|
|
86
|
+
// account voicer stamps on the working sibling `/call` event
|
|
87
|
+
// (voicer/src/providers/thread.ts:131-134). That resolved account is THIS flow's own account,
|
|
88
|
+
// exposed as `this.config.accountId`. A bare-string `.on(...)` registers under the session's
|
|
89
|
+
// PROVIDER account scope (`this.helpers.providersAccountId` = 873c0f61-…), which does NOT match
|
|
90
|
+
// the emit target, so the event is never delivered. We therefore pass the object form with an
|
|
91
|
+
// explicit `target: this.config.accountId` (NOT providersAccountId) so the subscription scope
|
|
92
|
+
// equals the emit target. `allowSsnOn: true` keeps persistent `.on` semantics (suppresses the
|
|
93
|
+
// SDK's on→once auto-downgrade). See voicer/.agents/tasks/post-fixb-completion-verification.md Q5.
|
|
94
|
+
this.triggers.on({ name: `in/voice/deskphone/${sipUser}/transfer`, target: this.config.accountId, allowSsnOn: true }, async (event) => {
|
|
75
95
|
const target = event.params.target;
|
|
76
96
|
const replaces = event.params.replaces;
|
|
77
97
|
this.log.info('deskphone:trace:xfer condial-subscribe event received', {
|