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.
Files changed (119) hide show
  1. jambonz_python_sdk-0.2.0.dist-info/METADATA +179 -0
  2. jambonz_python_sdk-0.2.0.dist-info/RECORD +119 -0
  3. jambonz_python_sdk-0.2.0.dist-info/WHEEL +4 -0
  4. jambonz_sdk/__init__.py +52 -0
  5. jambonz_sdk/_signature.py +73 -0
  6. jambonz_sdk/client/__init__.py +15 -0
  7. jambonz_sdk/client/api.py +241 -0
  8. jambonz_sdk/schema/callbacks/amd.schema.json +50 -0
  9. jambonz_sdk/schema/callbacks/base.schema.json +29 -0
  10. jambonz_sdk/schema/callbacks/call-status.schema.json +22 -0
  11. jambonz_sdk/schema/callbacks/conference-status.schema.json +24 -0
  12. jambonz_sdk/schema/callbacks/conference-wait.schema.json +11 -0
  13. jambonz_sdk/schema/callbacks/conference.schema.json +11 -0
  14. jambonz_sdk/schema/callbacks/dequeue.schema.json +19 -0
  15. jambonz_sdk/schema/callbacks/dial-dtmf.schema.json +18 -0
  16. jambonz_sdk/schema/callbacks/dial-hold.schema.json +22 -0
  17. jambonz_sdk/schema/callbacks/dial-refer.schema.json +28 -0
  18. jambonz_sdk/schema/callbacks/dial.schema.json +31 -0
  19. jambonz_sdk/schema/callbacks/enqueue-wait.schema.json +17 -0
  20. jambonz_sdk/schema/callbacks/enqueue.schema.json +27 -0
  21. jambonz_sdk/schema/callbacks/gather-partial.schema.json +54 -0
  22. jambonz_sdk/schema/callbacks/gather.schema.json +60 -0
  23. jambonz_sdk/schema/callbacks/listen.schema.json +21 -0
  24. jambonz_sdk/schema/callbacks/llm.schema.json +30 -0
  25. jambonz_sdk/schema/callbacks/message.schema.json +35 -0
  26. jambonz_sdk/schema/callbacks/pipeline-turn.schema.json +109 -0
  27. jambonz_sdk/schema/callbacks/play.schema.json +36 -0
  28. jambonz_sdk/schema/callbacks/session-new.schema.json +143 -0
  29. jambonz_sdk/schema/callbacks/session-reconnect.schema.json +9 -0
  30. jambonz_sdk/schema/callbacks/session-redirect.schema.json +38 -0
  31. jambonz_sdk/schema/callbacks/sip-refer-event.schema.json +20 -0
  32. jambonz_sdk/schema/callbacks/sip-refer.schema.json +22 -0
  33. jambonz_sdk/schema/callbacks/sip-request.schema.json +27 -0
  34. jambonz_sdk/schema/callbacks/transcribe-translation.schema.json +24 -0
  35. jambonz_sdk/schema/callbacks/transcribe.schema.json +46 -0
  36. jambonz_sdk/schema/callbacks/tts-streaming-event.schema.json +77 -0
  37. jambonz_sdk/schema/callbacks/verb-status.schema.json +57 -0
  38. jambonz_sdk/schema/components/actionHook.schema.json +36 -0
  39. jambonz_sdk/schema/components/actionHookDelayAction.schema.json +37 -0
  40. jambonz_sdk/schema/components/amd.schema.json +68 -0
  41. jambonz_sdk/schema/components/auth.schema.json +18 -0
  42. jambonz_sdk/schema/components/bidirectionalAudio.schema.json +22 -0
  43. jambonz_sdk/schema/components/fillerNoise.schema.json +25 -0
  44. jambonz_sdk/schema/components/llm-base.schema.json +94 -0
  45. jambonz_sdk/schema/components/recognizer-assemblyAiOptions.schema.json +66 -0
  46. jambonz_sdk/schema/components/recognizer-awsOptions.schema.json +52 -0
  47. jambonz_sdk/schema/components/recognizer-azureOptions.schema.json +32 -0
  48. jambonz_sdk/schema/components/recognizer-cobaltOptions.schema.json +34 -0
  49. jambonz_sdk/schema/components/recognizer-customOptions.schema.json +27 -0
  50. jambonz_sdk/schema/components/recognizer-deepgramOptions.schema.json +147 -0
  51. jambonz_sdk/schema/components/recognizer-elevenlabsOptions.schema.json +39 -0
  52. jambonz_sdk/schema/components/recognizer-gladiaOptions.schema.json +8 -0
  53. jambonz_sdk/schema/components/recognizer-googleOptions.schema.json +35 -0
  54. jambonz_sdk/schema/components/recognizer-houndifyOptions.schema.json +53 -0
  55. jambonz_sdk/schema/components/recognizer-ibmOptions.schema.json +54 -0
  56. jambonz_sdk/schema/components/recognizer-nuanceOptions.schema.json +150 -0
  57. jambonz_sdk/schema/components/recognizer-nvidiaOptions.schema.json +39 -0
  58. jambonz_sdk/schema/components/recognizer-openaiOptions.schema.json +59 -0
  59. jambonz_sdk/schema/components/recognizer-sonioxOptions.schema.json +46 -0
  60. jambonz_sdk/schema/components/recognizer-speechmaticsOptions.schema.json +100 -0
  61. jambonz_sdk/schema/components/recognizer-verbioOptions.schema.json +46 -0
  62. jambonz_sdk/schema/components/recognizer.schema.json +216 -0
  63. jambonz_sdk/schema/components/synthesizer.schema.json +82 -0
  64. jambonz_sdk/schema/components/target.schema.json +105 -0
  65. jambonz_sdk/schema/components/vad.schema.json +48 -0
  66. jambonz_sdk/schema/jambonz-app.schema.json +113 -0
  67. jambonz_sdk/schema/verbs/alert.schema.json +34 -0
  68. jambonz_sdk/schema/verbs/answer.schema.json +22 -0
  69. jambonz_sdk/schema/verbs/conference.schema.json +107 -0
  70. jambonz_sdk/schema/verbs/config.schema.json +221 -0
  71. jambonz_sdk/schema/verbs/deepgram_s2s.schema.json +81 -0
  72. jambonz_sdk/schema/verbs/dequeue.schema.json +51 -0
  73. jambonz_sdk/schema/verbs/dial.schema.json +200 -0
  74. jambonz_sdk/schema/verbs/dialogflow.schema.json +148 -0
  75. jambonz_sdk/schema/verbs/dtmf.schema.json +49 -0
  76. jambonz_sdk/schema/verbs/dub.schema.json +103 -0
  77. jambonz_sdk/schema/verbs/elevenlabs_s2s.schema.json +81 -0
  78. jambonz_sdk/schema/verbs/enqueue.schema.json +53 -0
  79. jambonz_sdk/schema/verbs/gather.schema.json +190 -0
  80. jambonz_sdk/schema/verbs/google_s2s.schema.json +42 -0
  81. jambonz_sdk/schema/verbs/hangup.schema.json +36 -0
  82. jambonz_sdk/schema/verbs/leave.schema.json +22 -0
  83. jambonz_sdk/schema/verbs/listen.schema.json +127 -0
  84. jambonz_sdk/schema/verbs/llm.schema.json +44 -0
  85. jambonz_sdk/schema/verbs/message.schema.json +82 -0
  86. jambonz_sdk/schema/verbs/openai_s2s.schema.json +42 -0
  87. jambonz_sdk/schema/verbs/pause.schema.json +36 -0
  88. jambonz_sdk/schema/verbs/pipeline.schema.json +240 -0
  89. jambonz_sdk/schema/verbs/play.schema.json +96 -0
  90. jambonz_sdk/schema/verbs/redirect.schema.json +34 -0
  91. jambonz_sdk/schema/verbs/rest_dial.schema.json +113 -0
  92. jambonz_sdk/schema/verbs/s2s.schema.json +39 -0
  93. jambonz_sdk/schema/verbs/say.schema.json +107 -0
  94. jambonz_sdk/schema/verbs/sip-decline.schema.json +58 -0
  95. jambonz_sdk/schema/verbs/sip-refer.schema.json +58 -0
  96. jambonz_sdk/schema/verbs/sip-request.schema.json +54 -0
  97. jambonz_sdk/schema/verbs/stream.schema.json +103 -0
  98. jambonz_sdk/schema/verbs/tag.schema.json +41 -0
  99. jambonz_sdk/schema/verbs/transcribe.schema.json +57 -0
  100. jambonz_sdk/schema/verbs/ultravox_s2s.schema.json +41 -0
  101. jambonz_sdk/types/__init__.py +139 -0
  102. jambonz_sdk/types/components.py +250 -0
  103. jambonz_sdk/types/rest.py +59 -0
  104. jambonz_sdk/types/session.py +55 -0
  105. jambonz_sdk/types/verbs.py +572 -0
  106. jambonz_sdk/validator.py +107 -0
  107. jambonz_sdk/verb_builder.py +316 -0
  108. jambonz_sdk/verb_builder.pyi +1133 -0
  109. jambonz_sdk/verb_registry.py +102 -0
  110. jambonz_sdk/webhook/__init__.py +10 -0
  111. jambonz_sdk/webhook/middleware.py +63 -0
  112. jambonz_sdk/webhook/response.py +43 -0
  113. jambonz_sdk/websocket/__init__.py +15 -0
  114. jambonz_sdk/websocket/audio_client.py +11 -0
  115. jambonz_sdk/websocket/audio_stream.py +151 -0
  116. jambonz_sdk/websocket/client.py +165 -0
  117. jambonz_sdk/websocket/endpoint.py +193 -0
  118. jambonz_sdk/websocket/router.py +87 -0
  119. jambonz_sdk/websocket/session.py +259 -0
