diff --git a/bun.lock b/bun.lock index a06d22a..97096e6 100644 --- a/bun.lock +++ b/bun.lock @@ -9,7 +9,7 @@ "@profullstack/affiliates": "^0.1.0", "@profullstack/coinpay-onboard": "^0.2.0", "@profullstack/footer": "^0.2.6", - "@profullstack/group-call": "^0.6.0", + "@profullstack/group-call": "^0.6.1", "@profullstack/hqtui": "^0.11.0", "@profullstack/redeem-credits": "^0.1.0", "@profullstack/voice-agent": "0.1.1", @@ -39,7 +39,7 @@ "@profullstack/footer": ["@profullstack/footer@0.2.6", "", { "peerDependencies": { "react": ">=18" }, "optionalPeers": ["react"], "bin": { "profullstack-footer": "bin/profullstack-footer.js" } }, "sha512-BKwbDszAc7e0mYIBiPjgr/5WS8WyDt8IW718s/zW/8pCWOIB1BGwSNs6fmImRSo5kqIjQKUVbXp22jZQ5GEipA=="], - "@profullstack/group-call": ["@profullstack/group-call@0.6.0", "", {}, "sha512-Ewi1ez8haFmAvSUuQCUBu0wMehH/qd169fEQ4KEI8Q298ZURWbtlz37ZfzoAvC6GYrbaR5sWwHsGzqazWusF9w=="], + "@profullstack/group-call": ["@profullstack/group-call@0.6.1", "", {}, "sha512-3bpTns/QzoUiLHvKRt3X+czH7So9/xNK8QCPs5b9C1CU6bYcpEHpoTmNbLh8JVm1+yCRwrWOvmbYvk0p+cDE0Q=="], "@profullstack/hqtui": ["@profullstack/hqtui@0.11.1", "", { "bin": { "hqtui": "bin/hqtui.mjs" } }, "sha512-c/UzTmiRDjdLZQEO/gdVinUKtx6Q0WBPdixIm90MBTvC3DqFPqpersRs0BIDPS7XVokCSr1DtELI91kj5J1kCg=="], diff --git a/package.json b/package.json index 21cb159..d65a604 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "@profullstack/affiliates": "^0.1.0", "@profullstack/coinpay-onboard": "^0.2.0", "@profullstack/footer": "^0.2.6", - "@profullstack/group-call": "^0.6.0", + "@profullstack/group-call": "^0.6.1", "@profullstack/hqtui": "^0.11.0", "@profullstack/redeem-credits": "^0.1.0", "@profullstack/voice-agent": "0.1.1", diff --git a/src/service.ts b/src/service.ts index 07cb7a1..62492e5 100644 --- a/src/service.ts +++ b/src/service.ts @@ -245,6 +245,10 @@ export class GroupCallService { ...(config.voice ? { voice: config.voice } : {}), ...(config.telnyxVoiceKeyRef ? { voiceSettings: { api_key_ref: config.telnyxVoiceKeyRef } } : {}), maxParticipants: 20, + // Agents identify themselves with *token# on the same keypad used + // for calling a person into the room. Let that fast DTMF sequence + // arrive before the human call-in prompt is spoken. + invitePromptDelayMs: 1200, ...(config.fetch ? { fetch: config.fetch } : {}), onCode: async (code) => { const room = store.room(code) diff --git a/test/app.test.ts b/test/app.test.ts index b87afbb..7af965d 100644 --- a/test/app.test.ts +++ b/test/app.test.ts @@ -262,6 +262,7 @@ describe('agents', () => { expect(liveEvents.some((e) => e.type === 'identify' && e.who === 'riotcoder')).toBe(true) expect(store.events(room.code).map((e) => [e.kind, e.who])).toContainEqual(['identify', 'riotcoder']) expect(telnyx.calls.some((c) => c.path === '/calls')).toBe(false) + expect(telnyx.calls.some((c) => c.body.payload === 'To call someone in, enter their phone number, then press pound. Press star to cancel.')).toBe(false) expect(store.consumeAgentJoinToken(room.code, invite.joinToken)).toBeNull() expect(store.invite(invite.id)?.joinToken).toBe('') })