@jambonz/sdk 0.1.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.
Files changed (39) hide show
  1. package/dist/client/index.cjs +119 -0
  2. package/dist/client/index.cjs.map +1 -0
  3. package/dist/client/index.d.cts +58 -0
  4. package/dist/client/index.d.ts +58 -0
  5. package/dist/client/index.js +115 -0
  6. package/dist/client/index.js.map +1 -0
  7. package/dist/common-Bsqv1Brz.d.cts +69 -0
  8. package/dist/common-Bsqv1Brz.d.ts +69 -0
  9. package/dist/index.cjs +1014 -0
  10. package/dist/index.cjs.map +1 -0
  11. package/dist/index.d.cts +10 -0
  12. package/dist/index.d.ts +10 -0
  13. package/dist/index.js +996 -0
  14. package/dist/index.js.map +1 -0
  15. package/dist/rest-BV_FsqnH.d.cts +97 -0
  16. package/dist/rest-CthGXHnw.d.ts +97 -0
  17. package/dist/types/index.cjs +4 -0
  18. package/dist/types/index.cjs.map +1 -0
  19. package/dist/types/index.d.cts +3 -0
  20. package/dist/types/index.d.ts +3 -0
  21. package/dist/types/index.js +3 -0
  22. package/dist/types/index.js.map +1 -0
  23. package/dist/verb-builder-But-DJle.d.cts +82 -0
  24. package/dist/verb-builder-CO_qoYxC.d.ts +82 -0
  25. package/dist/verbs-B_afNNUM.d.cts +770 -0
  26. package/dist/verbs-B_afNNUM.d.ts +770 -0
  27. package/dist/webhook/index.cjs +320 -0
  28. package/dist/webhook/index.cjs.map +1 -0
  29. package/dist/webhook/index.d.cts +26 -0
  30. package/dist/webhook/index.d.ts +26 -0
  31. package/dist/webhook/index.js +313 -0
  32. package/dist/webhook/index.js.map +1 -0
  33. package/dist/websocket/index.cjs +833 -0
  34. package/dist/websocket/index.cjs.map +1 -0
  35. package/dist/websocket/index.d.cts +179 -0
  36. package/dist/websocket/index.d.ts +179 -0
  37. package/dist/websocket/index.js +822 -0
  38. package/dist/websocket/index.js.map +1 -0
  39. package/package.json +96 -0
