jambonz-python-sdk 0.2.0__py3-none-any.whl
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.
- jambonz_python_sdk-0.2.0.dist-info/METADATA +179 -0
- jambonz_python_sdk-0.2.0.dist-info/RECORD +119 -0
- jambonz_python_sdk-0.2.0.dist-info/WHEEL +4 -0
- jambonz_sdk/__init__.py +52 -0
- jambonz_sdk/_signature.py +73 -0
- jambonz_sdk/client/__init__.py +15 -0
- jambonz_sdk/client/api.py +241 -0
- jambonz_sdk/schema/callbacks/amd.schema.json +50 -0
- jambonz_sdk/schema/callbacks/base.schema.json +29 -0
- jambonz_sdk/schema/callbacks/call-status.schema.json +22 -0
- jambonz_sdk/schema/callbacks/conference-status.schema.json +24 -0
- jambonz_sdk/schema/callbacks/conference-wait.schema.json +11 -0
- jambonz_sdk/schema/callbacks/conference.schema.json +11 -0
- jambonz_sdk/schema/callbacks/dequeue.schema.json +19 -0
- jambonz_sdk/schema/callbacks/dial-dtmf.schema.json +18 -0
- jambonz_sdk/schema/callbacks/dial-hold.schema.json +22 -0
- jambonz_sdk/schema/callbacks/dial-refer.schema.json +28 -0
- jambonz_sdk/schema/callbacks/dial.schema.json +31 -0
- jambonz_sdk/schema/callbacks/enqueue-wait.schema.json +17 -0
- jambonz_sdk/schema/callbacks/enqueue.schema.json +27 -0
- jambonz_sdk/schema/callbacks/gather-partial.schema.json +54 -0
- jambonz_sdk/schema/callbacks/gather.schema.json +60 -0
- jambonz_sdk/schema/callbacks/listen.schema.json +21 -0
- jambonz_sdk/schema/callbacks/llm.schema.json +30 -0
- jambonz_sdk/schema/callbacks/message.schema.json +35 -0
- jambonz_sdk/schema/callbacks/pipeline-turn.schema.json +109 -0
- jambonz_sdk/schema/callbacks/play.schema.json +36 -0
- jambonz_sdk/schema/callbacks/session-new.schema.json +143 -0
- jambonz_sdk/schema/callbacks/session-reconnect.schema.json +9 -0
- jambonz_sdk/schema/callbacks/session-redirect.schema.json +38 -0
- jambonz_sdk/schema/callbacks/sip-refer-event.schema.json +20 -0
- jambonz_sdk/schema/callbacks/sip-refer.schema.json +22 -0
- jambonz_sdk/schema/callbacks/sip-request.schema.json +27 -0
- jambonz_sdk/schema/callbacks/transcribe-translation.schema.json +24 -0
- jambonz_sdk/schema/callbacks/transcribe.schema.json +46 -0
- jambonz_sdk/schema/callbacks/tts-streaming-event.schema.json +77 -0
- jambonz_sdk/schema/callbacks/verb-status.schema.json +57 -0
- jambonz_sdk/schema/components/actionHook.schema.json +36 -0
- jambonz_sdk/schema/components/actionHookDelayAction.schema.json +37 -0
- jambonz_sdk/schema/components/amd.schema.json +68 -0
- jambonz_sdk/schema/components/auth.schema.json +18 -0
- jambonz_sdk/schema/components/bidirectionalAudio.schema.json +22 -0
- jambonz_sdk/schema/components/fillerNoise.schema.json +25 -0
- jambonz_sdk/schema/components/llm-base.schema.json +94 -0
- jambonz_sdk/schema/components/recognizer-assemblyAiOptions.schema.json +66 -0
- jambonz_sdk/schema/components/recognizer-awsOptions.schema.json +52 -0
- jambonz_sdk/schema/components/recognizer-azureOptions.schema.json +32 -0
- jambonz_sdk/schema/components/recognizer-cobaltOptions.schema.json +34 -0
- jambonz_sdk/schema/components/recognizer-customOptions.schema.json +27 -0
- jambonz_sdk/schema/components/recognizer-deepgramOptions.schema.json +147 -0
- jambonz_sdk/schema/components/recognizer-elevenlabsOptions.schema.json +39 -0
- jambonz_sdk/schema/components/recognizer-gladiaOptions.schema.json +8 -0
- jambonz_sdk/schema/components/recognizer-googleOptions.schema.json +35 -0
- jambonz_sdk/schema/components/recognizer-houndifyOptions.schema.json +53 -0
- jambonz_sdk/schema/components/recognizer-ibmOptions.schema.json +54 -0
- jambonz_sdk/schema/components/recognizer-nuanceOptions.schema.json +150 -0
- jambonz_sdk/schema/components/recognizer-nvidiaOptions.schema.json +39 -0
- jambonz_sdk/schema/components/recognizer-openaiOptions.schema.json +59 -0
- jambonz_sdk/schema/components/recognizer-sonioxOptions.schema.json +46 -0
- jambonz_sdk/schema/components/recognizer-speechmaticsOptions.schema.json +100 -0
- jambonz_sdk/schema/components/recognizer-verbioOptions.schema.json +46 -0
- jambonz_sdk/schema/components/recognizer.schema.json +216 -0
- jambonz_sdk/schema/components/synthesizer.schema.json +82 -0
- jambonz_sdk/schema/components/target.schema.json +105 -0
- jambonz_sdk/schema/components/vad.schema.json +48 -0
- jambonz_sdk/schema/jambonz-app.schema.json +113 -0
- jambonz_sdk/schema/verbs/alert.schema.json +34 -0
- jambonz_sdk/schema/verbs/answer.schema.json +22 -0
- jambonz_sdk/schema/verbs/conference.schema.json +107 -0
- jambonz_sdk/schema/verbs/config.schema.json +221 -0
- jambonz_sdk/schema/verbs/deepgram_s2s.schema.json +81 -0
- jambonz_sdk/schema/verbs/dequeue.schema.json +51 -0
- jambonz_sdk/schema/verbs/dial.schema.json +200 -0
- jambonz_sdk/schema/verbs/dialogflow.schema.json +148 -0
- jambonz_sdk/schema/verbs/dtmf.schema.json +49 -0
- jambonz_sdk/schema/verbs/dub.schema.json +103 -0
- jambonz_sdk/schema/verbs/elevenlabs_s2s.schema.json +81 -0
- jambonz_sdk/schema/verbs/enqueue.schema.json +53 -0
- jambonz_sdk/schema/verbs/gather.schema.json +190 -0
- jambonz_sdk/schema/verbs/google_s2s.schema.json +42 -0
- jambonz_sdk/schema/verbs/hangup.schema.json +36 -0
- jambonz_sdk/schema/verbs/leave.schema.json +22 -0
- jambonz_sdk/schema/verbs/listen.schema.json +127 -0
- jambonz_sdk/schema/verbs/llm.schema.json +44 -0
- jambonz_sdk/schema/verbs/message.schema.json +82 -0
- jambonz_sdk/schema/verbs/openai_s2s.schema.json +42 -0
- jambonz_sdk/schema/verbs/pause.schema.json +36 -0
- jambonz_sdk/schema/verbs/pipeline.schema.json +240 -0
- jambonz_sdk/schema/verbs/play.schema.json +96 -0
- jambonz_sdk/schema/verbs/redirect.schema.json +34 -0
- jambonz_sdk/schema/verbs/rest_dial.schema.json +113 -0
- jambonz_sdk/schema/verbs/s2s.schema.json +39 -0
- jambonz_sdk/schema/verbs/say.schema.json +107 -0
- jambonz_sdk/schema/verbs/sip-decline.schema.json +58 -0
- jambonz_sdk/schema/verbs/sip-refer.schema.json +58 -0
- jambonz_sdk/schema/verbs/sip-request.schema.json +54 -0
- jambonz_sdk/schema/verbs/stream.schema.json +103 -0
- jambonz_sdk/schema/verbs/tag.schema.json +41 -0
- jambonz_sdk/schema/verbs/transcribe.schema.json +57 -0
- jambonz_sdk/schema/verbs/ultravox_s2s.schema.json +41 -0
- jambonz_sdk/types/__init__.py +139 -0
- jambonz_sdk/types/components.py +250 -0
- jambonz_sdk/types/rest.py +59 -0
- jambonz_sdk/types/session.py +55 -0
- jambonz_sdk/types/verbs.py +572 -0
- jambonz_sdk/validator.py +107 -0
- jambonz_sdk/verb_builder.py +316 -0
- jambonz_sdk/verb_builder.pyi +1133 -0
- jambonz_sdk/verb_registry.py +102 -0
- jambonz_sdk/webhook/__init__.py +10 -0
- jambonz_sdk/webhook/middleware.py +63 -0
- jambonz_sdk/webhook/response.py +43 -0
- jambonz_sdk/websocket/__init__.py +15 -0
- jambonz_sdk/websocket/audio_client.py +11 -0
- jambonz_sdk/websocket/audio_stream.py +151 -0
- jambonz_sdk/websocket/client.py +165 -0
- jambonz_sdk/websocket/endpoint.py +193 -0
- jambonz_sdk/websocket/router.py +87 -0
- jambonz_sdk/websocket/session.py +259 -0
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://jambonz.org/schema/verbs/dial",
|
|
4
|
+
"minVersion": "0.9.6",
|
|
5
|
+
"title": "Dial",
|
|
6
|
+
"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.",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"verb": {
|
|
10
|
+
"const": "dial",
|
|
11
|
+
"description": "The verb name."
|
|
12
|
+
},
|
|
13
|
+
"id": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"description": "An optional unique identifier for this verb instance."
|
|
16
|
+
},
|
|
17
|
+
"target": {
|
|
18
|
+
"type": "array",
|
|
19
|
+
"items": {
|
|
20
|
+
"$ref": "../components/target"
|
|
21
|
+
},
|
|
22
|
+
"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.",
|
|
23
|
+
"minItems": 1
|
|
24
|
+
},
|
|
25
|
+
"actionHook": {
|
|
26
|
+
"$ref": "../components/actionHook",
|
|
27
|
+
"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."
|
|
28
|
+
},
|
|
29
|
+
"onHoldHook": {
|
|
30
|
+
"$ref": "../components/actionHook",
|
|
31
|
+
"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."
|
|
32
|
+
},
|
|
33
|
+
"answerOnBridge": {
|
|
34
|
+
"type": "boolean",
|
|
35
|
+
"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."
|
|
36
|
+
},
|
|
37
|
+
"callerId": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"description": "The caller ID (phone number) to present on the outbound call. Overrides the default caller ID.",
|
|
40
|
+
"examples": [
|
|
41
|
+
"+15085551212"
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
"callerName": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"description": "The caller display name to present on the outbound call."
|
|
47
|
+
},
|
|
48
|
+
"confirmHook": {
|
|
49
|
+
"$ref": "../components/actionHook",
|
|
50
|
+
"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."
|
|
51
|
+
},
|
|
52
|
+
"referHook": {
|
|
53
|
+
"$ref": "../components/actionHook",
|
|
54
|
+
"description": "A webhook invoked when a SIP REFER is received on the bridged call. Allows handling call transfers initiated by the far end."
|
|
55
|
+
},
|
|
56
|
+
"dialMusic": {
|
|
57
|
+
"type": "string",
|
|
58
|
+
"format": "uri",
|
|
59
|
+
"description": "URL of an audio file to play to the caller while the outbound call is ringing. Replaces the default ringback tone."
|
|
60
|
+
},
|
|
61
|
+
"dtmfCapture": {
|
|
62
|
+
"oneOf": [
|
|
63
|
+
{
|
|
64
|
+
"type": "array",
|
|
65
|
+
"items": { "type": "string" },
|
|
66
|
+
"description": "Array of DTMF patterns to capture on both call legs."
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"type": "object",
|
|
70
|
+
"description": "Per-leg DTMF capture configuration with childCall and/or parentCall arrays.",
|
|
71
|
+
"additionalProperties": true
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
"description": "Configuration for capturing DTMF digits during the bridged call. Can be a simple array of patterns (applied to both legs) or an object with childCall/parentCall arrays."
|
|
75
|
+
},
|
|
76
|
+
"dtmfHook": {
|
|
77
|
+
"$ref": "../components/actionHook",
|
|
78
|
+
"description": "A webhook invoked when a captured DTMF pattern is detected during the bridged call."
|
|
79
|
+
},
|
|
80
|
+
"headers": {
|
|
81
|
+
"type": "object",
|
|
82
|
+
"description": "Custom SIP headers to include on the outbound INVITE.",
|
|
83
|
+
"additionalProperties": {
|
|
84
|
+
"oneOf": [{ "type": "string" }, { "type": "number" }]
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"anchorMedia": {
|
|
88
|
+
"type": "boolean",
|
|
89
|
+
"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."
|
|
90
|
+
},
|
|
91
|
+
"exitMediaPath": {
|
|
92
|
+
"type": "boolean",
|
|
93
|
+
"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."
|
|
94
|
+
},
|
|
95
|
+
"boostAudioSignal": {
|
|
96
|
+
"oneOf": [
|
|
97
|
+
{
|
|
98
|
+
"type": "number"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"type": "string"
|
|
102
|
+
}
|
|
103
|
+
],
|
|
104
|
+
"description": "Boost (or attenuate) the audio signal in dB. Positive values increase volume, negative values decrease it.",
|
|
105
|
+
"examples": [
|
|
106
|
+
6,
|
|
107
|
+
-3
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
"listen": {
|
|
111
|
+
"type": "object",
|
|
112
|
+
"description": "Nested listen configuration for streaming audio of the bridged call.",
|
|
113
|
+
"additionalProperties": true
|
|
114
|
+
},
|
|
115
|
+
"stream": {
|
|
116
|
+
"type": "object",
|
|
117
|
+
"description": "Nested stream configuration for streaming audio of the bridged call. Alias for 'listen'.",
|
|
118
|
+
"additionalProperties": true
|
|
119
|
+
},
|
|
120
|
+
"transcribe": {
|
|
121
|
+
"type": "object",
|
|
122
|
+
"description": "Nested transcribe configuration for real-time transcription of the bridged call.",
|
|
123
|
+
"additionalProperties": true
|
|
124
|
+
},
|
|
125
|
+
"timeLimit": {
|
|
126
|
+
"type": "number",
|
|
127
|
+
"description": "Maximum duration in seconds for the bridged call. The call is automatically hung up when this limit is reached.",
|
|
128
|
+
"examples": [
|
|
129
|
+
3600
|
|
130
|
+
]
|
|
131
|
+
},
|
|
132
|
+
"timeout": {
|
|
133
|
+
"type": "number",
|
|
134
|
+
"description": "Time in seconds to wait for the target to answer before giving up.",
|
|
135
|
+
"examples": [
|
|
136
|
+
30,
|
|
137
|
+
60
|
|
138
|
+
]
|
|
139
|
+
},
|
|
140
|
+
"proxy": {
|
|
141
|
+
"type": "string",
|
|
142
|
+
"description": "A SIP proxy to route the outbound call through.",
|
|
143
|
+
"examples": [
|
|
144
|
+
"sip:proxy.example.com"
|
|
145
|
+
]
|
|
146
|
+
},
|
|
147
|
+
"amd": {
|
|
148
|
+
"$ref": "../components/amd",
|
|
149
|
+
"description": "Answering machine detection configuration. When enabled, jambonz attempts to determine whether the call was answered by a human or a machine."
|
|
150
|
+
},
|
|
151
|
+
"dub": {
|
|
152
|
+
"type": "array",
|
|
153
|
+
"items": {
|
|
154
|
+
"$ref": "dub"
|
|
155
|
+
},
|
|
156
|
+
"description": "Nested dub verbs — audio dubbing configuration for mixing additional audio tracks into the bridged call."
|
|
157
|
+
},
|
|
158
|
+
"tag": {
|
|
159
|
+
"type": "object",
|
|
160
|
+
"description": "Arbitrary metadata to attach to this call leg. Included in subsequent webhook invocations and CDRs.",
|
|
161
|
+
"additionalProperties": true
|
|
162
|
+
},
|
|
163
|
+
"forwardPAI": {
|
|
164
|
+
"type": "boolean",
|
|
165
|
+
"description": "If true, forward the P-Asserted-Identity header from the inbound call to the outbound call."
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
"required": [
|
|
169
|
+
"target"
|
|
170
|
+
],
|
|
171
|
+
"examples": [
|
|
172
|
+
{
|
|
173
|
+
"verb": "dial",
|
|
174
|
+
"target": [
|
|
175
|
+
{
|
|
176
|
+
"type": "phone",
|
|
177
|
+
"number": "+15085551212"
|
|
178
|
+
}
|
|
179
|
+
],
|
|
180
|
+
"answerOnBridge": true,
|
|
181
|
+
"timeout": 30,
|
|
182
|
+
"actionHook": "/dial-complete"
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"verb": "dial",
|
|
186
|
+
"target": [
|
|
187
|
+
{
|
|
188
|
+
"type": "sip",
|
|
189
|
+
"sipUri": "sip:alice@example.com"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"type": "sip",
|
|
193
|
+
"sipUri": "sip:bob@example.com"
|
|
194
|
+
}
|
|
195
|
+
],
|
|
196
|
+
"confirmHook": "/screen-call",
|
|
197
|
+
"timeLimit": 3600
|
|
198
|
+
}
|
|
199
|
+
]
|
|
200
|
+
}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://jambonz.org/schema/verbs/dialogflow",
|
|
4
|
+
"minVersion": "0.9.6",
|
|
5
|
+
"title": "Dialogflow",
|
|
6
|
+
"description": "Connects the caller to a Google Dialogflow agent for a voice conversation. Supports Dialogflow ES, CX, and CES models. The caller speaks and Dialogflow handles intent detection and response generation.",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"verb": {
|
|
10
|
+
"const": "dialogflow",
|
|
11
|
+
"description": "The verb name."
|
|
12
|
+
},
|
|
13
|
+
"id": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"description": "An optional unique identifier for this verb instance."
|
|
16
|
+
},
|
|
17
|
+
"credentials": {
|
|
18
|
+
"oneOf": [
|
|
19
|
+
{
|
|
20
|
+
"type": "object",
|
|
21
|
+
"additionalProperties": true
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"type": "string"
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"description": "Google service account credentials as a JSON object or stringified JSON."
|
|
28
|
+
},
|
|
29
|
+
"project": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"description": "The Google Cloud project ID."
|
|
32
|
+
},
|
|
33
|
+
"agent": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"description": "The Dialogflow agent ID. Required for CX agents."
|
|
36
|
+
},
|
|
37
|
+
"environment": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"description": "The Dialogflow environment to use."
|
|
40
|
+
},
|
|
41
|
+
"region": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"description": "The Google Cloud region for the Dialogflow API endpoint."
|
|
44
|
+
},
|
|
45
|
+
"model": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"enum": [
|
|
48
|
+
"es",
|
|
49
|
+
"cx",
|
|
50
|
+
"ces"
|
|
51
|
+
],
|
|
52
|
+
"description": "The Dialogflow model type: 'es' for Dialogflow ES, 'cx' for Dialogflow CX, 'ces' for Dialogflow CES."
|
|
53
|
+
},
|
|
54
|
+
"lang": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"description": "The language code for the conversation (e.g. 'en-US')."
|
|
57
|
+
},
|
|
58
|
+
"actionHook": {
|
|
59
|
+
"$ref": "../components/actionHook",
|
|
60
|
+
"description": "A webhook invoked when the Dialogflow session ends."
|
|
61
|
+
},
|
|
62
|
+
"eventHook": {
|
|
63
|
+
"$ref": "../components/actionHook",
|
|
64
|
+
"description": "A webhook invoked for Dialogflow events during the conversation."
|
|
65
|
+
},
|
|
66
|
+
"events": {
|
|
67
|
+
"type": "array",
|
|
68
|
+
"items": {
|
|
69
|
+
"type": "string"
|
|
70
|
+
},
|
|
71
|
+
"description": "List of event types to receive via the eventHook."
|
|
72
|
+
},
|
|
73
|
+
"welcomeEvent": {
|
|
74
|
+
"type": "string",
|
|
75
|
+
"description": "A Dialogflow event to trigger at the start of the conversation (e.g. 'welcome')."
|
|
76
|
+
},
|
|
77
|
+
"welcomeEventParams": {
|
|
78
|
+
"type": "object",
|
|
79
|
+
"description": "Parameters to pass with the welcome event.",
|
|
80
|
+
"additionalProperties": true
|
|
81
|
+
},
|
|
82
|
+
"noInputTimeout": {
|
|
83
|
+
"type": "number",
|
|
84
|
+
"description": "Seconds to wait for caller input before triggering the no-input event."
|
|
85
|
+
},
|
|
86
|
+
"noInputEvent": {
|
|
87
|
+
"type": "string",
|
|
88
|
+
"description": "Dialogflow event to trigger when no input is received within the timeout."
|
|
89
|
+
},
|
|
90
|
+
"passDtmfAsTextInput": {
|
|
91
|
+
"type": "boolean",
|
|
92
|
+
"description": "If true, pass DTMF digits to Dialogflow as text input."
|
|
93
|
+
},
|
|
94
|
+
"thinkingMusic": {
|
|
95
|
+
"type": "string",
|
|
96
|
+
"description": "URL of an audio file to play while waiting for Dialogflow to respond."
|
|
97
|
+
},
|
|
98
|
+
"tts": {
|
|
99
|
+
"$ref": "../components/synthesizer",
|
|
100
|
+
"description": "TTS configuration for Dialogflow responses."
|
|
101
|
+
},
|
|
102
|
+
"bargein": {
|
|
103
|
+
"type": "boolean",
|
|
104
|
+
"description": "If true, allow the caller to interrupt Dialogflow responses with speech."
|
|
105
|
+
},
|
|
106
|
+
"queryInput": {
|
|
107
|
+
"type": "object",
|
|
108
|
+
"description": "Initial query input to send to Dialogflow.",
|
|
109
|
+
"properties": {
|
|
110
|
+
"text": {
|
|
111
|
+
"type": "string",
|
|
112
|
+
"description": "Text input."
|
|
113
|
+
},
|
|
114
|
+
"intent": {
|
|
115
|
+
"type": "string",
|
|
116
|
+
"description": "Intent to trigger."
|
|
117
|
+
},
|
|
118
|
+
"event": {
|
|
119
|
+
"type": "string",
|
|
120
|
+
"description": "Event to trigger."
|
|
121
|
+
},
|
|
122
|
+
"dtmf": {
|
|
123
|
+
"type": "string",
|
|
124
|
+
"description": "DTMF input."
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"additionalProperties": false
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"required": [
|
|
131
|
+
"project",
|
|
132
|
+
"credentials",
|
|
133
|
+
"lang"
|
|
134
|
+
],
|
|
135
|
+
"examples": [
|
|
136
|
+
{
|
|
137
|
+
"verb": "dialogflow",
|
|
138
|
+
"project": "my-gcp-project",
|
|
139
|
+
"credentials": "{\"type\": \"service_account\", \"project_id\": \"my-gcp-project\"}",
|
|
140
|
+
"lang": "en-US",
|
|
141
|
+
"model": "cx",
|
|
142
|
+
"agent": "my-agent-id",
|
|
143
|
+
"welcomeEvent": "welcome",
|
|
144
|
+
"actionHook": "/dialogflow-action",
|
|
145
|
+
"eventHook": "/dialogflow-event"
|
|
146
|
+
}
|
|
147
|
+
]
|
|
148
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://jambonz.org/schema/verbs/dtmf",
|
|
4
|
+
"minVersion": "0.9.6",
|
|
5
|
+
"title": "DTMF",
|
|
6
|
+
"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.",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"verb": {
|
|
10
|
+
"const": "dtmf"
|
|
11
|
+
},
|
|
12
|
+
"id": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "An optional unique identifier for this verb instance."
|
|
15
|
+
},
|
|
16
|
+
"dtmf": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"description": "The DTMF digits to send. Valid characters are 0-9, *, #, and A-D. Use 'w' for a 500ms pause between digits.",
|
|
19
|
+
"examples": [
|
|
20
|
+
"1234#",
|
|
21
|
+
"1w2w3",
|
|
22
|
+
"5551212"
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
"duration": {
|
|
26
|
+
"type": "number",
|
|
27
|
+
"description": "Duration in milliseconds for each DTMF tone.",
|
|
28
|
+
"default": 500,
|
|
29
|
+
"examples": [
|
|
30
|
+
250,
|
|
31
|
+
500
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"required": [
|
|
36
|
+
"dtmf"
|
|
37
|
+
],
|
|
38
|
+
"examples": [
|
|
39
|
+
{
|
|
40
|
+
"verb": "dtmf",
|
|
41
|
+
"dtmf": "1234#"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"verb": "dtmf",
|
|
45
|
+
"dtmf": "1w2w3w4",
|
|
46
|
+
"duration": 250
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://jambonz.org/schema/verbs/dub",
|
|
4
|
+
"minVersion": "0.9.6",
|
|
5
|
+
"title": "Dub",
|
|
6
|
+
"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.",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"verb": {
|
|
10
|
+
"const": "dub"
|
|
11
|
+
},
|
|
12
|
+
"id": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "An optional unique identifier for this verb instance."
|
|
15
|
+
},
|
|
16
|
+
"action": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"description": "The dubbing action to perform.",
|
|
19
|
+
"enum": [
|
|
20
|
+
"addTrack",
|
|
21
|
+
"removeTrack",
|
|
22
|
+
"silenceTrack",
|
|
23
|
+
"playOnTrack",
|
|
24
|
+
"sayOnTrack"
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
"track": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"description": "The name of the audio track. Used to reference the track in subsequent dub actions.",
|
|
30
|
+
"examples": [
|
|
31
|
+
"background-music",
|
|
32
|
+
"coach-whisper"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
"play": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"format": "uri",
|
|
38
|
+
"description": "URL of an audio file to play on the track. Used with 'playOnTrack' action."
|
|
39
|
+
},
|
|
40
|
+
"say": {
|
|
41
|
+
"oneOf": [
|
|
42
|
+
{
|
|
43
|
+
"type": "string"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"type": "object",
|
|
47
|
+
"additionalProperties": true
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
"description": "Text to synthesize and play on the track. Used with 'sayOnTrack' action. Can be a string or a say configuration object."
|
|
51
|
+
},
|
|
52
|
+
"loop": {
|
|
53
|
+
"type": "boolean",
|
|
54
|
+
"description": "If true, loop the audio on the track continuously."
|
|
55
|
+
},
|
|
56
|
+
"gain": {
|
|
57
|
+
"oneOf": [
|
|
58
|
+
{
|
|
59
|
+
"type": "number"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"type": "string"
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"description": "Audio gain for the track in dB. Use negative values to reduce volume.",
|
|
66
|
+
"examples": [
|
|
67
|
+
-10,
|
|
68
|
+
0,
|
|
69
|
+
6
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"required": [
|
|
74
|
+
"action",
|
|
75
|
+
"track"
|
|
76
|
+
],
|
|
77
|
+
"examples": [
|
|
78
|
+
{
|
|
79
|
+
"verb": "dub",
|
|
80
|
+
"action": "addTrack",
|
|
81
|
+
"track": "bgm"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"verb": "dub",
|
|
85
|
+
"action": "playOnTrack",
|
|
86
|
+
"track": "bgm",
|
|
87
|
+
"play": "https://example.com/music.mp3",
|
|
88
|
+
"loop": true,
|
|
89
|
+
"gain": -15
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"verb": "dub",
|
|
93
|
+
"action": "sayOnTrack",
|
|
94
|
+
"track": "coach",
|
|
95
|
+
"say": "Ask about their budget"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"verb": "dub",
|
|
99
|
+
"action": "removeTrack",
|
|
100
|
+
"track": "bgm"
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://jambonz.org/schema/verbs/elevenlabs_s2s",
|
|
4
|
+
"minVersion": "10.1.0",
|
|
5
|
+
"title": "ElevenLabs S2S",
|
|
6
|
+
"description": "Shortcut for 'llm' with vendor automatically set to 'elevenlabs'. Connects the caller to an ElevenLabs Conversational AI agent for real-time speech-to-speech voice conversation. Unlike other s2s vendors, ElevenLabs requires a pre-configured agent_id rather than a model and messages.",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"allOf": [
|
|
9
|
+
{
|
|
10
|
+
"$ref": "../components/llm-base"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"properties": {
|
|
14
|
+
"verb": {
|
|
15
|
+
"const": "elevenlabs_s2s",
|
|
16
|
+
"description": "The verb name."
|
|
17
|
+
},
|
|
18
|
+
"vendor": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"const": "elevenlabs",
|
|
21
|
+
"description": "The LLM vendor (always 'elevenlabs' for this shortcut)."
|
|
22
|
+
},
|
|
23
|
+
"auth": {
|
|
24
|
+
"type": "object",
|
|
25
|
+
"description": "Authentication credentials for ElevenLabs. Requires agent_id; api_key is optional (if not provided, an unsigned URL is used).",
|
|
26
|
+
"properties": {
|
|
27
|
+
"agent_id": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"description": "The ElevenLabs Conversational AI agent ID. Required."
|
|
30
|
+
},
|
|
31
|
+
"api_key": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"description": "The ElevenLabs API key. Optional; when provided, a signed URL is used for the WebSocket connection."
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"required": [
|
|
37
|
+
"agent_id"
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
"llmOptions": {
|
|
41
|
+
"type": "object",
|
|
42
|
+
"description": "Options for the ElevenLabs conversation session.",
|
|
43
|
+
"properties": {
|
|
44
|
+
"conversation_initiation_client_data": {
|
|
45
|
+
"type": "object",
|
|
46
|
+
"description": "Optional data sent to the agent when the conversation starts.",
|
|
47
|
+
"additionalProperties": true
|
|
48
|
+
},
|
|
49
|
+
"input_sample_rate": {
|
|
50
|
+
"type": "integer",
|
|
51
|
+
"description": "Audio input sample rate in Hz.",
|
|
52
|
+
"default": 16000
|
|
53
|
+
},
|
|
54
|
+
"output_sample_rate": {
|
|
55
|
+
"type": "integer",
|
|
56
|
+
"description": "Audio output sample rate in Hz.",
|
|
57
|
+
"default": 16000
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"additionalProperties": true
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"required": [
|
|
64
|
+
"auth"
|
|
65
|
+
],
|
|
66
|
+
"examples": [
|
|
67
|
+
{
|
|
68
|
+
"verb": "elevenlabs_s2s",
|
|
69
|
+
"auth": {
|
|
70
|
+
"agent_id": "your-elevenlabs-agent-id",
|
|
71
|
+
"api_key": "your-elevenlabs-api-key"
|
|
72
|
+
},
|
|
73
|
+
"llmOptions": {},
|
|
74
|
+
"actionHook": "/s2s-complete",
|
|
75
|
+
"eventHook": "/event",
|
|
76
|
+
"events": [
|
|
77
|
+
"all"
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://jambonz.org/schema/verbs/enqueue",
|
|
4
|
+
"minVersion": "0.9.6",
|
|
5
|
+
"title": "Enqueue",
|
|
6
|
+
"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.",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"verb": {
|
|
10
|
+
"const": "enqueue"
|
|
11
|
+
},
|
|
12
|
+
"id": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "An optional unique identifier for this verb instance."
|
|
15
|
+
},
|
|
16
|
+
"name": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"description": "The name of the queue to place the caller in. Queues are created implicitly when first referenced.",
|
|
19
|
+
"examples": [
|
|
20
|
+
"support",
|
|
21
|
+
"sales"
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
"actionHook": {
|
|
25
|
+
"$ref": "../components/actionHook",
|
|
26
|
+
"description": "A webhook invoked when the caller leaves the queue (either dequeued or hung up). Should return the next verbs to execute."
|
|
27
|
+
},
|
|
28
|
+
"waitHook": {
|
|
29
|
+
"$ref": "../components/actionHook",
|
|
30
|
+
"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)."
|
|
31
|
+
},
|
|
32
|
+
"priority": {
|
|
33
|
+
"type": "number",
|
|
34
|
+
"description": "The priority of this caller in the queue. Lower numbers are higher priority and are dequeued first.",
|
|
35
|
+
"examples": [
|
|
36
|
+
1,
|
|
37
|
+
5,
|
|
38
|
+
10
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"required": [
|
|
43
|
+
"name"
|
|
44
|
+
],
|
|
45
|
+
"examples": [
|
|
46
|
+
{
|
|
47
|
+
"verb": "enqueue",
|
|
48
|
+
"name": "support",
|
|
49
|
+
"waitHook": "/queue-wait",
|
|
50
|
+
"actionHook": "/queue-exit"
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
}
|