@jambonz/sdk 0.1.0 → 0.1.2

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 (122) hide show
  1. package/dist/client/index.cjs +60 -13
  2. package/dist/client/index.cjs.map +1 -1
  3. package/dist/client/index.d.cts +36 -7
  4. package/dist/client/index.d.ts +36 -7
  5. package/dist/client/index.js +59 -13
  6. package/dist/client/index.js.map +1 -1
  7. package/dist/common-BSJZX7WO.d.cts +34 -0
  8. package/dist/common-BSJZX7WO.d.ts +34 -0
  9. package/dist/index.cjs +364 -32
  10. package/dist/index.cjs.map +1 -1
  11. package/dist/index.d.cts +8 -7
  12. package/dist/index.d.ts +8 -7
  13. package/dist/index.js +360 -32
  14. package/dist/index.js.map +1 -1
  15. package/dist/rest-BF9HKZrA.d.ts +136 -0
  16. package/dist/rest-v8weIueZ.d.cts +136 -0
  17. package/dist/session-DHc6G_9y.d.cts +112 -0
  18. package/dist/session-DHc6G_9y.d.ts +112 -0
  19. package/dist/types/index.d.cts +4 -3
  20. package/dist/types/index.d.ts +4 -3
  21. package/dist/{verb-builder-But-DJle.d.cts → verb-builder-Dg_IPC4I.d.ts} +35 -2
  22. package/dist/{verb-builder-CO_qoYxC.d.ts → verb-builder-DkHAJrk4.d.cts} +35 -2
  23. package/dist/{verbs-B_afNNUM.d.cts → verbs-fjJjfGEt.d.cts} +40 -14
  24. package/dist/{verbs-B_afNNUM.d.ts → verbs-fjJjfGEt.d.ts} +40 -14
  25. package/dist/webhook/index.cjs +68 -8
  26. package/dist/webhook/index.cjs.map +1 -1
  27. package/dist/webhook/index.d.cts +45 -3
  28. package/dist/webhook/index.d.ts +45 -3
  29. package/dist/webhook/index.js +68 -9
  30. package/dist/webhook/index.js.map +1 -1
  31. package/dist/websocket/index.cjs +291 -19
  32. package/dist/websocket/index.cjs.map +1 -1
  33. package/dist/websocket/index.d.cts +198 -4
  34. package/dist/websocket/index.d.ts +198 -4
  35. package/dist/websocket/index.js +290 -20
  36. package/dist/websocket/index.js.map +1 -1
  37. package/package.json +19 -6
  38. package/schema/callbacks/base.schema.json +29 -0
  39. package/schema/callbacks/call-status.schema.json +22 -0
  40. package/schema/callbacks/conference-status.schema.json +24 -0
  41. package/schema/callbacks/conference-wait.schema.json +11 -0
  42. package/schema/callbacks/conference.schema.json +11 -0
  43. package/schema/callbacks/dequeue.schema.json +19 -0
  44. package/schema/callbacks/dial-dtmf.schema.json +18 -0
  45. package/schema/callbacks/dial-hold.schema.json +22 -0
  46. package/schema/callbacks/dial-refer.schema.json +28 -0
  47. package/schema/callbacks/dial.schema.json +31 -0
  48. package/schema/callbacks/enqueue-wait.schema.json +17 -0
  49. package/schema/callbacks/enqueue.schema.json +27 -0
  50. package/schema/callbacks/gather-partial.schema.json +54 -0
  51. package/schema/callbacks/gather.schema.json +60 -0
  52. package/schema/callbacks/listen.schema.json +21 -0
  53. package/schema/callbacks/llm.schema.json +30 -0
  54. package/schema/callbacks/message.schema.json +35 -0
  55. package/schema/callbacks/play.schema.json +36 -0
  56. package/schema/callbacks/session-new.schema.json +143 -0
  57. package/schema/callbacks/session-reconnect.schema.json +9 -0
  58. package/schema/callbacks/session-redirect.schema.json +38 -0
  59. package/schema/callbacks/sip-refer-event.schema.json +20 -0
  60. package/schema/callbacks/sip-refer.schema.json +22 -0
  61. package/schema/callbacks/sip-request.schema.json +27 -0
  62. package/schema/callbacks/transcribe-translation.schema.json +24 -0
  63. package/schema/callbacks/transcribe.schema.json +46 -0
  64. package/schema/callbacks/verb-status.schema.json +57 -0
  65. package/schema/components/actionHook.schema.json +36 -0
  66. package/schema/components/actionHookDelayAction.schema.json +37 -0
  67. package/schema/components/amd.schema.json +68 -0
  68. package/schema/components/auth.schema.json +18 -0
  69. package/schema/components/bidirectionalAudio.schema.json +22 -0
  70. package/schema/components/fillerNoise.schema.json +25 -0
  71. package/schema/components/recognizer-assemblyAiOptions.schema.json +35 -0
  72. package/schema/components/recognizer-awsOptions.schema.json +52 -0
  73. package/schema/components/recognizer-azureOptions.schema.json +32 -0
  74. package/schema/components/recognizer-cobaltOptions.schema.json +34 -0
  75. package/schema/components/recognizer-customOptions.schema.json +27 -0
  76. package/schema/components/recognizer-deepgramOptions.schema.json +147 -0
  77. package/schema/components/recognizer-elevenlabsOptions.schema.json +39 -0
  78. package/schema/components/recognizer-gladiaOptions.schema.json +8 -0
  79. package/schema/components/recognizer-googleOptions.schema.json +35 -0
  80. package/schema/components/recognizer-houndifyOptions.schema.json +53 -0
  81. package/schema/components/recognizer-ibmOptions.schema.json +54 -0
  82. package/schema/components/recognizer-nuanceOptions.schema.json +150 -0
  83. package/schema/components/recognizer-nvidiaOptions.schema.json +39 -0
  84. package/schema/components/recognizer-openaiOptions.schema.json +59 -0
  85. package/schema/components/recognizer-sonioxOptions.schema.json +46 -0
  86. package/schema/components/recognizer-speechmaticsOptions.schema.json +91 -0
  87. package/schema/components/recognizer-verbioOptions.schema.json +46 -0
  88. package/schema/components/recognizer.schema.json +212 -0
  89. package/schema/components/synthesizer.schema.json +82 -0
  90. package/schema/components/target.schema.json +105 -0
  91. package/schema/components/vad.schema.json +48 -0
  92. package/schema/jambonz-app.schema.json +106 -0
  93. package/schema/verbs/alert.schema.json +20 -0
  94. package/schema/verbs/answer.schema.json +12 -0
  95. package/schema/verbs/conference.schema.json +43 -0
  96. package/schema/verbs/config.schema.json +170 -0
  97. package/schema/verbs/dequeue.schema.json +36 -0
  98. package/schema/verbs/dial.schema.json +153 -0
  99. package/schema/verbs/dtmf.schema.json +27 -0
  100. package/schema/verbs/dub.schema.json +52 -0
  101. package/schema/verbs/enqueue.schema.json +38 -0
  102. package/schema/verbs/gather.schema.json +145 -0
  103. package/schema/verbs/hangup.schema.json +29 -0
  104. package/schema/verbs/leave.schema.json +12 -0
  105. package/schema/verbs/listen.schema.json +109 -0
  106. package/schema/verbs/llm.schema.json +131 -0
  107. package/schema/verbs/message.schema.json +30 -0
  108. package/schema/verbs/pause.schema.json +26 -0
  109. package/schema/verbs/pipeline.schema.json +61 -0
  110. package/schema/verbs/play.schema.json +69 -0
  111. package/schema/verbs/redirect.schema.json +23 -0
  112. package/schema/verbs/say.schema.json +84 -0
  113. package/schema/verbs/sip-decline.schema.json +31 -0
  114. package/schema/verbs/sip-refer.schema.json +41 -0
  115. package/schema/verbs/sip-request.schema.json +33 -0
  116. package/schema/verbs/stream.schema.json +30 -0
  117. package/schema/verbs/tag.schema.json +21 -0
  118. package/schema/verbs/transcribe.schema.json +48 -0
  119. package/dist/common-Bsqv1Brz.d.cts +0 -69
  120. package/dist/common-Bsqv1Brz.d.ts +0 -69
  121. package/dist/rest-BV_FsqnH.d.cts +0 -97
  122. package/dist/rest-CthGXHnw.d.ts +0 -97
