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,113 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://jambonz.org/schema/jambonz-app",
4
+ "title": "jambonz Application",
5
+ "description": "A jambonz application is an array of verbs that are executed sequentially to control a phone call. Each verb performs an action: speaking text, playing audio, collecting input, dialing a number, connecting to an AI model, etc. When a webhook (actionHook) is invoked, it must return a new verb array to continue call processing.\n\nThe execution model is simple: verbs execute one after another, top to bottom. When a verb with an actionHook completes (e.g. gather collects input), the actionHook is called and its response replaces the remaining verb stack. If the verb array is exhausted without a hangup, the call is terminated.\n\nThere are two transport modes for delivering verb arrays to jambonz:\n- **Webhook**: Your HTTP server receives POST/GET requests with call data and returns JSON verb arrays in the response body.\n- **WebSocket**: Your server maintains a persistent websocket connection with jambonz and sends/receives verb arrays as JSON messages. Required for real-time features like LLM conversations.\n\nThe verb schemas and JSON structure are identical regardless of transport mode.",
6
+ "type": "array",
7
+ "items": {
8
+ "$ref": "#/$defs/Verb"
9
+ },
10
+ "minItems": 1,
11
+ "$defs": {
12
+ "Verb": {
13
+ "oneOf": [
14
+ { "$ref": "verbs/answer" },
15
+ { "$ref": "verbs/alert" },
16
+ { "$ref": "verbs/config" },
17
+ { "$ref": "verbs/say" },
18
+ { "$ref": "verbs/play" },
19
+ { "$ref": "verbs/gather" },
20
+ { "$ref": "verbs/dial" },
21
+ { "$ref": "verbs/listen" },
22
+ { "$ref": "verbs/stream" },
23
+ { "$ref": "verbs/llm" },
24
+ { "$ref": "verbs/s2s" },
25
+ { "$ref": "verbs/openai_s2s" },
26
+ { "$ref": "verbs/google_s2s" },
27
+ { "$ref": "verbs/elevenlabs_s2s" },
28
+ { "$ref": "verbs/deepgram_s2s" },
29
+ { "$ref": "verbs/ultravox_s2s" },
30
+ { "$ref": "verbs/dialogflow" },
31
+ { "$ref": "verbs/pipeline" },
32
+ { "$ref": "verbs/conference" },
33
+ { "$ref": "verbs/transcribe" },
34
+ { "$ref": "verbs/enqueue" },
35
+ { "$ref": "verbs/dequeue" },
36
+ { "$ref": "verbs/dtmf" },
37
+ { "$ref": "verbs/dub" },
38
+ { "$ref": "verbs/hangup" },
39
+ { "$ref": "verbs/leave" },
40
+ { "$ref": "verbs/message" },
41
+ { "$ref": "verbs/pause" },
42
+ { "$ref": "verbs/redirect" },
43
+ { "$ref": "verbs/tag" },
44
+ { "$ref": "verbs/sip:decline" },
45
+ { "$ref": "verbs/sip:request" },
46
+ { "$ref": "verbs/sip:refer" },
47
+ { "$ref": "verbs/rest:dial" }
48
+ ],
49
+ "discriminator": {
50
+ "propertyName": "verb"
51
+ }
52
+ }
53
+ },
54
+ "examples": [
55
+ [
56
+ {
57
+ "verb": "config",
58
+ "synthesizer": { "vendor": "elevenlabs", "voice": "EXAVITQu4vr4xnSDxMaL", "language": "en-US" },
59
+ "recognizer": { "vendor": "deepgram", "language": "en-US" }
60
+ },
61
+ {
62
+ "verb": "say",
63
+ "text": "Hello! Welcome to Acme Corp. How can I help you today?"
64
+ },
65
+ {
66
+ "verb": "gather",
67
+ "input": ["speech"],
68
+ "actionHook": "/process-input",
69
+ "timeout": 15,
70
+ "say": { "text": "I'm listening." }
71
+ }
72
+ ],
73
+ [
74
+ {
75
+ "verb": "say",
76
+ "text": "Please hold while I connect you to an agent."
77
+ },
78
+ {
79
+ "verb": "dial",
80
+ "target": [{ "type": "phone", "number": "+15085551212" }],
81
+ "answerOnBridge": true,
82
+ "timeout": 30,
83
+ "actionHook": "/dial-complete"
84
+ },
85
+ {
86
+ "verb": "say",
87
+ "text": "Sorry, the agent is not available. Please try again later."
88
+ },
89
+ {
90
+ "verb": "hangup"
91
+ }
92
+ ],
93
+ [
94
+ {
95
+ "verb": "config",
96
+ "synthesizer": { "vendor": "cartesia", "voice": "sonic-english" },
97
+ "recognizer": { "vendor": "deepgram", "language": "en-US" }
98
+ },
99
+ {
100
+ "verb": "openai_s2s",
101
+ "model": "gpt-4o",
102
+ "llmOptions": {
103
+ "messages": [
104
+ { "role": "system", "content": "You are a helpful customer service agent for Acme Corp. Be concise and friendly." }
105
+ ],
106
+ "temperature": 0.7
107
+ },
108
+ "actionHook": "/llm-complete",
109
+ "toolHook": "/llm-tool"
110
+ }
111
+ ]
112
+ ]
113
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://jambonz.org/schema/verbs/alert",
4
+ "minVersion": "0.9.6",
5
+ "title": "Alert",
6
+ "description": "Sends a 180 Ringing provisional response with an Alert-Info header. Used to trigger a specific ring tone or alert behavior on the caller's device before the call is answered.",
7
+ "type": "object",
8
+ "properties": {
9
+ "verb": {
10
+ "const": "alert"
11
+ },
12
+ "id": {
13
+ "type": "string",
14
+ "description": "An optional unique identifier for this verb instance."
15
+ },
16
+ "message": {
17
+ "type": "string",
18
+ "description": "The value to include in the Alert-Info header.",
19
+ "examples": [
20
+ "info=alert-internal",
21
+ "http://example.com/ringtone.wav"
22
+ ]
23
+ }
24
+ },
25
+ "required": [
26
+ "message"
27
+ ],
28
+ "examples": [
29
+ {
30
+ "verb": "alert",
31
+ "message": "info=alert-internal"
32
+ }
33
+ ]
34
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://jambonz.org/schema/verbs/answer",
4
+ "minVersion": "0.9.6",
5
+ "title": "Answer",
6
+ "description": "Answers an incoming call (sends a 200 OK to the SIP INVITE). Most verbs implicitly answer the call, so this verb is only needed when you want to explicitly control when the call is answered — for example, to play early media before answering.",
7
+ "type": "object",
8
+ "properties": {
9
+ "verb": {
10
+ "const": "answer"
11
+ },
12
+ "id": {
13
+ "type": "string",
14
+ "description": "An optional unique identifier for this verb instance."
15
+ }
16
+ },
17
+ "examples": [
18
+ {
19
+ "verb": "answer"
20
+ }
21
+ ]
22
+ }
@@ -0,0 +1,107 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://jambonz.org/schema/verbs/conference",
4
+ "minVersion": "0.9.6",
5
+ "title": "Conference",
6
+ "description": "Places the caller into a multi-party conference room. Multiple callers in the same named conference can speak to each other. Supports features like muting, recording, waiting rooms, and participant limits.",
7
+ "type": "object",
8
+ "properties": {
9
+ "verb": {
10
+ "const": "conference"
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 conference room. All callers joining the same named conference are connected together.",
19
+ "examples": [
20
+ "team-standup",
21
+ "customer-call-12345"
22
+ ]
23
+ },
24
+ "beep": {
25
+ "type": "boolean",
26
+ "description": "If true, play a beep when participants join or leave."
27
+ },
28
+ "memberTag": {
29
+ "type": "string",
30
+ "description": "A tag to identify this participant. Can be used to target specific members for actions like muting or whispering."
31
+ },
32
+ "speakOnlyTo": {
33
+ "type": "string",
34
+ "description": "If set, this participant's audio is only heard by the member with the specified memberTag. Creates a private whisper channel."
35
+ },
36
+ "startConferenceOnEnter": {
37
+ "type": "boolean",
38
+ "description": "If true (default), the conference starts when this participant joins. If false, this participant waits silently until a participant with startConferenceOnEnter=true joins."
39
+ },
40
+ "endConferenceOnExit": {
41
+ "type": "boolean",
42
+ "description": "If true, the conference ends for all participants when this participant leaves."
43
+ },
44
+ "endConferenceDuration": {
45
+ "type": "number",
46
+ "description": "Maximum duration of the conference in seconds."
47
+ },
48
+ "maxParticipants": {
49
+ "type": "number",
50
+ "description": "Maximum number of participants allowed in the conference."
51
+ },
52
+ "joinMuted": {
53
+ "type": "boolean",
54
+ "description": "If true, this participant joins the conference muted."
55
+ },
56
+ "actionHook": {
57
+ "$ref": "../components/actionHook",
58
+ "description": "A webhook invoked when this participant leaves the conference."
59
+ },
60
+ "waitHook": {
61
+ "$ref": "../components/actionHook",
62
+ "description": "A webhook invoked while this participant is waiting for the conference to start. Should return verbs to play (e.g. hold music)."
63
+ },
64
+ "statusEvents": {
65
+ "type": "array",
66
+ "items": {
67
+ "type": "string"
68
+ },
69
+ "description": "List of conference events to receive via the statusHook."
70
+ },
71
+ "statusHook": {
72
+ "$ref": "../components/actionHook",
73
+ "description": "A webhook to receive conference status events (joins, leaves, etc.)."
74
+ },
75
+ "enterHook": {
76
+ "$ref": "../components/actionHook",
77
+ "description": "A webhook invoked when this participant first enters the conference."
78
+ },
79
+ "record": {
80
+ "type": "object",
81
+ "description": "Recording configuration for the conference.",
82
+ "additionalProperties": true
83
+ },
84
+ "listen": {
85
+ "type": "object",
86
+ "description": "Audio streaming configuration for the conference.",
87
+ "additionalProperties": true
88
+ },
89
+ "distributeDtmf": {
90
+ "type": "boolean",
91
+ "description": "If true, DTMF events from this participant are distributed to all other participants."
92
+ }
93
+ },
94
+ "required": [
95
+ "name"
96
+ ],
97
+ "examples": [
98
+ {
99
+ "verb": "conference",
100
+ "name": "team-standup",
101
+ "beep": true,
102
+ "startConferenceOnEnter": true,
103
+ "endConferenceOnExit": false,
104
+ "statusHook": "/conference-events"
105
+ }
106
+ ]
107
+ }
@@ -0,0 +1,221 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://jambonz.org/schema/verbs/config",
4
+ "minVersion": "0.9.6",
5
+ "title": "Config",
6
+ "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.",
7
+ "type": "object",
8
+ "properties": {
9
+ "verb": {
10
+ "const": "config",
11
+ "description": "The verb name."
12
+ },
13
+ "id": {
14
+ "type": "string",
15
+ "description": "An optional unique identifier for this verb instance."
16
+ },
17
+ "synthesizer": {
18
+ "$ref": "../components/synthesizer",
19
+ "description": "Default TTS configuration for the session."
20
+ },
21
+ "recognizer": {
22
+ "$ref": "../components/recognizer",
23
+ "description": "Default STT configuration for the session."
24
+ },
25
+ "bargeIn": {
26
+ "type": "object",
27
+ "description": "Default barge-in configuration. When enabled, callers can interrupt playing prompts with speech or DTMF.",
28
+ "properties": {
29
+ "enable": {
30
+ "type": "boolean"
31
+ },
32
+ "sticky": {
33
+ "type": "boolean",
34
+ "description": "If true, barge-in settings persist across verbs rather than resetting after each verb."
35
+ },
36
+ "actionHook": {
37
+ "$ref": "../components/actionHook"
38
+ },
39
+ "input": {
40
+ "type": "array",
41
+ "items": {
42
+ "type": "string",
43
+ "enum": [
44
+ "speech",
45
+ "digits"
46
+ ]
47
+ }
48
+ },
49
+ "minBargeinWordCount": {
50
+ "type": "number"
51
+ }
52
+ }
53
+ },
54
+ "ttsStream": {
55
+ "type": "object",
56
+ "description": "Default TTS streaming configuration for the session.",
57
+ "properties": {
58
+ "enable": {
59
+ "type": "boolean"
60
+ },
61
+ "synthesizer": {
62
+ "$ref": "../components/synthesizer"
63
+ }
64
+ }
65
+ },
66
+ "record": {
67
+ "type": "object",
68
+ "description": "Session-level call recording configuration.",
69
+ "additionalProperties": true
70
+ },
71
+ "listen": {
72
+ "type": "object",
73
+ "description": "Session-level audio streaming configuration defaults. Properties match the listen verb but no fields are required here.",
74
+ "additionalProperties": true
75
+ },
76
+ "stream": {
77
+ "type": "object",
78
+ "description": "Session-level audio streaming configuration defaults. Alias for 'listen'.",
79
+ "additionalProperties": true
80
+ },
81
+ "transcribe": {
82
+ "type": "object",
83
+ "description": "Session-level transcription configuration defaults.",
84
+ "additionalProperties": true
85
+ },
86
+ "amd": {
87
+ "$ref": "../components/amd",
88
+ "description": "Session-level answering machine detection configuration."
89
+ },
90
+ "fillerNoise": {
91
+ "$ref": "../components/fillerNoise",
92
+ "description": "Default filler noise configuration for the session."
93
+ },
94
+ "vad": {
95
+ "$ref": "../components/vad",
96
+ "description": "Default voice activity detection configuration for the session."
97
+ },
98
+ "notifyEvents": {
99
+ "type": "boolean",
100
+ "description": "If true, send call events (e.g. DTMF, call status changes) to the application via the status webhook."
101
+ },
102
+ "notifySttLatency": {
103
+ "type": "boolean",
104
+ "description": "If true, include STT latency measurements in webhook payloads."
105
+ },
106
+ "reset": {
107
+ "oneOf": [
108
+ {
109
+ "type": "string"
110
+ },
111
+ {
112
+ "type": "array",
113
+ "items": {
114
+ "type": "string"
115
+ }
116
+ }
117
+ ],
118
+ "description": "Reset specific session-level settings to their defaults. Pass a setting name or array of setting names to reset."
119
+ },
120
+ "onHoldMusic": {
121
+ "type": "string",
122
+ "format": "uri",
123
+ "description": "URL of an audio file to play when the call is placed on hold."
124
+ },
125
+ "actionHookDelayAction": {
126
+ "$ref": "../components/actionHookDelayAction",
127
+ "description": "Default configuration for handling slow webhook responses."
128
+ },
129
+ "sipRequestWithinDialogHook": {
130
+ "$ref": "../components/actionHook",
131
+ "description": "A webhook to invoke when a SIP request (e.g. INFO, NOTIFY) is received within the dialog."
132
+ },
133
+ "boostAudioSignal": {
134
+ "oneOf": [
135
+ {
136
+ "type": "number"
137
+ },
138
+ {
139
+ "type": "string"
140
+ }
141
+ ],
142
+ "description": "Boost (or attenuate) the audio signal in dB for the session."
143
+ },
144
+ "referHook": {
145
+ "$ref": "../components/actionHook",
146
+ "description": "A webhook to invoke when a SIP REFER request is received."
147
+ },
148
+ "earlyMedia": {
149
+ "type": "boolean",
150
+ "description": "If true, allow early media (audio before call answer) for the session."
151
+ },
152
+ "autoStreamTts": {
153
+ "type": "boolean",
154
+ "description": "If true, automatically use streaming TTS for all 'say' verbs in the session."
155
+ },
156
+ "disableTtsCache": {
157
+ "type": "boolean",
158
+ "description": "If true, disable TTS caching for the session."
159
+ },
160
+ "trackTtsPlayout": {
161
+ "type": "boolean",
162
+ "description": "If true, report the actual text spoken via TTS. Requires a TTS vendor that supports alignment data (e.g. ElevenLabs). On each utterance completion or interruption, a tts_spoken event is sent to the '/streaming-event' endpoint with fields: 'text' (string — the text actually spoken) and 'bargein' (boolean — true if the user interrupted before TTS finished). See the tts-streaming-event callback schema for full details."
163
+ },
164
+ "noiseIsolation": {
165
+ "type": "object",
166
+ "description": "Noise isolation configuration to reduce background noise on call audio. Defaults to filtering inbound (caller) audio; can also filter outbound audio via the direction option.",
167
+ "properties": {
168
+ "enable": {
169
+ "type": "boolean"
170
+ },
171
+ "vendor": {
172
+ "type": "string"
173
+ },
174
+ "level": {
175
+ "type": "number"
176
+ },
177
+ "model": {
178
+ "type": "string"
179
+ }
180
+ }
181
+ },
182
+ "turnTaking": {
183
+ "type": "object",
184
+ "description": "Turn-taking detection configuration for conversational AI applications.",
185
+ "properties": {
186
+ "enable": {
187
+ "type": "boolean"
188
+ },
189
+ "vendor": {
190
+ "type": "string"
191
+ },
192
+ "threshold": {
193
+ "type": "number"
194
+ },
195
+ "model": {
196
+ "type": "string"
197
+ }
198
+ }
199
+ }
200
+ },
201
+ "required": [],
202
+ "examples": [
203
+ {
204
+ "verb": "config",
205
+ "synthesizer": {
206
+ "vendor": "elevenlabs",
207
+ "voice": "Rachel",
208
+ "language": "en-US"
209
+ },
210
+ "recognizer": {
211
+ "vendor": "deepgram",
212
+ "language": "en-US"
213
+ },
214
+ "fillerNoise": {
215
+ "enable": true,
216
+ "url": "https://example.com/sounds/typing.wav",
217
+ "startDelaySecs": 2
218
+ }
219
+ }
220
+ ]
221
+ }
@@ -0,0 +1,81 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://jambonz.org/schema/verbs/deepgram_s2s",
4
+ "minVersion": "10.1.0",
5
+ "title": "Deepgram S2S",
6
+ "description": "Shortcut for 'llm' with vendor automatically set to 'deepgram'. Connects the caller to a Deepgram 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": "deepgram_s2s",
16
+ "description": "The verb name."
17
+ },
18
+ "vendor": {
19
+ "type": "string",
20
+ "const": "deepgram",
21
+ "description": "The LLM vendor (always 'deepgram' for this shortcut)."
22
+ },
23
+ "llmOptions": {
24
+ "type": "object",
25
+ "description": "IMPORTANT: Deepgram does NOT use a 'messages' array. The llmOptions must contain a 'Settings' object with 'agent.think' (LLM provider, model, and prompt) and 'agent.speak' (TTS provider and voice model). The system prompt goes in Settings.agent.think.prompt, NOT in messages.",
26
+ "additionalProperties": true,
27
+ "examples": [
28
+ {
29
+ "Settings": {
30
+ "agent": {
31
+ "think": {
32
+ "provider": {
33
+ "type": "open_ai",
34
+ "model": "gpt-4o"
35
+ },
36
+ "prompt": "You are a helpful voice assistant."
37
+ },
38
+ "speak": {
39
+ "provider": {
40
+ "type": "deepgram",
41
+ "model": "aura-2-thalia-en"
42
+ }
43
+ }
44
+ }
45
+ }
46
+ }
47
+ ]
48
+ }
49
+ },
50
+ "required": [
51
+ "llmOptions"
52
+ ],
53
+ "examples": [
54
+ {
55
+ "verb": "deepgram_s2s",
56
+ "auth": {
57
+ "apiKey": "your-deepgram-api-key"
58
+ },
59
+ "llmOptions": {
60
+ "Settings": {
61
+ "agent": {
62
+ "think": {
63
+ "provider": {
64
+ "type": "open_ai",
65
+ "model": "gpt-4o"
66
+ },
67
+ "prompt": "You are a helpful voice assistant."
68
+ },
69
+ "speak": {
70
+ "provider": {
71
+ "type": "deepgram",
72
+ "model": "aura-2-thalia-en"
73
+ }
74
+ }
75
+ }
76
+ }
77
+ },
78
+ "actionHook": "/s2s-complete"
79
+ }
80
+ ]
81
+ }
@@ -0,0 +1,51 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://jambonz.org/schema/verbs/dequeue",
4
+ "minVersion": "0.9.6",
5
+ "title": "Dequeue",
6
+ "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.",
7
+ "type": "object",
8
+ "properties": {
9
+ "verb": {
10
+ "const": "dequeue"
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 dequeue from.",
19
+ "examples": [
20
+ "support",
21
+ "sales"
22
+ ]
23
+ },
24
+ "actionHook": {
25
+ "$ref": "../components/actionHook",
26
+ "description": "A webhook invoked when the dequeued call ends."
27
+ },
28
+ "timeout": {
29
+ "type": "number",
30
+ "description": "Time in seconds to wait for a caller to be available in the queue."
31
+ },
32
+ "beep": {
33
+ "type": "boolean",
34
+ "description": "If true, play a beep when the calls are connected."
35
+ },
36
+ "callSid": {
37
+ "type": "string",
38
+ "description": "Dequeue a specific call by its call SID, rather than the next caller in line."
39
+ }
40
+ },
41
+ "required": [
42
+ "name"
43
+ ],
44
+ "examples": [
45
+ {
46
+ "verb": "dequeue",
47
+ "name": "support",
48
+ "beep": true
49
+ }
50
+ ]
51
+ }