@@ -0,0 +1,770 @@
1
+ /**
2
+ * Component types shared across jambonz verbs.
3
+ * These map 1:1 to the JSON schemas in schema/components/.
4
+ */
5
+ /** Authentication credentials for SIP endpoints, websocket connections, etc. */
6
+ interface Auth {
7
+ username: string;
8
+ password: string;
9
+ }
10
+ /**
11
+ * A webhook or websocket callback that jambonz invokes during call processing.
12
+ * Can be a simple URL string or an object with additional options.
13
+ */
14
+ type ActionHook = string | ActionHookObject;
15
+ interface ActionHookObject {
16
+ url: string;
17
+ method?: 'GET' | 'POST';
18
+ basicAuth?: Auth;
19
+ }
20
+ /** Text-to-speech synthesis configuration. */
21
+ interface Synthesizer {
22
+ /** The TTS vendor to use (e.g. 'google', 'aws', 'elevenlabs', 'cartesia', 'deepgram'). */
23
+ vendor: string;
24
+ /** Label identifying a specific credential set for this vendor. */
25
+ label?: string;
26
+ /** Language code in BCP-47 format (e.g. 'en-US'). */
27
+ language?: string;
28
+ /** Voice name or configuration object. */
29
+ voice?: string | Record<string, unknown>;
30
+ /** Backup TTS vendor if the primary fails. */
31
+ fallbackVendor?: string;
32
+ /** Credential label for the fallback vendor. */
33
+ fallbackLabel?: string;
34
+ /** Language code for the fallback vendor. */
35
+ fallbackLanguage?: string;
36
+ /** Voice for the fallback vendor. */
37
+ fallbackVoice?: string | Record<string, unknown>;
38
+ /** Synthesis engine tier. */
39
+ engine?: 'standard' | 'neural' | 'generative' | 'long-form';
40
+ /** Preferred voice gender. */
41
+ gender?: 'MALE' | 'FEMALE' | 'NEUTRAL';
42
+ /** Vendor-specific options passed through to the TTS provider. */
43
+ options?: Record<string, unknown>;
44
+ }
45
+ /** Speech-to-text recognition configuration. */
46
+ interface Recognizer {
47
+ /** The STT vendor to use (e.g. 'google', 'aws', 'deepgram', 'microsoft'). */
48
+ vendor: string;
49
+ /** Label identifying a specific credential set for this vendor. */
50
+ label?: string;
51
+ /** Language code in BCP-47 format. */
52
+ language?: string;
53
+ /** Backup STT vendor if the primary fails. */
54
+ fallbackVendor?: string;
55
+ /** Credential label for the fallback vendor. */
56
+ fallbackLabel?: string;
57
+ /** Language code for the fallback vendor. */
58
+ fallbackLanguage?: string;
59
+ /** Voice activity detection settings. */
60
+ vad?: Vad;
61
+ /** Words or phrases to boost recognition for. */
62
+ hints?: string[];
63
+ /** Boost factor for hint words. */
64
+ hintsBoost?: number;
65
+ /** Additional languages to listen for simultaneously. */
66
+ altLanguages?: string[];
67
+ /** Filter profanity from results. */
68
+ profanityFilter?: boolean;
69
+ /** Return interim (partial) results. */
70
+ interim?: boolean;
71
+ /** Stop after first complete utterance. */
72
+ singleUtterance?: boolean;
73
+ /** Send separate audio channels for each call leg. */
74
+ dualChannel?: boolean;
75
+ /** Independent recognition per audio channel. */
76
+ separateRecognitionPerChannel?: boolean;
77
+ /** Enable automatic punctuation. */
78
+ punctuation?: boolean;
79
+ /** Use enhanced (premium) recognition model. */
80
+ enhancedModel?: boolean;
81
+ /** Include word-level timing. */
82
+ words?: boolean;
83
+ /** Enable speaker diarization. */
84
+ diarization?: boolean;
85
+ /** Minimum speakers expected for diarization. */
86
+ diarizationMinSpeakers?: number;
87
+ /** Maximum speakers expected for diarization. */
88
+ diarizationMaxSpeakers?: number;
89
+ /** Hint about interaction type. */
90
+ interactionType?: 'unspecified' | 'discussion' | 'presentation' | 'phone_call' | 'voicemail' | 'voice_search' | 'voice_command' | 'dictation';
91
+ /** NAICS industry code for domain-specific accuracy. */
92
+ naicsCode?: number;
93
+ /** Identify and label which channel each segment came from. */
94
+ identifyChannels?: boolean;
95
+ /** Custom vocabulary resource name. */
96
+ vocabularyName?: string;
97
+ /** Vocabulary filter name for masking/removing words. */
98
+ vocabularyFilterName?: string;
99
+ /** How filtered words are handled. */
100
+ filterMethod?: 'remove' | 'mask' | 'tag';
101
+ /** Specific recognition model name. */
102
+ model?: string;
103
+ /** Level of detail in results. */
104
+ outputFormat?: 'simple' | 'detailed';
105
+ /** How profanity is handled in results. */
106
+ profanityOption?: 'masked' | 'removed' | 'raw';
107
+ /** Request signal-to-noise ratio info. */
108
+ requestSnr?: boolean;
109
+ /** Milliseconds to wait for initial speech. */
110
+ initialSpeechTimeoutMs?: number;
111
+ /** Custom Azure Speech Services endpoint URL. */
112
+ azureServiceEndpoint?: string;
113
+ /** Azure custom speech endpoint ID. */
114
+ azureSttEndpointId?: string;
115
+ /** DTMF digit that terminates recognition. */
116
+ asrDtmfTerminationDigit?: string;
117
+ /** Max seconds for a complete recognition result. */
118
+ asrTimeout?: number;
119
+ /** Timeout for fast recognition mode. */
120
+ fastRecognitionTimeout?: number;
121
+ /** Minimum confidence score (0-1) to accept a result. */
122
+ minConfidence?: number;
123
+ deepgramOptions?: Record<string, unknown>;
124
+ googleOptions?: Record<string, unknown>;
125
+ awsOptions?: Record<string, unknown>;
126
+ azureOptions?: Record<string, unknown>;
127
+ nuanceOptions?: Record<string, unknown>;
128
+ ibmOptions?: Record<string, unknown>;
129
+ nvidiaOptions?: Record<string, unknown>;
130
+ sonioxOptions?: Record<string, unknown>;
131
+ cobaltOptions?: Record<string, unknown>;
132
+ assemblyAiOptions?: Record<string, unknown>;
133
+ speechmaticsOptions?: Record<string, unknown>;
134
+ openaiOptions?: Record<string, unknown>;
135
+ houndifyOptions?: Record<string, unknown>;
136
+ gladiaOptions?: Record<string, unknown>;
137
+ elevenlabsOptions?: Record<string, unknown>;
138
+ verbioOptions?: Record<string, unknown>;
139
+ customOptions?: Record<string, unknown>;
140
+ }
141
+ /** Call target for the dial verb. */
142
+ interface Target {
143
+ /** Target type. */
144
+ type: 'phone' | 'sip' | 'user' | 'teams';
145
+ /** Phone number in E.164 format. Required for type 'phone'. */
146
+ number?: string;
147
+ /** SIP URI. Required for type 'sip'. */
148
+ sipUri?: string;
149
+ /** Registered user name. Required for type 'user'. */
150
+ name?: string;
151
+ /** Microsoft Teams tenant ID. Required for type 'teams'. */
152
+ tenant?: string;
153
+ /** SIP trunk to route through. */
154
+ trunk?: string;
155
+ /** Webhook for call screening before bridging. */
156
+ confirmHook?: ActionHook;
157
+ /** HTTP method for confirmHook. */
158
+ method?: 'GET' | 'POST';
159
+ /** Custom SIP headers on the outbound INVITE. */
160
+ headers?: Record<string, string>;
161
+ /** Override the From header on outbound SIP. */
162
+ from?: {
163
+ user?: string;
164
+ host?: string;
165
+ };
166
+ /** SIP digest auth credentials. */
167
+ auth?: Auth;
168
+ /** Follow into voicemail if unanswered. */
169
+ vmail?: boolean;
170
+ /** Override the Request-URI. */
171
+ overrideTo?: string;
172
+ /** SIP proxy to route through. */
173
+ proxy?: string;
174
+ }
175
+ /** Voice Activity Detection configuration. */
176
+ interface Vad {
177
+ /** Enable VAD. */
178
+ enable?: boolean;
179
+ /** Milliseconds of voice activity before speech start. */
180
+ voiceMs?: number;
181
+ /** Milliseconds of silence before speech end. */
182
+ silenceMs?: number;
183
+ /** VAD strategy. */
184
+ strategy?: string;
185
+ /** WebRTC VAD aggressiveness (0-3). */
186
+ mode?: number;
187
+ /** VAD engine vendor. */
188
+ vendor?: 'webrtc' | 'silero';
189
+ /** Silero speech detection confidence threshold (0-1). */
190
+ threshold?: number;
191
+ /** Padding in ms before/after detected speech. */
192
+ speechPadMs?: number;
193
+ }
194
+ /** Bidirectional audio streaming configuration. */
195
+ interface BidirectionalAudio {
196
+ /** Enable bidirectional audio. */
197
+ enabled?: boolean;
198
+ /** Stream audio continuously. */
199
+ streaming?: boolean;
200
+ /** Audio sample rate in Hz. */
201
+ sampleRate?: number;
202
+ }
203
+ /** Filler noise configuration for processing pauses. */
204
+ interface FillerNoise {
205
+ /** Enable filler noise. */
206
+ enable: boolean;
207
+ /** URL of the audio file to play. */
208
+ url?: string;
209
+ /** Seconds to wait before starting filler noise. */
210
+ startDelaySecs?: number;
211
+ }
212
+ /** Configuration for handling slow actionHook responses. */
213
+ interface ActionHookDelayAction {
214
+ /** Enable delay handling. */
215
+ enabled?: boolean;
216
+ /** Seconds before executing delay actions. */
217
+ noResponseTimeout?: number;
218
+ /** Total seconds before giving up. */
219
+ noResponseGiveUpTimeout?: number;
220
+ /** Times to retry delay actions. */
221
+ retries?: number;
222
+ /** Verbs to execute while waiting. */
223
+ actions?: Record<string, unknown>[];
224
+ /** Verbs to execute if webhook never responds. */
225
+ giveUpActions?: Record<string, unknown>[];
226
+ }
227
+
228
+ /**
229
+ * Verb types for all 26 jambonz verbs.
230
+ * These map 1:1 to the JSON schemas in schema/verbs/.
231
+ * The Verb discriminated union uses the 'verb' literal as the discriminator.
232
+ */
233
+
234
+ interface SayVerb {
235
+ verb: 'say';
236
+ id?: string;
237
+ /** Text to speak. Array selects one at random. */
238
+ text: string | string[];
239
+ /** Natural language instructions for TTS expression. */
240
+ instructions?: string;
241
+ /** Stream TTS audio incrementally. */
242
+ stream?: boolean;
243
+ /** Repeat count. 0 or 'forever' for indefinite. */
244
+ loop?: number | string;
245
+ /** Override session-level TTS config. */
246
+ synthesizer?: Synthesizer;
247
+ /** Play as early media before answering. */
248
+ earlyMedia?: boolean;
249
+ /** Bypass TTS cache. */
250
+ disableTtsCache?: boolean;
251
+ /** Close TTS stream on empty text. */
252
+ closeStreamOnEmpty?: boolean;
253
+ }
254
+ interface PlayVerb {
255
+ verb: 'play';
256
+ id?: string;
257
+ /** Audio file URL(s). Array plays in sequence. */
258
+ url: string | string[];
259
+ /** Repeat count. 0 or 'forever' for indefinite. */
260
+ loop?: number | string;
261
+ /** Play as early media. */
262
+ earlyMedia?: boolean;
263
+ /** Start playback at this offset in seconds. */
264
+ seekOffset?: number | string;
265
+ /** Max playback duration in seconds. */
266
+ timeoutSecs?: number | string;
267
+ /** Webhook when playback completes. */
268
+ actionHook?: ActionHook;
269
+ }
270
+ interface GatherVerb {
271
+ verb: 'gather';
272
+ id?: string;
273
+ /** Webhook to invoke with collected input. */
274
+ actionHook?: ActionHook;
275
+ /** Input types to accept. */
276
+ input?: ('speech' | 'digits')[];
277
+ /** DTMF key that signals end of input. */
278
+ finishOnKey?: string;
279
+ /** Exact number of digits to collect. */
280
+ numDigits?: number;
281
+ /** Minimum digits required. */
282
+ minDigits?: number;
283
+ /** Maximum digits to collect. */
284
+ maxDigits?: number;
285
+ /** Seconds between digits before input complete. */
286
+ interDigitTimeout?: number;
287
+ /** Seconds of silence after speech. */
288
+ speechTimeout?: number;
289
+ /** Overall timeout in seconds. */
290
+ timeout?: number;
291
+ /** Webhook for interim speech results. */
292
+ partialResultHook?: ActionHook;
293
+ /** Listen for input while prompt plays. */
294
+ listenDuringPrompt?: boolean;
295
+ /** DTMF interrupts playing prompt. */
296
+ dtmfBargein?: boolean;
297
+ /** Speech interrupts playing prompt. */
298
+ bargein?: boolean;
299
+ /** Minimum words before barge-in triggers. */
300
+ minBargeinWordCount?: number;
301
+ /** Override session-level STT config. */
302
+ recognizer?: Recognizer;
303
+ /** Nested say prompt (without 'verb' property). */
304
+ say?: Omit<SayVerb, 'verb'>;
305
+ /** Nested play prompt (without 'verb' property). */
306
+ play?: Omit<PlayVerb, 'verb'>;
307
+ /** Filler noise while waiting for actionHook. */
308
+ fillerNoise?: FillerNoise;
309
+ /** Handle slow actionHook responses. */
310
+ actionHookDelayAction?: ActionHookDelayAction;
311
+ }
312
+ interface LlmVerb {
313
+ verb: 'llm';
314
+ id?: string;
315
+ /** LLM vendor. */
316
+ vendor: string;
317
+ /** Model name. */
318
+ model?: string;
319
+ /** LLM vendor authentication. */
320
+ auth?: {
321
+ apiKey?: string;
322
+ [key: string]: unknown;
323
+ };
324
+ /** Additional connection options (e.g. custom base URLs). */
325
+ connectOptions?: Record<string, unknown>;
326
+ /** LLM configuration including messages, temperature, tools. */
327
+ llmOptions: Record<string, unknown>;
328
+ /** MCP servers for tool invocation. */
329
+ mcpServers?: McpServerConfig[];
330
+ /** Webhook when LLM conversation ends. */
331
+ actionHook?: ActionHook;
332
+ /** Webhook for real-time LLM events. */
333
+ eventHook?: ActionHook;
334
+ /** Webhook when LLM calls a tool. */
335
+ toolHook?: ActionHook;
336
+ /** Event types to receive via eventHook. */
337
+ events?: string[];
338
+ }
339
+ interface McpServerConfig {
340
+ url: string;
341
+ auth?: Record<string, unknown>;
342
+ roots?: Record<string, unknown>[];
343
+ }
344
+ interface PipelineVerb {
345
+ verb: 'pipeline';
346
+ id?: string;
347
+ /** STT configuration. */
348
+ stt: Recognizer;
349
+ /** TTS configuration. */
350
+ tts: Synthesizer;
351
+ /** VAD configuration. */
352
+ vad?: Vad;
353
+ /** Turn detection configuration. */
354
+ turnDetection?: {
355
+ vendor: string;
356
+ threshold?: number;
357
+ eagerEotThreshold?: number;
358
+ };
359
+ /** LLM configuration. */
360
+ llm: Record<string, unknown>;
361
+ /** Pre-establish LLM connection before call starts. */
362
+ preflightLlm?: boolean;
363
+ /** Webhook when pipeline ends. */
364
+ actionHook?: ActionHook;
365
+ /** Webhook for pipeline events. */
366
+ eventHook?: ActionHook;
367
+ }
368
+ interface ListenVerb {
369
+ verb: 'listen';
370
+ id?: string;
371
+ /** Websocket URL to stream audio to. */
372
+ url: string;
373
+ /** Webhook when listen ends. */
374
+ actionHook?: ActionHook;
375
+ /** Websocket auth credentials. */
376
+ wsAuth?: Auth;
377
+ /** Audio channel mixing mode. */
378
+ mixType?: 'mono' | 'stereo' | 'mixed';
379
+ /** Metadata sent with initial connection. */
380
+ metadata?: Record<string, unknown>;
381
+ /** Audio sample rate in Hz. */
382
+ sampleRate?: number;
383
+ /** DTMF key that ends the session. */
384
+ finishOnKey?: string;
385
+ /** Max duration in seconds. */
386
+ maxLength?: number;
387
+ /** Forward DTMF events to websocket. */
388
+ passDtmf?: boolean;
389
+ /** Play beep before streaming. */
390
+ playBeep?: boolean;
391
+ /** Disable receiving audio from websocket. */
392
+ disableBidirectionalAudio?: boolean;
393
+ /** Bidirectional audio configuration. */
394
+ bidirectionalAudio?: BidirectionalAudio;
395
+ /** Inactivity timeout in seconds. */
396
+ timeout?: number;
397
+ /** Simultaneous transcription config. */
398
+ transcribe?: Record<string, unknown>;
399
+ /** Stream before call is answered. */
400
+ earlyMedia?: boolean;
401
+ /** Specific audio channel to stream. */
402
+ channel?: number;
403
+ }
404
+ interface StreamVerb {
405
+ verb: 'stream';
406
+ id?: string;
407
+ /** Websocket URL to stream audio to. */
408
+ url: string;
409
+ /** Webhook when stream ends. */
410
+ actionHook?: ActionHook;
411
+ /** Websocket auth credentials. */
412
+ wsAuth?: Auth;
413
+ /** Audio channel mixing mode. */
414
+ mixType?: 'mono' | 'stereo' | 'mixed';
415
+ /** Metadata sent with initial connection. */
416
+ metadata?: Record<string, unknown>;
417
+ /** Audio sample rate in Hz. */
418
+ sampleRate?: number;
419
+ /** DTMF key that ends the session. */
420
+ finishOnKey?: string;
421
+ /** Max duration in seconds. */
422
+ maxLength?: number;
423
+ /** Forward DTMF events to websocket. */
424
+ passDtmf?: boolean;
425
+ /** Play beep before streaming. */
426
+ playBeep?: boolean;
427
+ /** Disable receiving audio from websocket. */
428
+ disableBidirectionalAudio?: boolean;
429
+ /** Bidirectional audio configuration. */
430
+ bidirectionalAudio?: BidirectionalAudio;
431
+ /** Inactivity timeout in seconds. */
432
+ timeout?: number;
433
+ /** Simultaneous transcription config. */
434
+ transcribe?: Record<string, unknown>;
435
+ /** Stream before call is answered. */
436
+ earlyMedia?: boolean;
437
+ }
438
+ interface TranscribeVerb {
439
+ verb: 'transcribe';
440
+ id?: string;
441
+ /** Webhook for transcription results. */
442
+ transcriptionHook?: string;
443
+ /** Webhook for translated results. */
444
+ translationHook?: string;
445
+ /** STT configuration. */
446
+ recognizer?: Recognizer;
447
+ /** Transcribe before call is answered. */
448
+ earlyMedia?: boolean;
449
+ /** Specific audio channel to transcribe. */
450
+ channel?: number;
451
+ }
452
+ interface DialVerb {
453
+ verb: 'dial';
454
+ id?: string;
455
+ /** Call targets (simultaneous ring). */
456
+ target: Target[];
457
+ /** Webhook when dialed call ends. */
458
+ actionHook?: ActionHook;
459
+ /** Webhook when call is placed on hold. */
460
+ onHoldHook?: ActionHook;
461
+ /** Delay answering inbound until outbound answers. */
462
+ answerOnBridge?: boolean;
463
+ /** Caller ID for outbound call. */
464
+ callerId?: string;
465
+ /** Caller display name. */
466
+ callerName?: string;
467
+ /** Webhook for call screening. */
468
+ confirmHook?: ActionHook;
469
+ /** Webhook for SIP REFER on bridged call. */
470
+ referHook?: ActionHook;
471
+ /** Audio URL for ringback tone replacement. */
472
+ dialMusic?: string;
473
+ /** DTMF capture patterns during bridged call. */
474
+ dtmfCapture?: Record<string, unknown>;
475
+ /** Webhook for captured DTMF patterns. */
476
+ dtmfHook?: ActionHook;
477
+ /** Custom SIP headers on outbound INVITE. */
478
+ headers?: Record<string, string>;
479
+ /** Keep media through jambonz media server. */
480
+ anchorMedia?: boolean;
481
+ /** Remove jambonz from media path after bridge. */
482
+ exitMediaPath?: boolean;
483
+ /** Audio signal boost/attenuation in dB. */
484
+ boostAudioSignal?: number | string;
485
+ /** Audio streaming config for bridged call. */
486
+ listen?: Record<string, unknown>;
487
+ /** Audio streaming config (alias for listen). */
488
+ stream?: Record<string, unknown>;
489
+ /** Transcription config for bridged call. */
490
+ transcribe?: Record<string, unknown>;
491
+ /** Max bridged call duration in seconds. */
492
+ timeLimit?: number;
493
+ /** Seconds to wait for answer. */
494
+ timeout?: number;
495
+ /** SIP proxy for outbound call. */
496
+ proxy?: string;
497
+ /** Answering machine detection config. */
498
+ amd?: Record<string, unknown>;
499
+ /** Audio dubbing tracks. */
500
+ dub?: Record<string, unknown>[];
501
+ /** Metadata for this call leg. */
502
+ tag?: Record<string, unknown>;
503
+ /** Forward P-Asserted-Identity header. */
504
+ forwardPAI?: boolean;
505
+ }
506
+ interface ConferenceVerb {
507
+ verb: 'conference';
508
+ id?: string;
509
+ /** Conference room name. */
510
+ name: string;
511
+ /** Beep on join/leave. */
512
+ beep?: boolean;
513
+ /** Tag to identify this participant. */
514
+ memberTag?: string;
515
+ /** Whisper to specific participant by tag. */
516
+ speakOnlyTo?: string;
517
+ /** Start conference when this participant joins. */
518
+ startConferenceOnEnter?: boolean;
519
+ /** End conference when this participant leaves. */
520
+ endConferenceOnExit?: boolean;
521
+ /** Max conference duration in seconds. */
522
+ endConferenceDuration?: number;
523
+ /** Max participants allowed. */
524
+ maxParticipants?: number;
525
+ /** Join muted. */
526
+ joinMuted?: boolean;
527
+ /** Webhook when participant leaves. */
528
+ actionHook?: ActionHook;
529
+ /** Webhook while waiting for conference to start. */
530
+ waitHook?: ActionHook;
531
+ /** Conference event types to receive. */
532
+ statusEvents?: string[];
533
+ /** Webhook for conference status events. */
534
+ statusHook?: ActionHook;
535
+ /** Webhook when participant enters. */
536
+ enterHook?: ActionHook;
537
+ /** Conference recording config. */
538
+ record?: Record<string, unknown>;
539
+ /** Audio streaming config. */
540
+ listen?: Record<string, unknown>;
541
+ /** Distribute DTMF to all participants. */
542
+ distributeDtmf?: boolean;
543
+ }
544
+ interface EnqueueVerb {
545
+ verb: 'enqueue';
546
+ id?: string;
547
+ /** Queue name. */
548
+ name: string;
549
+ /** Webhook when caller leaves queue. */
550
+ actionHook?: ActionHook;
551
+ /** Webhook for hold content while waiting. */
552
+ waitHook?: ActionHook;
553
+ /** Queue priority (lower = higher priority). */
554
+ priority?: number;
555
+ }
556
+ interface DequeueVerb {
557
+ verb: 'dequeue';
558
+ id?: string;
559
+ /** Queue name to dequeue from. */
560
+ name: string;
561
+ /** Webhook when dequeued call ends. */
562
+ actionHook?: ActionHook;
563
+ /** Seconds to wait for a caller in the queue. */
564
+ timeout?: number;
565
+ /** Beep when calls connect. */
566
+ beep?: boolean;
567
+ /** Dequeue a specific call by SID. */
568
+ callSid?: string;
569
+ }
570
+ interface HangupVerb {
571
+ verb: 'hangup';
572
+ id?: string;
573
+ /** Custom SIP headers on the BYE request. */
574
+ headers?: Record<string, string>;
575
+ }
576
+ interface RedirectVerb {
577
+ verb: 'redirect';
578
+ id?: string;
579
+ /** Webhook to transfer control to. */
580
+ actionHook: ActionHook;
581
+ /** Webhook for call status after redirect. */
582
+ statusHook?: ActionHook;
583
+ }
584
+ interface PauseVerb {
585
+ verb: 'pause';
586
+ id?: string;
587
+ /** Duration in seconds. */
588
+ length: number;
589
+ }
590
+ interface LeaveVerb {
591
+ verb: 'leave';
592
+ id?: string;
593
+ }
594
+ interface SipDeclineVerb {
595
+ verb: 'sip:decline';
596
+ id?: string;
597
+ /** SIP response status code. */
598
+ status: number;
599
+ /** SIP reason phrase. */
600
+ reason?: string;
601
+ /** Custom SIP headers. */
602
+ headers?: Record<string, string>;
603
+ }
604
+ interface SipRequestVerb {
605
+ verb: 'sip:request';
606
+ id?: string;
607
+ /** SIP method (e.g. 'INFO', 'NOTIFY'). */
608
+ method: string;
609
+ /** Request body. */
610
+ body?: string;
611
+ /** Custom SIP headers. */
612
+ headers?: Record<string, string>;
613
+ /** Webhook for the SIP response. */
614
+ actionHook?: ActionHook;
615
+ }
616
+ interface SipReferVerb {
617
+ verb: 'sip:refer';
618
+ id?: string;
619
+ /** SIP URI or phone number to transfer to. */
620
+ referTo: string;
621
+ /** Referred-By header value. */
622
+ referredBy?: string;
623
+ /** Display name for Referred-By. */
624
+ referredByDisplayName?: string;
625
+ /** Custom SIP headers. */
626
+ headers?: Record<string, string>;
627
+ /** Webhook when REFER completes. */
628
+ actionHook?: ActionHook;
629
+ /** Webhook for NOTIFY progress events. */
630
+ eventHook?: ActionHook;
631
+ }
632
+ interface ConfigVerb {
633
+ verb: 'config';
634
+ id?: string;
635
+ /** Default TTS configuration. */
636
+ synthesizer?: Synthesizer;
637
+ /** Default STT configuration. */
638
+ recognizer?: Recognizer;
639
+ /** Default barge-in configuration. */
640
+ bargeIn?: {
641
+ enable?: boolean;
642
+ sticky?: boolean;
643
+ actionHook?: ActionHook;
644
+ input?: ('speech' | 'digits')[];
645
+ minBargeinWordCount?: number;
646
+ };
647
+ /** Default TTS streaming config. */
648
+ ttsStream?: {
649
+ enable?: boolean;
650
+ synthesizer?: Synthesizer;
651
+ };
652
+ /** Session-level recording config. */
653
+ record?: Record<string, unknown>;
654
+ /** Session-level audio streaming config. */
655
+ listen?: Record<string, unknown>;
656
+ /** Session-level audio streaming (alias). */
657
+ stream?: Record<string, unknown>;
658
+ /** Session-level transcription config. */
659
+ transcribe?: Record<string, unknown>;
660
+ /** Answering machine detection config. */
661
+ amd?: Record<string, unknown>;
662
+ /** Default filler noise config. */
663
+ fillerNoise?: FillerNoise;
664
+ /** Default VAD config. */
665
+ vad?: Vad;
666
+ /** Send call events to status webhook. */
667
+ notifyEvents?: boolean;
668
+ /** Include STT latency measurements. */
669
+ notifySttLatency?: boolean;
670
+ /** Reset specific session settings to defaults. */
671
+ reset?: string | string[];
672
+ /** Hold music audio URL. */
673
+ onHoldMusic?: string;
674
+ /** Default slow webhook response handling. */
675
+ actionHookDelayAction?: ActionHookDelayAction;
676
+ /** Webhook for in-dialog SIP requests. */
677
+ sipRequestWithinDialogHook?: ActionHook;
678
+ /** Audio signal boost/attenuation in dB. */
679
+ boostAudioSignal?: number | string;
680
+ /** Webhook for SIP REFER requests. */
681
+ referHook?: ActionHook;
682
+ /** Allow early media for the session. */
683
+ earlyMedia?: boolean;
684
+ /** Auto-stream TTS for all say verbs. */
685
+ autoStreamTts?: boolean;
686
+ /** Disable TTS caching. */
687
+ disableTtsCache?: boolean;
688
+ /** Noise isolation config. */
689
+ noiseIsolation?: {
690
+ enable?: boolean;
691
+ vendor?: string;
692
+ level?: number;
693
+ model?: string;
694
+ };
695
+ /** Turn-taking detection config. */
696
+ turnTaking?: {
697
+ enable?: boolean;
698
+ vendor?: string;
699
+ threshold?: number;
700
+ model?: string;
701
+ };
702
+ }
703
+ interface AnswerVerb {
704
+ verb: 'answer';
705
+ id?: string;
706
+ }
707
+ interface AlertVerb {
708
+ verb: 'alert';
709
+ id?: string;
710
+ /** Alert-Info header value. */
711
+ message: string;
712
+ }
713
+ interface TagVerb {
714
+ verb: 'tag';
715
+ id?: string;
716
+ /** Metadata to attach to the call. */
717
+ data: Record<string, unknown>;
718
+ }
719
+ interface DtmfVerb {
720
+ verb: 'dtmf';
721
+ id?: string;
722
+ /** DTMF digits to send. 'w' for 500ms pause. */
723
+ dtmf: string;
724
+ /** Duration per tone in milliseconds. */
725
+ duration?: number;
726
+ }
727
+ interface DubVerb {
728
+ verb: 'dub';
729
+ id?: string;
730
+ /** Dubbing action. */
731
+ action: 'addTrack' | 'removeTrack' | 'silenceTrack' | 'playOnTrack' | 'sayOnTrack';
732
+ /** Track name. */
733
+ track: string;
734
+ /** Audio URL for playOnTrack. */
735
+ play?: string;
736
+ /** Text or config for sayOnTrack. */
737
+ say?: string | Record<string, unknown>;
738
+ /** Loop audio continuously. */
739
+ loop?: boolean;
740
+ /** Track gain in dB. */
741
+ gain?: number | string;
742
+ }
743
+ interface MessageVerb {
744
+ verb: 'message';
745
+ id?: string;
746
+ /** Destination phone number (E.164). */
747
+ to: string;
748
+ /** Sender phone number (E.164). */
749
+ from: string;
750
+ /** Message text content. */
751
+ text?: string;
752
+ /** Media attachment URL(s) for MMS. */
753
+ media?: string | string[];
754
+ /** Messaging carrier to use. */
755
+ carrier?: string;
756
+ /** Account SID for sending. */
757
+ account_sid?: string;
758
+ /** Message SID for tracking. */
759
+ message_sid?: string;
760
+ /** Webhook when send completes. */
761
+ actionHook?: ActionHook;
762
+ }
763
+ /** Any jambonz verb. Discriminated on the 'verb' property. */
764
+ type Verb = AnswerVerb | AlertVerb | ConfigVerb | SayVerb | PlayVerb | GatherVerb | DialVerb | ListenVerb | StreamVerb | LlmVerb | PipelineVerb | ConferenceVerb | TranscribeVerb | EnqueueVerb | DequeueVerb | DtmfVerb | DubVerb | HangupVerb | LeaveVerb | MessageVerb | PauseVerb | RedirectVerb | TagVerb | SipDeclineVerb | SipRequestVerb | SipReferVerb;
765
+ /** A jambonz application — an array of verbs executed sequentially. */
766
+ type JambonzApp = Verb[];
767
+ /** All valid verb names. */
768
+ type VerbName = Verb['verb'];
769
+
770
+ export type { ActionHook as A, BidirectionalAudio as B, ConferenceVerb as C, DequeueVerb as D, EnqueueVerb as E, FillerNoise as F, GatherVerb as G, HangupVerb as H, JambonzApp as J, LeaveVerb as L, McpServerConfig as M, PauseVerb as P, Recognizer as R, SayVerb as S, TagVerb as T, Vad as V, ActionHookDelayAction as a, ActionHookObject as b, AlertVerb as c, AnswerVerb as d, Auth as e, ConfigVerb as f, DialVerb as g, DtmfVerb as h, DubVerb as i, ListenVerb as j, LlmVerb as k, MessageVerb as l, PipelineVerb as m, PlayVerb as n, RedirectVerb as o, SipDeclineVerb as p, SipReferVerb as q, SipRequestVerb as r, StreamVerb as s, Synthesizer as t, Target as u, TranscribeVerb as v, Verb as w, VerbName as x };