@@ -0,0 +1,190 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://jambonz.org/schema/verbs/gather",
4
+ "minVersion": "0.9.6",
5
+ "title": "Gather",
6
+ "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.",
7
+ "type": "object",
8
+ "properties": {
9
+ "verb": {
10
+ "const": "gather",
11
+ "description": "The verb name."
12
+ },
13
+ "id": {
14
+ "type": "string",
15
+ "description": "An optional unique identifier for this verb instance."
16
+ },
17
+ "actionHook": {
18
+ "$ref": "../components/actionHook",
19
+ "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()."
20
+ },
21
+ "input": {
22
+ "type": "array",
23
+ "items": {
24
+ "type": "string",
25
+ "enum": [
26
+ "speech",
27
+ "digits"
28
+ ]
29
+ },
30
+ "description": "The types of input to accept. Can include 'speech' (STT), 'digits' (DTMF), or both.",
31
+ "default": [
32
+ "digits"
33
+ ],
34
+ "examples": [
35
+ [
36
+ "speech",
37
+ "digits"
38
+ ],
39
+ [
40
+ "speech"
41
+ ],
42
+ [
43
+ "digits"
44
+ ]
45
+ ]
46
+ },
47
+ "finishOnKey": {
48
+ "type": "string",
49
+ "description": "A DTMF key that signals the end of digit input. The key itself is not included in the collected digits.",
50
+ "examples": [
51
+ "#",
52
+ "*"
53
+ ]
54
+ },
55
+ "numDigits": {
56
+ "type": "number",
57
+ "description": "Exact number of DTMF digits to collect. Gather completes automatically when this many digits are received."
58
+ },
59
+ "minDigits": {
60
+ "type": "number",
61
+ "description": "Minimum number of DTMF digits required."
62
+ },
63
+ "maxDigits": {
64
+ "type": "number",
65
+ "description": "Maximum number of DTMF digits to collect."
66
+ },
67
+ "interDigitTimeout": {
68
+ "type": "number",
69
+ "description": "Time in seconds to wait between DTMF digits before considering input complete.",
70
+ "examples": [
71
+ 5
72
+ ]
73
+ },
74
+ "speechTimeout": {
75
+ "type": "number",
76
+ "description": "Time in seconds of silence after speech before considering the utterance complete.",
77
+ "examples": [
78
+ 2,
79
+ 3
80
+ ]
81
+ },
82
+ "timeout": {
83
+ "type": "number",
84
+ "description": "Overall timeout in seconds. If no input is received within this time, the gather completes with no input and the actionHook is invoked.",
85
+ "examples": [
86
+ 10,
87
+ 30
88
+ ]
89
+ },
90
+ "partialResultHook": {
91
+ "$ref": "../components/actionHook",
92
+ "description": "A webhook to invoke with interim (partial) speech recognition results. Useful for providing real-time feedback or early processing."
93
+ },
94
+ "listenDuringPrompt": {
95
+ "type": "boolean",
96
+ "description": "If true, listen for input while the prompt is playing. If false, only start listening after the prompt finishes.",
97
+ "default": true
98
+ },
99
+ "dtmfBargein": {
100
+ "type": "boolean",
101
+ "description": "If true, DTMF input interrupts (barges in on) any playing prompt."
102
+ },
103
+ "bargein": {
104
+ "type": "boolean",
105
+ "description": "If true, speech input interrupts (barges in on) any playing prompt."
106
+ },
107
+ "minBargeinWordCount": {
108
+ "type": "number",
109
+ "description": "Minimum number of words that must be recognized before barge-in is triggered. Prevents brief noises from interrupting prompts.",
110
+ "examples": [
111
+ 1,
112
+ 2
113
+ ]
114
+ },
115
+ "recognizer": {
116
+ "$ref": "../components/recognizer",
117
+ "description": "Override the session-level STT configuration for this gather."
118
+ },
119
+ "say": {
120
+ "type": "object",
121
+ "description": "A nested say prompt played to the caller while listening for input. Accepts the same properties as the say verb (text, synthesizer, etc.) but no fields are required.",
122
+ "additionalProperties": true
123
+ },
124
+ "play": {
125
+ "type": "object",
126
+ "description": "A nested play prompt played to the caller while listening for input. Accepts the same properties as the play verb (url, etc.) but no fields are required.",
127
+ "additionalProperties": true
128
+ },
129
+ "fillerNoise": {
130
+ "$ref": "../components/fillerNoise",
131
+ "description": "Filler noise configuration while waiting for the actionHook to respond."
132
+ },
133
+ "actionHookDelayAction": {
134
+ "$ref": "../components/actionHookDelayAction",
135
+ "description": "Configuration for interim actions while the actionHook is processing."
136
+ }
137
+ },
138
+ "examples": [
139
+ {
140
+ "verb": "gather",
141
+ "input": [
142
+ "speech",
143
+ "digits"
144
+ ],
145
+ "actionHook": "/gather-result",
146
+ "timeout": 15,
147
+ "say": {
148
+ "text": "Please say or enter your account number."
149
+ }
150
+ },
151
+ {
152
+ "verb": "gather",
153
+ "input": [
154
+ "digits"
155
+ ],
156
+ "actionHook": "/menu-selection",
157
+ "numDigits": 1,
158
+ "say": {
159
+ "text": "Press 1 for sales, 2 for support, or 3 for billing."
160
+ }
161
+ },
162
+ {
163
+ "verb": "gather",
164
+ "input": [
165
+ "speech"
166
+ ],
167
+ "actionHook": "/process-speech",
168
+ "timeout": 20,
169
+ "bargein": true,
170
+ "recognizer": {
171
+ "vendor": "deepgram",
172
+ "language": "en-US",
173
+ "hints": [
174
+ "account",
175
+ "balance",
176
+ "transfer",
177
+ "payment"
178
+ ]
179
+ },
180
+ "say": {
181
+ "text": "How can I help you today?"
182
+ },
183
+ "fillerNoise": {
184
+ "enable": true,
185
+ "url": "https://example.com/sounds/typing.wav",
186
+ "startDelaySecs": 2
187
+ }
188
+ }
189
+ ]
190
+ }
@@ -0,0 +1,42 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://jambonz.org/schema/verbs/google_s2s",
4
+ "minVersion": "10.1.0",
5
+ "title": "Google S2S",
6
+ "description": "Shortcut for 'llm' with vendor automatically set to 'google'. Connects the caller to a Google model for real-time speech-to-speech voice conversation.",
7
+ "type": "object",
8
+ "allOf": [
9
+ {
10
+ "$ref": "../components/llm-base"
11
+ }
12
+ ],
13
+ "properties": {
14
+ "verb": {
15
+ "const": "google_s2s",
16
+ "description": "The verb name."
17
+ },
18
+ "vendor": {
19
+ "type": "string",
20
+ "const": "google",
21
+ "description": "The LLM vendor (always 'google' for this shortcut)."
22
+ }
23
+ },
24
+ "required": [
25
+ "llmOptions"
26
+ ],
27
+ "examples": [
28
+ {
29
+ "verb": "google_s2s",
30
+ "model": "gemini-2.0-flash",
31
+ "llmOptions": {
32
+ "messages": [
33
+ {
34
+ "role": "system",
35
+ "content": "You are a helpful voice assistant."
36
+ }
37
+ ]
38
+ },
39
+ "actionHook": "/s2s-complete"
40
+ }
41
+ ]
42
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://jambonz.org/schema/verbs/hangup",
4
+ "minVersion": "0.9.6",
5
+ "title": "Hangup",
6
+ "description": "Terminates the call. Optionally includes custom SIP headers on the BYE request.",
7
+ "type": "object",
8
+ "properties": {
9
+ "verb": {
10
+ "const": "hangup",
11
+ "description": "The verb name."
12
+ },
13
+ "id": {
14
+ "type": "string",
15
+ "description": "An optional unique identifier for this verb instance."
16
+ },
17
+ "headers": {
18
+ "type": "object",
19
+ "description": "Custom SIP headers to include on the BYE request.",
20
+ "additionalProperties": {
21
+ "oneOf": [{ "type": "string" }, { "type": "number" }]
22
+ }
23
+ }
24
+ },
25
+ "examples": [
26
+ {
27
+ "verb": "hangup"
28
+ },
29
+ {
30
+ "verb": "hangup",
31
+ "headers": {
32
+ "X-Reason": "call-complete"
33
+ }
34
+ }
35
+ ]
36
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://jambonz.org/schema/verbs/leave",
4
+ "minVersion": "0.9.6",
5
+ "title": "Leave",
6
+ "description": "Removes the caller from a conference or queue that they are currently in. Execution continues with the next verb in the application.",
7
+ "type": "object",
8
+ "properties": {
9
+ "verb": {
10
+ "const": "leave"
11
+ },
12
+ "id": {
13
+ "type": "string",
14
+ "description": "An optional unique identifier for this verb instance."
15
+ }
16
+ },
17
+ "examples": [
18
+ {
19
+ "verb": "leave"
20
+ }
21
+ ]
22
+ }
@@ -0,0 +1,127 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://jambonz.org/schema/verbs/listen",
4
+ "minVersion": "0.9.6",
5
+ "title": "Listen",
6
+ "description": "Streams real-time call audio to an external websocket endpoint. The remote endpoint receives raw audio and can optionally send audio back (bidirectional). Used for custom speech processing, real-time analysis, AI agent integration, and recording to external systems.",
7
+ "type": "object",
8
+ "properties": {
9
+ "verb": {
10
+ "const": "listen",
11
+ "description": "The verb name."
12
+ },
13
+ "id": {
14
+ "type": "string",
15
+ "description": "An optional unique identifier for this verb instance."
16
+ },
17
+ "url": {
18
+ "type": "string",
19
+ "format": "uri",
20
+ "description": "The websocket URL to stream audio to.",
21
+ "examples": [
22
+ "wss://myapp.example.com/audio-stream"
23
+ ]
24
+ },
25
+ "actionHook": {
26
+ "$ref": "../components/actionHook",
27
+ "description": "A webhook invoked when the listen session ends. Should return the next verbs to execute."
28
+ },
29
+ "wsAuth": {
30
+ "$ref": "../components/auth",
31
+ "description": "Authentication credentials for the websocket connection."
32
+ },
33
+ "mixType": {
34
+ "type": "string",
35
+ "description": "How to mix the audio channels when streaming. 'mono' sends a single mixed channel, 'stereo' sends caller and callee as separate left/right channels, 'mixed' sends both as a single mixed stream.",
36
+ "enum": [
37
+ "mono",
38
+ "stereo",
39
+ "mixed"
40
+ ],
41
+ "default": "mono"
42
+ },
43
+ "metadata": {
44
+ "type": "object",
45
+ "description": "Arbitrary metadata to send to the websocket endpoint in the initial connection message.",
46
+ "additionalProperties": true
47
+ },
48
+ "sampleRate": {
49
+ "type": "number",
50
+ "description": "The audio sample rate in Hz.",
51
+ "examples": [
52
+ 8000,
53
+ 16000,
54
+ 24000
55
+ ],
56
+ "default": 8000
57
+ },
58
+ "finishOnKey": {
59
+ "type": "string",
60
+ "description": "A DTMF key that ends the listen session when pressed.",
61
+ "examples": [
62
+ "#"
63
+ ]
64
+ },
65
+ "maxLength": {
66
+ "type": "number",
67
+ "description": "Maximum duration in seconds for the listen session."
68
+ },
69
+ "passDtmf": {
70
+ "type": "boolean",
71
+ "description": "If true, forward DTMF events to the websocket endpoint."
72
+ },
73
+ "playBeep": {
74
+ "type": "boolean",
75
+ "description": "If true, play a beep tone before streaming begins."
76
+ },
77
+ "disableBidirectionalAudio": {
78
+ "type": "boolean",
79
+ "description": "If true, disable receiving audio from the websocket endpoint. Audio flows only from the call to the websocket, not back."
80
+ },
81
+ "bidirectionalAudio": {
82
+ "$ref": "../components/bidirectionalAudio",
83
+ "description": "Fine-grained configuration for bidirectional audio."
84
+ },
85
+ "timeout": {
86
+ "type": "number",
87
+ "description": "Time in seconds to wait for audio activity before ending the listen session."
88
+ },
89
+ "transcribe": {
90
+ "$ref": "transcribe",
91
+ "description": "Nested transcribe verb — enables simultaneous real-time transcription of the audio being streamed."
92
+ },
93
+ "earlyMedia": {
94
+ "type": "boolean",
95
+ "description": "If true, begin streaming audio before the call is formally answered."
96
+ },
97
+ "channel": {
98
+ "type": "number",
99
+ "description": "Specific audio channel to stream. Used when streaming a single channel of a multi-channel call."
100
+ }
101
+ },
102
+ "required": [
103
+ "url"
104
+ ],
105
+ "examples": [
106
+ {
107
+ "verb": "listen",
108
+ "url": "wss://myapp.example.com/audio-stream",
109
+ "actionHook": "/listen-complete",
110
+ "sampleRate": 16000,
111
+ "mixType": "stereo"
112
+ },
113
+ {
114
+ "verb": "listen",
115
+ "url": "wss://myapp.example.com/ai-agent",
116
+ "bidirectionalAudio": {
117
+ "enabled": true,
118
+ "streaming": true,
119
+ "sampleRate": 24000
120
+ },
121
+ "metadata": {
122
+ "callType": "support",
123
+ "language": "en-US"
124
+ }
125
+ }
126
+ ]
127
+ }
@@ -0,0 +1,44 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://jambonz.org/schema/verbs/llm",
4
+ "minVersion": "0.9.6",
5
+ "title": "LLM",
6
+ "description": "Connects the caller to a large language model for a real-time voice conversation. Handles the complete STT → LLM → TTS pipeline, including turn detection, interruption handling, and tool/function calling. The caller speaks naturally and the LLM responds via synthesized speech. This is the primary verb for building AI voice agents on jambonz.",
7
+ "type": "object",
8
+ "allOf": [
9
+ {
10
+ "$ref": "../components/llm-base"
11
+ }
12
+ ],
13
+ "properties": {
14
+ "verb": {
15
+ "const": "llm",
16
+ "description": "The verb name."
17
+ }
18
+ },
19
+ "required": [
20
+ "vendor",
21
+ "llmOptions"
22
+ ],
23
+ "examples": [
24
+ {
25
+ "verb": "llm",
26
+ "vendor": "openai",
27
+ "model": "gpt-4o",
28
+ "auth": {
29
+ "apiKey": "sk-..."
30
+ },
31
+ "llmOptions": {
32
+ "messages": [
33
+ {
34
+ "role": "system",
35
+ "content": "You are a helpful customer service agent. Be concise and friendly."
36
+ }
37
+ ],
38
+ "temperature": 0.7
39
+ },
40
+ "actionHook": "/llm-complete",
41
+ "toolHook": "/llm-tool-call"
42
+ }
43
+ ]
44
+ }
@@ -0,0 +1,82 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://jambonz.org/schema/verbs/message",
4
+ "minVersion": "0.9.6",
5
+ "title": "Message",
6
+ "description": "Sends an SMS or MMS message. Can be used during a voice call to send a text message to the caller or another party, or as a standalone action.",
7
+ "type": "object",
8
+ "properties": {
9
+ "verb": {
10
+ "const": "message"
11
+ },
12
+ "id": {
13
+ "type": "string",
14
+ "description": "An optional unique identifier for this verb instance."
15
+ },
16
+ "to": {
17
+ "type": "string",
18
+ "description": "The destination phone number in E.164 format.",
19
+ "examples": [
20
+ "+15085551212"
21
+ ]
22
+ },
23
+ "from": {
24
+ "type": "string",
25
+ "description": "The sender phone number in E.164 format. Must be a number provisioned on the jambonz platform.",
26
+ "examples": [
27
+ "+15085559876"
28
+ ]
29
+ },
30
+ "text": {
31
+ "type": "string",
32
+ "description": "The text content of the message."
33
+ },
34
+ "media": {
35
+ "oneOf": [
36
+ {
37
+ "type": "string",
38
+ "format": "uri"
39
+ },
40
+ {
41
+ "type": "array",
42
+ "items": {
43
+ "type": "string",
44
+ "format": "uri"
45
+ }
46
+ }
47
+ ],
48
+ "description": "URL(s) of media to attach to the message (MMS). Can be images, audio, or video.",
49
+ "examples": [
50
+ "https://example.com/images/receipt.png"
51
+ ]
52
+ },
53
+ "carrier": {
54
+ "type": "string",
55
+ "description": "The messaging carrier to use. If not specified, the default carrier is used."
56
+ },
57
+ "account_sid": {
58
+ "type": "string",
59
+ "description": "The account SID to use for sending. Defaults to the current account."
60
+ },
61
+ "message_sid": {
62
+ "type": "string",
63
+ "description": "An optional message SID for tracking."
64
+ },
65
+ "actionHook": {
66
+ "$ref": "../components/actionHook",
67
+ "description": "A webhook invoked when the message send completes or fails."
68
+ }
69
+ },
70
+ "required": [
71
+ "to",
72
+ "from"
73
+ ],
74
+ "examples": [
75
+ {
76
+ "verb": "message",
77
+ "to": "+15085551212",
78
+ "from": "+15085559876",
79
+ "text": "Your order has been confirmed. Order #12345."
80
+ }
81
+ ]
82
+ }
@@ -0,0 +1,42 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://jambonz.org/schema/verbs/openai_s2s",
4
+ "minVersion": "10.1.0",
5
+ "title": "OpenAI S2S",
6
+ "description": "Shortcut for 'llm' with vendor automatically set to 'openai'. Connects the caller to an OpenAI model for real-time speech-to-speech voice conversation.",
7
+ "type": "object",
8
+ "allOf": [
9
+ {
10
+ "$ref": "../components/llm-base"
11
+ }
12
+ ],
13
+ "properties": {
14
+ "verb": {
15
+ "const": "openai_s2s",
16
+ "description": "The verb name."
17
+ },
18
+ "vendor": {
19
+ "type": "string",
20
+ "const": "openai",
21
+ "description": "The LLM vendor (always 'openai' for this shortcut)."
22
+ }
23
+ },
24
+ "required": [
25
+ "llmOptions"
26
+ ],
27
+ "examples": [
28
+ {
29
+ "verb": "openai_s2s",
30
+ "model": "gpt-4o-realtime",
31
+ "llmOptions": {
32
+ "messages": [
33
+ {
34
+ "role": "system",
35
+ "content": "You are a helpful voice assistant."
36
+ }
37
+ ]
38
+ },
39
+ "actionHook": "/s2s-complete"
40
+ }
41
+ ]
42
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://jambonz.org/schema/verbs/pause",
4
+ "minVersion": "0.9.6",
5
+ "title": "Pause",
6
+ "description": "Pauses execution for a specified number of seconds. The caller hears silence during the pause. Useful for adding delays between verbs.",
7
+ "type": "object",
8
+ "properties": {
9
+ "verb": {
10
+ "const": "pause",
11
+ "description": "The verb name."
12
+ },
13
+ "id": {
14
+ "type": "string",
15
+ "description": "An optional unique identifier for this verb instance."
16
+ },
17
+ "length": {
18
+ "type": "number",
19
+ "description": "The duration of the pause in seconds.",
20
+ "examples": [
21
+ 1,
22
+ 2,
23
+ 5
24
+ ]
25
+ }
26
+ },
27
+ "required": [
28
+ "length"
29
+ ],
30
+ "examples": [
31
+ {
32
+ "verb": "pause",
33
+ "length": 2
34
+ }
35
+ ]
36
+ }