@jambonz/sdk 0.1.7 → 0.1.8
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.
- package/package.json +1 -1
- package/schema/callbacks/amd.schema.json +50 -0
- package/schema/components/amd.schema.json +1 -1
- package/schema/verbs/alert.schema.json +19 -5
- package/schema/verbs/answer.schema.json +13 -3
- package/schema/verbs/conference.schema.json +85 -21
- package/schema/verbs/config.schema.json +62 -18
- package/schema/verbs/deepgram_s2s.schema.json +64 -5
- package/schema/verbs/dequeue.schema.json +20 -5
- package/schema/verbs/dial.schema.json +48 -14
- package/schema/verbs/dialogflow.schema.json +37 -9
- package/schema/verbs/dtmf.schema.json +29 -7
- package/schema/verbs/dub.schema.json +65 -14
- package/schema/verbs/elevenlabs_s2s.schema.json +24 -6
- package/schema/verbs/enqueue.schema.json +20 -5
- package/schema/verbs/gather.schema.json +55 -12
- package/schema/verbs/google_s2s.schema.json +24 -5
- package/schema/verbs/hangup.schema.json +10 -3
- package/schema/verbs/leave.schema.json +13 -3
- package/schema/verbs/listen.schema.json +24 -6
- package/schema/verbs/llm.schema.json +17 -4
- package/schema/verbs/message.schema.json +66 -14
- package/schema/verbs/openai_s2s.schema.json +24 -5
- package/schema/verbs/pause.schema.json +13 -3
- package/schema/verbs/pipeline.schema.json +61 -14
- package/schema/verbs/play.schema.json +38 -11
- package/schema/verbs/redirect.schema.json +15 -4
- package/schema/verbs/s2s.schema.json +16 -3
- package/schema/verbs/say.schema.json +31 -8
- package/schema/verbs/sip-decline.schema.json +35 -8
- package/schema/verbs/sip-refer.schema.json +23 -6
- package/schema/verbs/sip-request.schema.json +27 -6
- package/schema/verbs/stream.schema.json +92 -20
- package/schema/verbs/tag.schema.json +25 -5
- package/schema/verbs/transcribe.schema.json +12 -3
- package/schema/verbs/ultravox_s2s.schema.json +24 -5
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://jambonz.org/schema/verbs/listen",
|
|
4
|
+
"minVersion": "0.9.6",
|
|
4
5
|
"title": "Listen",
|
|
5
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.",
|
|
6
7
|
"type": "object",
|
|
@@ -17,7 +18,9 @@
|
|
|
17
18
|
"type": "string",
|
|
18
19
|
"format": "uri",
|
|
19
20
|
"description": "The websocket URL to stream audio to.",
|
|
20
|
-
"examples": [
|
|
21
|
+
"examples": [
|
|
22
|
+
"wss://myapp.example.com/audio-stream"
|
|
23
|
+
]
|
|
21
24
|
},
|
|
22
25
|
"actionHook": {
|
|
23
26
|
"$ref": "../components/actionHook",
|
|
@@ -30,7 +33,11 @@
|
|
|
30
33
|
"mixType": {
|
|
31
34
|
"type": "string",
|
|
32
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.",
|
|
33
|
-
"enum": [
|
|
36
|
+
"enum": [
|
|
37
|
+
"mono",
|
|
38
|
+
"stereo",
|
|
39
|
+
"mixed"
|
|
40
|
+
],
|
|
34
41
|
"default": "mono"
|
|
35
42
|
},
|
|
36
43
|
"metadata": {
|
|
@@ -41,13 +48,19 @@
|
|
|
41
48
|
"sampleRate": {
|
|
42
49
|
"type": "number",
|
|
43
50
|
"description": "The audio sample rate in Hz.",
|
|
44
|
-
"examples": [
|
|
51
|
+
"examples": [
|
|
52
|
+
8000,
|
|
53
|
+
16000,
|
|
54
|
+
24000
|
|
55
|
+
],
|
|
45
56
|
"default": 8000
|
|
46
57
|
},
|
|
47
58
|
"finishOnKey": {
|
|
48
59
|
"type": "string",
|
|
49
60
|
"description": "A DTMF key that ends the listen session when pressed.",
|
|
50
|
-
"examples": [
|
|
61
|
+
"examples": [
|
|
62
|
+
"#"
|
|
63
|
+
]
|
|
51
64
|
},
|
|
52
65
|
"maxLength": {
|
|
53
66
|
"type": "number",
|
|
@@ -86,7 +99,9 @@
|
|
|
86
99
|
"description": "Specific audio channel to stream. Used when streaming a single channel of a multi-channel call."
|
|
87
100
|
}
|
|
88
101
|
},
|
|
89
|
-
"required": [
|
|
102
|
+
"required": [
|
|
103
|
+
"url"
|
|
104
|
+
],
|
|
90
105
|
"examples": [
|
|
91
106
|
{
|
|
92
107
|
"verb": "listen",
|
|
@@ -103,7 +118,10 @@
|
|
|
103
118
|
"streaming": true,
|
|
104
119
|
"sampleRate": 24000
|
|
105
120
|
},
|
|
106
|
-
"metadata": {
|
|
121
|
+
"metadata": {
|
|
122
|
+
"callType": "support",
|
|
123
|
+
"language": "en-US"
|
|
124
|
+
}
|
|
107
125
|
}
|
|
108
126
|
]
|
|
109
127
|
}
|
|
@@ -1,26 +1,39 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://jambonz.org/schema/verbs/llm",
|
|
4
|
+
"minVersion": "0.9.6",
|
|
4
5
|
"title": "LLM",
|
|
5
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.",
|
|
6
7
|
"type": "object",
|
|
7
|
-
"allOf": [
|
|
8
|
+
"allOf": [
|
|
9
|
+
{
|
|
10
|
+
"$ref": "../components/llm-base"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
8
13
|
"properties": {
|
|
9
14
|
"verb": {
|
|
10
15
|
"const": "llm",
|
|
11
16
|
"description": "The verb name."
|
|
12
17
|
}
|
|
13
18
|
},
|
|
14
|
-
"required": [
|
|
19
|
+
"required": [
|
|
20
|
+
"vendor",
|
|
21
|
+
"llmOptions"
|
|
22
|
+
],
|
|
15
23
|
"examples": [
|
|
16
24
|
{
|
|
17
25
|
"verb": "llm",
|
|
18
26
|
"vendor": "openai",
|
|
19
27
|
"model": "gpt-4o",
|
|
20
|
-
"auth": {
|
|
28
|
+
"auth": {
|
|
29
|
+
"apiKey": "sk-..."
|
|
30
|
+
},
|
|
21
31
|
"llmOptions": {
|
|
22
32
|
"messages": [
|
|
23
|
-
{
|
|
33
|
+
{
|
|
34
|
+
"role": "system",
|
|
35
|
+
"content": "You are a helpful customer service agent. Be concise and friendly."
|
|
36
|
+
}
|
|
24
37
|
],
|
|
25
38
|
"temperature": 0.7
|
|
26
39
|
},
|
|
@@ -1,30 +1,82 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://jambonz.org/schema/verbs/message",
|
|
4
|
+
"minVersion": "0.9.6",
|
|
4
5
|
"title": "Message",
|
|
5
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.",
|
|
6
7
|
"type": "object",
|
|
7
8
|
"properties": {
|
|
8
|
-
"verb": {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"
|
|
12
|
-
|
|
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
|
+
},
|
|
13
34
|
"media": {
|
|
14
35
|
"oneOf": [
|
|
15
|
-
{
|
|
16
|
-
|
|
36
|
+
{
|
|
37
|
+
"type": "string",
|
|
38
|
+
"format": "uri"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"type": "array",
|
|
42
|
+
"items": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"format": "uri"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
17
47
|
],
|
|
18
48
|
"description": "URL(s) of media to attach to the message (MMS). Can be images, audio, or video.",
|
|
19
|
-
"examples": [
|
|
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."
|
|
20
64
|
},
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
65
|
+
"actionHook": {
|
|
66
|
+
"$ref": "../components/actionHook",
|
|
67
|
+
"description": "A webhook invoked when the message send completes or fails."
|
|
68
|
+
}
|
|
25
69
|
},
|
|
26
|
-
"required": [
|
|
70
|
+
"required": [
|
|
71
|
+
"to",
|
|
72
|
+
"from"
|
|
73
|
+
],
|
|
27
74
|
"examples": [
|
|
28
|
-
{
|
|
75
|
+
{
|
|
76
|
+
"verb": "message",
|
|
77
|
+
"to": "+15085551212",
|
|
78
|
+
"from": "+15085559876",
|
|
79
|
+
"text": "Your order has been confirmed. Order #12345."
|
|
80
|
+
}
|
|
29
81
|
]
|
|
30
82
|
}
|
|
@@ -1,21 +1,40 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://jambonz.org/schema/verbs/openai_s2s",
|
|
4
|
+
"minVersion": "10.1.0",
|
|
4
5
|
"title": "OpenAI S2S",
|
|
5
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.",
|
|
6
7
|
"type": "object",
|
|
7
|
-
"allOf": [
|
|
8
|
+
"allOf": [
|
|
9
|
+
{
|
|
10
|
+
"$ref": "../components/llm-base"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
8
13
|
"properties": {
|
|
9
|
-
"verb": {
|
|
10
|
-
|
|
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
|
+
}
|
|
11
23
|
},
|
|
12
|
-
"required": [
|
|
24
|
+
"required": [
|
|
25
|
+
"llmOptions"
|
|
26
|
+
],
|
|
13
27
|
"examples": [
|
|
14
28
|
{
|
|
15
29
|
"verb": "openai_s2s",
|
|
16
30
|
"model": "gpt-4o-realtime",
|
|
17
31
|
"llmOptions": {
|
|
18
|
-
"messages": [
|
|
32
|
+
"messages": [
|
|
33
|
+
{
|
|
34
|
+
"role": "system",
|
|
35
|
+
"content": "You are a helpful voice assistant."
|
|
36
|
+
}
|
|
37
|
+
]
|
|
19
38
|
},
|
|
20
39
|
"actionHook": "/s2s-complete"
|
|
21
40
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://jambonz.org/schema/verbs/pause",
|
|
4
|
+
"minVersion": "0.9.6",
|
|
4
5
|
"title": "Pause",
|
|
5
6
|
"description": "Pauses execution for a specified number of seconds. The caller hears silence during the pause. Useful for adding delays between verbs.",
|
|
6
7
|
"type": "object",
|
|
@@ -16,11 +17,20 @@
|
|
|
16
17
|
"length": {
|
|
17
18
|
"type": "number",
|
|
18
19
|
"description": "The duration of the pause in seconds.",
|
|
19
|
-
"examples": [
|
|
20
|
+
"examples": [
|
|
21
|
+
1,
|
|
22
|
+
2,
|
|
23
|
+
5
|
|
24
|
+
]
|
|
20
25
|
}
|
|
21
26
|
},
|
|
22
|
-
"required": [
|
|
27
|
+
"required": [
|
|
28
|
+
"length"
|
|
29
|
+
],
|
|
23
30
|
"examples": [
|
|
24
|
-
{
|
|
31
|
+
{
|
|
32
|
+
"verb": "pause",
|
|
33
|
+
"length": 2
|
|
34
|
+
}
|
|
25
35
|
]
|
|
26
36
|
}
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://jambonz.org/schema/verbs/pipeline",
|
|
4
|
+
"minVersion": "10.1.0",
|
|
4
5
|
"title": "Pipeline",
|
|
5
6
|
"description": "Configures a complete STT → LLM → TTS voice AI pipeline with integrated turn detection. Provides a higher-level abstraction than manually orchestrating the individual components. Optimized for building voice AI agents with proper turn-taking behavior.",
|
|
6
7
|
"type": "object",
|
|
7
8
|
"properties": {
|
|
8
|
-
"verb": {
|
|
9
|
-
|
|
9
|
+
"verb": {
|
|
10
|
+
"const": "pipeline"
|
|
11
|
+
},
|
|
12
|
+
"id": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "An optional unique identifier for this verb instance."
|
|
15
|
+
},
|
|
10
16
|
"stt": {
|
|
11
17
|
"$ref": "../components/recognizer",
|
|
12
18
|
"description": "Speech-to-text configuration for the pipeline."
|
|
@@ -23,11 +29,25 @@
|
|
|
23
29
|
"type": "object",
|
|
24
30
|
"description": "Turn detection configuration. Determines when the user has finished speaking and it's the AI's turn to respond.",
|
|
25
31
|
"properties": {
|
|
26
|
-
"vendor": {
|
|
27
|
-
|
|
28
|
-
|
|
32
|
+
"vendor": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"enum": [
|
|
35
|
+
"krisp"
|
|
36
|
+
],
|
|
37
|
+
"description": "The turn detection vendor."
|
|
38
|
+
},
|
|
39
|
+
"threshold": {
|
|
40
|
+
"type": "number",
|
|
41
|
+
"description": "Confidence threshold for turn detection."
|
|
42
|
+
},
|
|
43
|
+
"eagerEotThreshold": {
|
|
44
|
+
"type": "number",
|
|
45
|
+
"description": "Threshold for eager end-of-turn detection. Lower values cause earlier turn transitions."
|
|
46
|
+
}
|
|
29
47
|
},
|
|
30
|
-
"required": [
|
|
48
|
+
"required": [
|
|
49
|
+
"vendor"
|
|
50
|
+
]
|
|
31
51
|
},
|
|
32
52
|
"llm": {
|
|
33
53
|
"type": "object",
|
|
@@ -38,24 +58,51 @@
|
|
|
38
58
|
"type": "boolean",
|
|
39
59
|
"description": "If true, establish the LLM connection before the call starts to reduce latency on the first interaction."
|
|
40
60
|
},
|
|
41
|
-
"actionHook": {
|
|
42
|
-
|
|
43
|
-
|
|
61
|
+
"actionHook": {
|
|
62
|
+
"$ref": "../components/actionHook",
|
|
63
|
+
"description": "A webhook invoked when the pipeline ends."
|
|
64
|
+
},
|
|
65
|
+
"eventHook": {
|
|
66
|
+
"$ref": "../components/actionHook",
|
|
67
|
+
"description": "A webhook invoked for pipeline events."
|
|
68
|
+
},
|
|
69
|
+
"toolHook": {
|
|
70
|
+
"$ref": "../components/actionHook",
|
|
71
|
+
"description": "A webhook invoked when the LLM requests a tool/function call. The payload includes the tool name and arguments; the response provides the tool result."
|
|
72
|
+
}
|
|
44
73
|
},
|
|
45
|
-
"required": [
|
|
74
|
+
"required": [
|
|
75
|
+
"stt",
|
|
76
|
+
"llm",
|
|
77
|
+
"tts"
|
|
78
|
+
],
|
|
46
79
|
"examples": [
|
|
47
80
|
{
|
|
48
81
|
"verb": "pipeline",
|
|
49
|
-
"stt": {
|
|
50
|
-
|
|
82
|
+
"stt": {
|
|
83
|
+
"vendor": "deepgram",
|
|
84
|
+
"language": "en-US"
|
|
85
|
+
},
|
|
86
|
+
"tts": {
|
|
87
|
+
"vendor": "cartesia",
|
|
88
|
+
"voice": "sonic-english"
|
|
89
|
+
},
|
|
51
90
|
"llm": {
|
|
52
91
|
"vendor": "openai",
|
|
53
92
|
"model": "gpt-4o",
|
|
54
93
|
"llmOptions": {
|
|
55
|
-
"messages": [
|
|
94
|
+
"messages": [
|
|
95
|
+
{
|
|
96
|
+
"role": "system",
|
|
97
|
+
"content": "You are a helpful voice assistant."
|
|
98
|
+
}
|
|
99
|
+
]
|
|
56
100
|
}
|
|
57
101
|
},
|
|
58
|
-
"turnDetection": {
|
|
102
|
+
"turnDetection": {
|
|
103
|
+
"vendor": "krisp",
|
|
104
|
+
"threshold": 0.5
|
|
105
|
+
},
|
|
59
106
|
"actionHook": "/pipeline-complete"
|
|
60
107
|
}
|
|
61
108
|
]
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://jambonz.org/schema/verbs/play",
|
|
4
|
+
"minVersion": "0.9.6",
|
|
4
5
|
"title": "Play",
|
|
5
6
|
"description": "Plays an audio file to the caller. Supports WAV and MP3 formats hosted at a URL. Can play a single file or cycle through a list of files.",
|
|
6
7
|
"type": "object",
|
|
@@ -15,25 +16,41 @@
|
|
|
15
16
|
},
|
|
16
17
|
"url": {
|
|
17
18
|
"oneOf": [
|
|
18
|
-
{
|
|
19
|
+
{
|
|
20
|
+
"type": "string",
|
|
21
|
+
"format": "uri"
|
|
22
|
+
},
|
|
19
23
|
{
|
|
20
24
|
"type": "array",
|
|
21
|
-
"items": {
|
|
25
|
+
"items": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"format": "uri"
|
|
28
|
+
}
|
|
22
29
|
}
|
|
23
30
|
],
|
|
24
31
|
"description": "The URL(s) of the audio file(s) to play. Supports WAV and MP3. If an array, files are played in sequence.",
|
|
25
32
|
"examples": [
|
|
26
33
|
"https://example.com/sounds/greeting.wav",
|
|
27
|
-
[
|
|
34
|
+
[
|
|
35
|
+
"https://example.com/sounds/part1.wav",
|
|
36
|
+
"https://example.com/sounds/part2.wav"
|
|
37
|
+
]
|
|
28
38
|
]
|
|
29
39
|
},
|
|
30
40
|
"loop": {
|
|
31
41
|
"oneOf": [
|
|
32
|
-
{
|
|
33
|
-
|
|
42
|
+
{
|
|
43
|
+
"type": "number"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"type": "string"
|
|
47
|
+
}
|
|
34
48
|
],
|
|
35
49
|
"description": "Number of times to repeat playback. Use 0 or 'forever' to loop indefinitely until interrupted.",
|
|
36
|
-
"examples": [
|
|
50
|
+
"examples": [
|
|
51
|
+
3,
|
|
52
|
+
"forever"
|
|
53
|
+
]
|
|
37
54
|
},
|
|
38
55
|
"earlyMedia": {
|
|
39
56
|
"type": "boolean",
|
|
@@ -41,15 +58,23 @@
|
|
|
41
58
|
},
|
|
42
59
|
"seekOffset": {
|
|
43
60
|
"oneOf": [
|
|
44
|
-
{
|
|
45
|
-
|
|
61
|
+
{
|
|
62
|
+
"type": "number"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"type": "string"
|
|
66
|
+
}
|
|
46
67
|
],
|
|
47
68
|
"description": "Start playback at this offset in seconds from the beginning of the file."
|
|
48
69
|
},
|
|
49
70
|
"timeoutSecs": {
|
|
50
71
|
"oneOf": [
|
|
51
|
-
{
|
|
52
|
-
|
|
72
|
+
{
|
|
73
|
+
"type": "number"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"type": "string"
|
|
77
|
+
}
|
|
53
78
|
],
|
|
54
79
|
"description": "Maximum time in seconds to play the audio. Playback stops after this duration even if the file has not finished."
|
|
55
80
|
},
|
|
@@ -58,7 +83,9 @@
|
|
|
58
83
|
"description": "A webhook to invoke when playback completes."
|
|
59
84
|
}
|
|
60
85
|
},
|
|
61
|
-
"required": [
|
|
86
|
+
"required": [
|
|
87
|
+
"url"
|
|
88
|
+
],
|
|
62
89
|
"examples": [
|
|
63
90
|
{
|
|
64
91
|
"verb": "play",
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://jambonz.org/schema/verbs/redirect",
|
|
4
|
+
"minVersion": "0.9.6",
|
|
4
5
|
"title": "Redirect",
|
|
5
6
|
"description": "Transfers call control to a different webhook URL. The current verb stack is abandoned and the new webhook's response becomes the active application. Useful for modular application design where different URLs handle different phases of a call.",
|
|
6
7
|
"type": "object",
|
|
7
8
|
"properties": {
|
|
8
|
-
"verb": {
|
|
9
|
-
|
|
9
|
+
"verb": {
|
|
10
|
+
"const": "redirect"
|
|
11
|
+
},
|
|
12
|
+
"id": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "An optional unique identifier for this verb instance."
|
|
15
|
+
},
|
|
10
16
|
"actionHook": {
|
|
11
17
|
"$ref": "../components/actionHook",
|
|
12
18
|
"description": "The webhook to transfer control to. Must return a new array of verbs."
|
|
@@ -16,8 +22,13 @@
|
|
|
16
22
|
"description": "A webhook to receive call status events after the redirect."
|
|
17
23
|
}
|
|
18
24
|
},
|
|
19
|
-
"required": [
|
|
25
|
+
"required": [
|
|
26
|
+
"actionHook"
|
|
27
|
+
],
|
|
20
28
|
"examples": [
|
|
21
|
-
{
|
|
29
|
+
{
|
|
30
|
+
"verb": "redirect",
|
|
31
|
+
"actionHook": "/new-handler"
|
|
32
|
+
}
|
|
22
33
|
]
|
|
23
34
|
}
|
|
@@ -1,24 +1,37 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://jambonz.org/schema/verbs/s2s",
|
|
4
|
+
"minVersion": "10.1.0",
|
|
4
5
|
"title": "S2S",
|
|
5
6
|
"description": "Synonym for 'llm'. Connects the caller to a large language model for a real-time speech-to-speech voice conversation. Requires 'vendor' to be specified explicitly.",
|
|
6
7
|
"type": "object",
|
|
7
|
-
"allOf": [
|
|
8
|
+
"allOf": [
|
|
9
|
+
{
|
|
10
|
+
"$ref": "../components/llm-base"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
8
13
|
"properties": {
|
|
9
14
|
"verb": {
|
|
10
15
|
"const": "s2s",
|
|
11
16
|
"description": "The verb name."
|
|
12
17
|
}
|
|
13
18
|
},
|
|
14
|
-
"required": [
|
|
19
|
+
"required": [
|
|
20
|
+
"vendor",
|
|
21
|
+
"llmOptions"
|
|
22
|
+
],
|
|
15
23
|
"examples": [
|
|
16
24
|
{
|
|
17
25
|
"verb": "s2s",
|
|
18
26
|
"vendor": "openai",
|
|
19
27
|
"model": "gpt-4o-realtime",
|
|
20
28
|
"llmOptions": {
|
|
21
|
-
"messages": [
|
|
29
|
+
"messages": [
|
|
30
|
+
{
|
|
31
|
+
"role": "system",
|
|
32
|
+
"content": "You are a helpful voice assistant."
|
|
33
|
+
}
|
|
34
|
+
]
|
|
22
35
|
},
|
|
23
36
|
"actionHook": "/s2s-complete"
|
|
24
37
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://jambonz.org/schema/verbs/say",
|
|
4
|
+
"minVersion": "0.9.6",
|
|
4
5
|
"title": "Say",
|
|
5
6
|
"description": "Speaks text to the caller using text-to-speech. The text can be plain text or SSML. Optionally streams TTS output incrementally for lower latency. This is one of the most commonly used verbs in jambonz applications.",
|
|
6
7
|
"type": "object",
|
|
@@ -15,23 +16,34 @@
|
|
|
15
16
|
},
|
|
16
17
|
"text": {
|
|
17
18
|
"oneOf": [
|
|
18
|
-
{
|
|
19
|
+
{
|
|
20
|
+
"type": "string"
|
|
21
|
+
},
|
|
19
22
|
{
|
|
20
23
|
"type": "array",
|
|
21
|
-
"items": {
|
|
24
|
+
"items": {
|
|
25
|
+
"type": "string"
|
|
26
|
+
}
|
|
22
27
|
}
|
|
23
28
|
],
|
|
24
29
|
"description": "The text to speak. Can be plain text or SSML markup. If an array is provided, one entry is selected at random (useful for variety in prompts).",
|
|
25
30
|
"examples": [
|
|
26
31
|
"Hello, welcome to our service.",
|
|
27
32
|
"<speak>Hello <break time='500ms'/> welcome.</speak>",
|
|
28
|
-
[
|
|
33
|
+
[
|
|
34
|
+
"Hello!",
|
|
35
|
+
"Hi there!",
|
|
36
|
+
"Welcome!"
|
|
37
|
+
]
|
|
29
38
|
]
|
|
30
39
|
},
|
|
31
40
|
"instructions": {
|
|
32
41
|
"type": "string",
|
|
33
42
|
"description": "Natural language instructions to guide TTS expression and delivery. Supported by vendors that offer instruction-based synthesis (e.g. ElevenLabs, some OpenAI models).",
|
|
34
|
-
"examples": [
|
|
43
|
+
"examples": [
|
|
44
|
+
"Speak in a warm, friendly tone",
|
|
45
|
+
"Sound excited and energetic"
|
|
46
|
+
]
|
|
35
47
|
},
|
|
36
48
|
"stream": {
|
|
37
49
|
"type": "boolean",
|
|
@@ -39,11 +51,18 @@
|
|
|
39
51
|
},
|
|
40
52
|
"loop": {
|
|
41
53
|
"oneOf": [
|
|
42
|
-
{
|
|
43
|
-
|
|
54
|
+
{
|
|
55
|
+
"type": "number"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"type": "string"
|
|
59
|
+
}
|
|
44
60
|
],
|
|
45
61
|
"description": "Number of times to repeat the speech. Use 0 or 'forever' to loop indefinitely until interrupted.",
|
|
46
|
-
"examples": [
|
|
62
|
+
"examples": [
|
|
63
|
+
2,
|
|
64
|
+
"forever"
|
|
65
|
+
]
|
|
47
66
|
},
|
|
48
67
|
"synthesizer": {
|
|
49
68
|
"$ref": "../components/synthesizer",
|
|
@@ -77,7 +96,11 @@
|
|
|
77
96
|
},
|
|
78
97
|
{
|
|
79
98
|
"verb": "say",
|
|
80
|
-
"text": [
|
|
99
|
+
"text": [
|
|
100
|
+
"Hello!",
|
|
101
|
+
"Hi there!",
|
|
102
|
+
"Welcome!"
|
|
103
|
+
],
|
|
81
104
|
"loop": 1
|
|
82
105
|
}
|
|
83
106
|
]
|