@@ -0,0 +1,170 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://jambonz.org/schema/verbs/config",
4
+ "title": "Config",
5
+ "description": "Sets session-level defaults for the call. Configures default TTS, STT, VAD, recording, streaming, and other session-wide settings. These defaults apply to all subsequent verbs unless overridden at the verb level. Typically the first verb in an application. Can be used multiple times during a call to change settings.",
6
+ "type": "object",
7
+ "properties": {
8
+ "verb": {
9
+ "const": "config",
10
+ "description": "The verb name."
11
+ },
12
+ "id": {
13
+ "type": "string",
14
+ "description": "An optional unique identifier for this verb instance."
15
+ },
16
+ "synthesizer": {
17
+ "$ref": "../components/synthesizer",
18
+ "description": "Default TTS configuration for the session."
19
+ },
20
+ "recognizer": {
21
+ "$ref": "../components/recognizer",
22
+ "description": "Default STT configuration for the session."
23
+ },
24
+ "bargeIn": {
25
+ "type": "object",
26
+ "description": "Default barge-in configuration. When enabled, callers can interrupt playing prompts with speech or DTMF.",
27
+ "properties": {
28
+ "enable": { "type": "boolean" },
29
+ "sticky": {
30
+ "type": "boolean",
31
+ "description": "If true, barge-in settings persist across verbs rather than resetting after each verb."
32
+ },
33
+ "actionHook": { "$ref": "../components/actionHook" },
34
+ "input": {
35
+ "type": "array",
36
+ "items": { "type": "string", "enum": ["speech", "digits"] }
37
+ },
38
+ "minBargeinWordCount": { "type": "number" }
39
+ }
40
+ },
41
+ "ttsStream": {
42
+ "type": "object",
43
+ "description": "Default TTS streaming configuration for the session.",
44
+ "properties": {
45
+ "enable": { "type": "boolean" },
46
+ "synthesizer": { "$ref": "../components/synthesizer" }
47
+ }
48
+ },
49
+ "record": {
50
+ "type": "object",
51
+ "description": "Session-level call recording configuration.",
52
+ "additionalProperties": true
53
+ },
54
+ "listen": {
55
+ "$ref": "listen",
56
+ "description": "Nested listen verb — session-level audio streaming configuration."
57
+ },
58
+ "stream": {
59
+ "$ref": "stream",
60
+ "description": "Nested stream verb — session-level audio streaming configuration. Alias for 'listen'."
61
+ },
62
+ "transcribe": {
63
+ "$ref": "transcribe",
64
+ "description": "Nested transcribe verb — session-level real-time transcription configuration."
65
+ },
66
+ "amd": {
67
+ "$ref": "../components/amd",
68
+ "description": "Session-level answering machine detection configuration."
69
+ },
70
+ "fillerNoise": {
71
+ "$ref": "../components/fillerNoise",
72
+ "description": "Default filler noise configuration for the session."
73
+ },
74
+ "vad": {
75
+ "$ref": "../components/vad",
76
+ "description": "Default voice activity detection configuration for the session."
77
+ },
78
+ "notifyEvents": {
79
+ "type": "boolean",
80
+ "description": "If true, send call events (e.g. DTMF, call status changes) to the application via the status webhook."
81
+ },
82
+ "notifySttLatency": {
83
+ "type": "boolean",
84
+ "description": "If true, include STT latency measurements in webhook payloads."
85
+ },
86
+ "reset": {
87
+ "oneOf": [
88
+ { "type": "string" },
89
+ { "type": "array", "items": { "type": "string" } }
90
+ ],
91
+ "description": "Reset specific session-level settings to their defaults. Pass a setting name or array of setting names to reset."
92
+ },
93
+ "onHoldMusic": {
94
+ "type": "string",
95
+ "format": "uri",
96
+ "description": "URL of an audio file to play when the call is placed on hold."
97
+ },
98
+ "actionHookDelayAction": {
99
+ "$ref": "../components/actionHookDelayAction",
100
+ "description": "Default configuration for handling slow webhook responses."
101
+ },
102
+ "sipRequestWithinDialogHook": {
103
+ "$ref": "../components/actionHook",
104
+ "description": "A webhook to invoke when a SIP request (e.g. INFO, NOTIFY) is received within the dialog."
105
+ },
106
+ "boostAudioSignal": {
107
+ "oneOf": [
108
+ { "type": "number" },
109
+ { "type": "string" }
110
+ ],
111
+ "description": "Boost (or attenuate) the audio signal in dB for the session."
112
+ },
113
+ "referHook": {
114
+ "$ref": "../components/actionHook",
115
+ "description": "A webhook to invoke when a SIP REFER request is received."
116
+ },
117
+ "earlyMedia": {
118
+ "type": "boolean",
119
+ "description": "If true, allow early media (audio before call answer) for the session."
120
+ },
121
+ "autoStreamTts": {
122
+ "type": "boolean",
123
+ "description": "If true, automatically use streaming TTS for all 'say' verbs in the session."
124
+ },
125
+ "disableTtsCache": {
126
+ "type": "boolean",
127
+ "description": "If true, disable TTS caching for the session."
128
+ },
129
+ "noiseIsolation": {
130
+ "type": "object",
131
+ "description": "Noise isolation configuration to reduce background noise on the caller's audio.",
132
+ "properties": {
133
+ "enable": { "type": "boolean" },
134
+ "vendor": { "type": "string" },
135
+ "level": { "type": "number" },
136
+ "model": { "type": "string" }
137
+ }
138
+ },
139
+ "turnTaking": {
140
+ "type": "object",
141
+ "description": "Turn-taking detection configuration for conversational AI applications.",
142
+ "properties": {
143
+ "enable": { "type": "boolean" },
144
+ "vendor": { "type": "string" },
145
+ "threshold": { "type": "number" },
146
+ "model": { "type": "string" }
147
+ }
148
+ }
149
+ },
150
+ "required": [],
151
+ "examples": [
152
+ {
153
+ "verb": "config",
154
+ "synthesizer": {
155
+ "vendor": "elevenlabs",
156
+ "voice": "Rachel",
157
+ "language": "en-US"
158
+ },
159
+ "recognizer": {
160
+ "vendor": "deepgram",
161
+ "language": "en-US"
162
+ },
163
+ "fillerNoise": {
164
+ "enable": true,
165
+ "url": "https://example.com/sounds/typing.wav",
166
+ "startDelaySecs": 2
167
+ }
168
+ }
169
+ ]
170
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://jambonz.org/schema/verbs/dequeue",
4
+ "title": "Dequeue",
5
+ "description": "Removes a caller from a named queue and bridges them to the current call. Typically used by an agent or operator call flow to connect with the next waiting caller.",
6
+ "type": "object",
7
+ "properties": {
8
+ "verb": { "const": "dequeue" },
9
+ "id": { "type": "string", "description": "An optional unique identifier for this verb instance." },
10
+ "name": {
11
+ "type": "string",
12
+ "description": "The name of the queue to dequeue from.",
13
+ "examples": ["support", "sales"]
14
+ },
15
+ "actionHook": {
16
+ "$ref": "../components/actionHook",
17
+ "description": "A webhook invoked when the dequeued call ends."
18
+ },
19
+ "timeout": {
20
+ "type": "number",
21
+ "description": "Time in seconds to wait for a caller to be available in the queue."
22
+ },
23
+ "beep": {
24
+ "type": "boolean",
25
+ "description": "If true, play a beep when the calls are connected."
26
+ },
27
+ "callSid": {
28
+ "type": "string",
29
+ "description": "Dequeue a specific call by its call SID, rather than the next caller in line."
30
+ }
31
+ },
32
+ "required": ["name"],
33
+ "examples": [
34
+ { "verb": "dequeue", "name": "support", "beep": true }
35
+ ]
36
+ }
@@ -0,0 +1,153 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://jambonz.org/schema/verbs/dial",
4
+ "title": "Dial",
5
+ "description": "Initiates an outbound call to one or more targets and bridges the caller to the first target that answers. Targets can be phone numbers (PSTN), SIP endpoints, registered users, or Microsoft Teams users. Supports simultaneous ringing, call screening, recording, and DTMF capture during the bridged call.",
6
+ "type": "object",
7
+ "properties": {
8
+ "verb": {
9
+ "const": "dial",
10
+ "description": "The verb name."
11
+ },
12
+ "id": {
13
+ "type": "string",
14
+ "description": "An optional unique identifier for this verb instance."
15
+ },
16
+ "target": {
17
+ "type": "array",
18
+ "items": { "$ref": "../components/target" },
19
+ "description": "One or more call targets to dial. If multiple targets are specified, they are rung simultaneously and the first to answer is connected. The rest are canceled.",
20
+ "minItems": 1
21
+ },
22
+ "actionHook": {
23
+ "$ref": "../components/actionHook",
24
+ "description": "A webhook invoked when the dialed call ends. Receives call disposition details (duration, who hung up, etc.) and should return the next verbs to execute."
25
+ },
26
+ "onHoldHook": {
27
+ "$ref": "../components/actionHook",
28
+ "description": "A webhook invoked when the call is placed on hold. Should return verbs to execute (e.g. play hold music) while the caller is holding."
29
+ },
30
+ "answerOnBridge": {
31
+ "type": "boolean",
32
+ "description": "If true, delay answering the inbound call until the outbound leg is answered. This allows the caller to hear ringing until the target picks up, and avoids billing the caller for unanswered outbound attempts."
33
+ },
34
+ "callerId": {
35
+ "type": "string",
36
+ "description": "The caller ID (phone number) to present on the outbound call. Overrides the default caller ID.",
37
+ "examples": ["+15085551212"]
38
+ },
39
+ "callerName": {
40
+ "type": "string",
41
+ "description": "The caller display name to present on the outbound call."
42
+ },
43
+ "confirmHook": {
44
+ "$ref": "../components/actionHook",
45
+ "description": "A webhook invoked when a target answers, before the call is bridged. Used for call screening — the webhook can return verbs (e.g. a 'say' prompt and 'gather') to confirm the callee wants to accept the call."
46
+ },
47
+ "referHook": {
48
+ "$ref": "../components/actionHook",
49
+ "description": "A webhook invoked when a SIP REFER is received on the bridged call. Allows handling call transfers initiated by the far end."
50
+ },
51
+ "dialMusic": {
52
+ "type": "string",
53
+ "format": "uri",
54
+ "description": "URL of an audio file to play to the caller while the outbound call is ringing. Replaces the default ringback tone."
55
+ },
56
+ "dtmfCapture": {
57
+ "type": "object",
58
+ "description": "Configuration for capturing DTMF digits during the bridged call. Keys are DTMF patterns to capture, values are configuration for each.",
59
+ "additionalProperties": true
60
+ },
61
+ "dtmfHook": {
62
+ "$ref": "../components/actionHook",
63
+ "description": "A webhook invoked when a captured DTMF pattern is detected during the bridged call."
64
+ },
65
+ "headers": {
66
+ "type": "object",
67
+ "description": "Custom SIP headers to include on the outbound INVITE.",
68
+ "additionalProperties": { "type": "string" }
69
+ },
70
+ "anchorMedia": {
71
+ "type": "boolean",
72
+ "description": "If true, keep media anchored through the jambonz media server even if a direct media path is possible. Required for features like recording, listen, and DTMF capture during bridged calls."
73
+ },
74
+ "exitMediaPath": {
75
+ "type": "boolean",
76
+ "description": "If true, remove jambonz from the media path after the call is bridged. Reduces latency but disables mid-call features like recording and DTMF capture."
77
+ },
78
+ "boostAudioSignal": {
79
+ "oneOf": [
80
+ { "type": "number" },
81
+ { "type": "string" }
82
+ ],
83
+ "description": "Boost (or attenuate) the audio signal in dB. Positive values increase volume, negative values decrease it.",
84
+ "examples": [6, -3]
85
+ },
86
+ "listen": {
87
+ "$ref": "listen",
88
+ "description": "Nested listen verb — streams audio of the bridged call to a websocket endpoint."
89
+ },
90
+ "stream": {
91
+ "$ref": "stream",
92
+ "description": "Nested stream verb — streams audio of the bridged call. Alias for 'listen'."
93
+ },
94
+ "transcribe": {
95
+ "$ref": "transcribe",
96
+ "description": "Nested transcribe verb — enables real-time transcription of the bridged call."
97
+ },
98
+ "timeLimit": {
99
+ "type": "number",
100
+ "description": "Maximum duration in seconds for the bridged call. The call is automatically hung up when this limit is reached.",
101
+ "examples": [3600]
102
+ },
103
+ "timeout": {
104
+ "type": "number",
105
+ "description": "Time in seconds to wait for the target to answer before giving up.",
106
+ "examples": [30, 60]
107
+ },
108
+ "proxy": {
109
+ "type": "string",
110
+ "description": "A SIP proxy to route the outbound call through.",
111
+ "examples": ["sip:proxy.example.com"]
112
+ },
113
+ "amd": {
114
+ "$ref": "../components/amd",
115
+ "description": "Answering machine detection configuration. When enabled, jambonz attempts to determine whether the call was answered by a human or a machine."
116
+ },
117
+ "dub": {
118
+ "type": "array",
119
+ "items": { "$ref": "dub" },
120
+ "description": "Nested dub verbs — audio dubbing configuration for mixing additional audio tracks into the bridged call."
121
+ },
122
+ "tag": {
123
+ "type": "object",
124
+ "description": "Arbitrary metadata to attach to this call leg. Included in subsequent webhook invocations and CDRs.",
125
+ "additionalProperties": true
126
+ },
127
+ "forwardPAI": {
128
+ "type": "boolean",
129
+ "description": "If true, forward the P-Asserted-Identity header from the inbound call to the outbound call."
130
+ }
131
+ },
132
+ "required": ["target"],
133
+ "examples": [
134
+ {
135
+ "verb": "dial",
136
+ "target": [
137
+ { "type": "phone", "number": "+15085551212" }
138
+ ],
139
+ "answerOnBridge": true,
140
+ "timeout": 30,
141
+ "actionHook": "/dial-complete"
142
+ },
143
+ {
144
+ "verb": "dial",
145
+ "target": [
146
+ { "type": "sip", "sipUri": "sip:alice@example.com" },
147
+ { "type": "sip", "sipUri": "sip:bob@example.com" }
148
+ ],
149
+ "confirmHook": "/screen-call",
150
+ "timeLimit": 3600
151
+ }
152
+ ]
153
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://jambonz.org/schema/verbs/dtmf",
4
+ "title": "DTMF",
5
+ "description": "Sends DTMF tones on the call. Used to interact with IVR systems on the far end, or to signal systems that respond to DTMF.",
6
+ "type": "object",
7
+ "properties": {
8
+ "verb": { "const": "dtmf" },
9
+ "id": { "type": "string", "description": "An optional unique identifier for this verb instance." },
10
+ "dtmf": {
11
+ "type": "string",
12
+ "description": "The DTMF digits to send. Valid characters are 0-9, *, #, and A-D. Use 'w' for a 500ms pause between digits.",
13
+ "examples": ["1234#", "1w2w3", "5551212"]
14
+ },
15
+ "duration": {
16
+ "type": "number",
17
+ "description": "Duration in milliseconds for each DTMF tone.",
18
+ "default": 500,
19
+ "examples": [250, 500]
20
+ }
21
+ },
22
+ "required": ["dtmf"],
23
+ "examples": [
24
+ { "verb": "dtmf", "dtmf": "1234#" },
25
+ { "verb": "dtmf", "dtmf": "1w2w3w4", "duration": 250 }
26
+ ]
27
+ }
@@ -0,0 +1,52 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://jambonz.org/schema/verbs/dub",
4
+ "title": "Dub",
5
+ "description": "Manages audio dubbing tracks on a call. Allows adding, removing, and controlling auxiliary audio tracks that are mixed into the call audio. Used for background music, coaching whispers, or injecting audio from external sources.",
6
+ "type": "object",
7
+ "properties": {
8
+ "verb": { "const": "dub" },
9
+ "id": { "type": "string", "description": "An optional unique identifier for this verb instance." },
10
+ "action": {
11
+ "type": "string",
12
+ "description": "The dubbing action to perform.",
13
+ "enum": ["addTrack", "removeTrack", "silenceTrack", "playOnTrack", "sayOnTrack"]
14
+ },
15
+ "track": {
16
+ "type": "string",
17
+ "description": "The name of the audio track. Used to reference the track in subsequent dub actions.",
18
+ "examples": ["background-music", "coach-whisper"]
19
+ },
20
+ "play": {
21
+ "type": "string",
22
+ "format": "uri",
23
+ "description": "URL of an audio file to play on the track. Used with 'playOnTrack' action."
24
+ },
25
+ "say": {
26
+ "oneOf": [
27
+ { "type": "string" },
28
+ { "type": "object", "additionalProperties": true }
29
+ ],
30
+ "description": "Text to synthesize and play on the track. Used with 'sayOnTrack' action. Can be a string or a say configuration object."
31
+ },
32
+ "loop": {
33
+ "type": "boolean",
34
+ "description": "If true, loop the audio on the track continuously."
35
+ },
36
+ "gain": {
37
+ "oneOf": [
38
+ { "type": "number" },
39
+ { "type": "string" }
40
+ ],
41
+ "description": "Audio gain for the track in dB. Use negative values to reduce volume.",
42
+ "examples": [-10, 0, 6]
43
+ }
44
+ },
45
+ "required": ["action", "track"],
46
+ "examples": [
47
+ { "verb": "dub", "action": "addTrack", "track": "bgm" },
48
+ { "verb": "dub", "action": "playOnTrack", "track": "bgm", "play": "https://example.com/music.mp3", "loop": true, "gain": -15 },
49
+ { "verb": "dub", "action": "sayOnTrack", "track": "coach", "say": "Ask about their budget" },
50
+ { "verb": "dub", "action": "removeTrack", "track": "bgm" }
51
+ ]
52
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://jambonz.org/schema/verbs/enqueue",
4
+ "title": "Enqueue",
5
+ "description": "Places the caller into a named call queue. While in the queue, the caller hears content returned by the waitHook (typically hold music or position announcements). The caller remains in the queue until dequeued by another call or process.",
6
+ "type": "object",
7
+ "properties": {
8
+ "verb": { "const": "enqueue" },
9
+ "id": { "type": "string", "description": "An optional unique identifier for this verb instance." },
10
+ "name": {
11
+ "type": "string",
12
+ "description": "The name of the queue to place the caller in. Queues are created implicitly when first referenced.",
13
+ "examples": ["support", "sales"]
14
+ },
15
+ "actionHook": {
16
+ "$ref": "../components/actionHook",
17
+ "description": "A webhook invoked when the caller leaves the queue (either dequeued or hung up). Should return the next verbs to execute."
18
+ },
19
+ "waitHook": {
20
+ "$ref": "../components/actionHook",
21
+ "description": "A webhook invoked immediately when the caller enters the queue and periodically while waiting. Should return verbs to play to the caller (e.g. hold music, queue position announcements)."
22
+ },
23
+ "priority": {
24
+ "type": "number",
25
+ "description": "The priority of this caller in the queue. Lower numbers are higher priority and are dequeued first.",
26
+ "examples": [1, 5, 10]
27
+ }
28
+ },
29
+ "required": ["name"],
30
+ "examples": [
31
+ {
32
+ "verb": "enqueue",
33
+ "name": "support",
34
+ "waitHook": "/queue-wait",
35
+ "actionHook": "/queue-exit"
36
+ }
37
+ ]
38
+ }
@@ -0,0 +1,145 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://jambonz.org/schema/verbs/gather",
4
+ "title": "Gather",
5
+ "description": "Collects user input via speech (STT) and/or DTMF digits. Optionally plays a prompt (using nested 'say' or 'play') while listening. When input is received, the result is sent to the actionHook which should return the next set of verbs. This is the primary verb for building interactive voice menus and conversational flows.",
6
+ "type": "object",
7
+ "properties": {
8
+ "verb": {
9
+ "const": "gather",
10
+ "description": "The verb name."
11
+ },
12
+ "id": {
13
+ "type": "string",
14
+ "description": "An optional unique identifier for this verb instance."
15
+ },
16
+ "actionHook": {
17
+ "$ref": "../components/actionHook",
18
+ "description": "Invoked when the gather completes. The payload includes 'reason' ('speechDetected', 'dtmfDetected', or 'timeout'), 'speech' (object with alternatives[].transcript and alternatives[].confidence when reason is speechDetected), and 'digits' (string when reason is dtmfDetected). In webhook mode this is a URL that receives an HTTP POST. In WebSocket mode this is an event name — use session.on('/hookName', (evt) => {...}) and respond with session.reply()."
19
+ },
20
+ "input": {
21
+ "type": "array",
22
+ "items": {
23
+ "type": "string",
24
+ "enum": ["speech", "digits"]
25
+ },
26
+ "description": "The types of input to accept. Can include 'speech' (STT), 'digits' (DTMF), or both.",
27
+ "default": ["digits"],
28
+ "examples": [["speech", "digits"], ["speech"], ["digits"]]
29
+ },
30
+ "finishOnKey": {
31
+ "type": "string",
32
+ "description": "A DTMF key that signals the end of digit input. The key itself is not included in the collected digits.",
33
+ "examples": ["#", "*"]
34
+ },
35
+ "numDigits": {
36
+ "type": "number",
37
+ "description": "Exact number of DTMF digits to collect. Gather completes automatically when this many digits are received."
38
+ },
39
+ "minDigits": {
40
+ "type": "number",
41
+ "description": "Minimum number of DTMF digits required."
42
+ },
43
+ "maxDigits": {
44
+ "type": "number",
45
+ "description": "Maximum number of DTMF digits to collect."
46
+ },
47
+ "interDigitTimeout": {
48
+ "type": "number",
49
+ "description": "Time in seconds to wait between DTMF digits before considering input complete.",
50
+ "examples": [5]
51
+ },
52
+ "speechTimeout": {
53
+ "type": "number",
54
+ "description": "Time in seconds of silence after speech before considering the utterance complete.",
55
+ "examples": [2, 3]
56
+ },
57
+ "timeout": {
58
+ "type": "number",
59
+ "description": "Overall timeout in seconds. If no input is received within this time, the gather completes with no input and the actionHook is invoked.",
60
+ "examples": [10, 30]
61
+ },
62
+ "partialResultHook": {
63
+ "$ref": "../components/actionHook",
64
+ "description": "A webhook to invoke with interim (partial) speech recognition results. Useful for providing real-time feedback or early processing."
65
+ },
66
+ "listenDuringPrompt": {
67
+ "type": "boolean",
68
+ "description": "If true, listen for input while the prompt is playing. If false, only start listening after the prompt finishes.",
69
+ "default": true
70
+ },
71
+ "dtmfBargein": {
72
+ "type": "boolean",
73
+ "description": "If true, DTMF input interrupts (barges in on) any playing prompt."
74
+ },
75
+ "bargein": {
76
+ "type": "boolean",
77
+ "description": "If true, speech input interrupts (barges in on) any playing prompt."
78
+ },
79
+ "minBargeinWordCount": {
80
+ "type": "number",
81
+ "description": "Minimum number of words that must be recognized before barge-in is triggered. Prevents brief noises from interrupting prompts.",
82
+ "examples": [1, 2]
83
+ },
84
+ "recognizer": {
85
+ "$ref": "../components/recognizer",
86
+ "description": "Override the session-level STT configuration for this gather."
87
+ },
88
+ "say": {
89
+ "$ref": "say",
90
+ "description": "A nested 'say' verb to use as the prompt. Played to the caller while listening for input."
91
+ },
92
+ "play": {
93
+ "$ref": "play",
94
+ "description": "A nested 'play' verb to use as the prompt. Played to the caller while listening for input."
95
+ },
96
+ "fillerNoise": {
97
+ "$ref": "../components/fillerNoise",
98
+ "description": "Filler noise configuration while waiting for the actionHook to respond."
99
+ },
100
+ "actionHookDelayAction": {
101
+ "$ref": "../components/actionHookDelayAction",
102
+ "description": "Configuration for interim actions while the actionHook is processing."
103
+ }
104
+ },
105
+ "examples": [
106
+ {
107
+ "verb": "gather",
108
+ "input": ["speech", "digits"],
109
+ "actionHook": "/gather-result",
110
+ "timeout": 15,
111
+ "say": {
112
+ "text": "Please say or enter your account number."
113
+ }
114
+ },
115
+ {
116
+ "verb": "gather",
117
+ "input": ["digits"],
118
+ "actionHook": "/menu-selection",
119
+ "numDigits": 1,
120
+ "say": {
121
+ "text": "Press 1 for sales, 2 for support, or 3 for billing."
122
+ }
123
+ },
124
+ {
125
+ "verb": "gather",
126
+ "input": ["speech"],
127
+ "actionHook": "/process-speech",
128
+ "timeout": 20,
129
+ "bargein": true,
130
+ "recognizer": {
131
+ "vendor": "deepgram",
132
+ "language": "en-US",
133
+ "hints": ["account", "balance", "transfer", "payment"]
134
+ },
135
+ "say": {
136
+ "text": "How can I help you today?"
137
+ },
138
+ "fillerNoise": {
139
+ "enable": true,
140
+ "url": "https://example.com/sounds/typing.wav",
141
+ "startDelaySecs": 2
142
+ }
143
+ }
144
+ ]
145
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://jambonz.org/schema/verbs/hangup",
4
+ "title": "Hangup",
5
+ "description": "Terminates the call. Optionally includes custom SIP headers on the BYE request.",
6
+ "type": "object",
7
+ "properties": {
8
+ "verb": {
9
+ "const": "hangup",
10
+ "description": "The verb name."
11
+ },
12
+ "id": {
13
+ "type": "string",
14
+ "description": "An optional unique identifier for this verb instance."
15
+ },
16
+ "headers": {
17
+ "type": "object",
18
+ "description": "Custom SIP headers to include on the BYE request.",
19
+ "additionalProperties": { "type": "string" }
20
+ }
21
+ },
22
+ "examples": [
23
+ { "verb": "hangup" },
24
+ {
25
+ "verb": "hangup",
26
+ "headers": { "X-Reason": "call-complete" }
27
+ }
28
+ ]
29
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://jambonz.org/schema/verbs/leave",
4
+ "title": "Leave",
5
+ "description": "Removes the caller from a conference or queue that they are currently in. Execution continues with the next verb in the application.",
6
+ "type": "object",
7
+ "properties": {
8
+ "verb": { "const": "leave" },
9
+ "id": { "type": "string", "description": "An optional unique identifier for this verb instance." }
10
+ },
11
+ "examples": [{ "verb": "leave" }]
12
+ }