@jambonz/schema 0.1.1
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/AGENTS.md +974 -0
- package/callbacks/amd.schema.json +50 -0
- package/callbacks/base.schema.json +29 -0
- package/callbacks/call-status.schema.json +22 -0
- package/callbacks/conference-status.schema.json +24 -0
- package/callbacks/conference-wait.schema.json +11 -0
- package/callbacks/conference.schema.json +11 -0
- package/callbacks/dequeue.schema.json +19 -0
- package/callbacks/dial-dtmf.schema.json +18 -0
- package/callbacks/dial-hold.schema.json +22 -0
- package/callbacks/dial-refer.schema.json +28 -0
- package/callbacks/dial.schema.json +31 -0
- package/callbacks/enqueue-wait.schema.json +17 -0
- package/callbacks/enqueue.schema.json +27 -0
- package/callbacks/gather-partial.schema.json +54 -0
- package/callbacks/gather.schema.json +60 -0
- package/callbacks/listen.schema.json +21 -0
- package/callbacks/llm.schema.json +30 -0
- package/callbacks/message.schema.json +35 -0
- package/callbacks/pipeline-turn.schema.json +109 -0
- package/callbacks/play.schema.json +36 -0
- package/callbacks/session-new.schema.json +143 -0
- package/callbacks/session-reconnect.schema.json +9 -0
- package/callbacks/session-redirect.schema.json +38 -0
- package/callbacks/sip-refer-event.schema.json +20 -0
- package/callbacks/sip-refer.schema.json +22 -0
- package/callbacks/sip-request.schema.json +27 -0
- package/callbacks/transcribe-translation.schema.json +24 -0
- package/callbacks/transcribe.schema.json +46 -0
- package/callbacks/tts-streaming-event.schema.json +77 -0
- package/callbacks/verb-status.schema.json +57 -0
- package/components/actionHook.schema.json +36 -0
- package/components/actionHookDelayAction.schema.json +37 -0
- package/components/amd.schema.json +68 -0
- package/components/auth.schema.json +18 -0
- package/components/bidirectionalAudio.schema.json +22 -0
- package/components/fillerNoise.schema.json +25 -0
- package/components/llm-base.schema.json +94 -0
- package/components/recognizer-assemblyAiOptions.schema.json +66 -0
- package/components/recognizer-awsOptions.schema.json +52 -0
- package/components/recognizer-azureOptions.schema.json +32 -0
- package/components/recognizer-cobaltOptions.schema.json +34 -0
- package/components/recognizer-customOptions.schema.json +27 -0
- package/components/recognizer-deepgramOptions.schema.json +147 -0
- package/components/recognizer-elevenlabsOptions.schema.json +39 -0
- package/components/recognizer-gladiaOptions.schema.json +8 -0
- package/components/recognizer-googleOptions.schema.json +35 -0
- package/components/recognizer-houndifyOptions.schema.json +53 -0
- package/components/recognizer-ibmOptions.schema.json +54 -0
- package/components/recognizer-nuanceOptions.schema.json +150 -0
- package/components/recognizer-nvidiaOptions.schema.json +39 -0
- package/components/recognizer-openaiOptions.schema.json +59 -0
- package/components/recognizer-sonioxOptions.schema.json +46 -0
- package/components/recognizer-speechmaticsOptions.schema.json +100 -0
- package/components/recognizer-verbioOptions.schema.json +46 -0
- package/components/recognizer.schema.json +216 -0
- package/components/synthesizer.schema.json +82 -0
- package/components/target.schema.json +105 -0
- package/components/vad.schema.json +48 -0
- package/docs/components/recognizer.md +78 -0
- package/docs/components/synthesizer.md +27 -0
- package/docs/guides/session-commands.md +417 -0
- package/docs/verbs/conference.md +51 -0
- package/docs/verbs/deepgram_s2s.md +108 -0
- package/docs/verbs/dial.md +8 -0
- package/docs/verbs/listen.md +71 -0
- package/docs/verbs/pipeline.md +475 -0
- package/docs/verbs/stream.md +5 -0
- package/index.js +9 -0
- package/jambonz-app.schema.json +112 -0
- package/lib/normalize.js +72 -0
- package/lib/validator.js +137 -0
- package/package.json +39 -0
- package/verbs/alert.schema.json +34 -0
- package/verbs/answer.schema.json +22 -0
- package/verbs/conference.schema.json +107 -0
- package/verbs/config.schema.json +218 -0
- package/verbs/deepgram_s2s.schema.json +81 -0
- package/verbs/dequeue.schema.json +51 -0
- package/verbs/dial.schema.json +187 -0
- package/verbs/dialogflow.schema.json +148 -0
- package/verbs/dtmf.schema.json +49 -0
- package/verbs/dub.schema.json +103 -0
- package/verbs/elevenlabs_s2s.schema.json +81 -0
- package/verbs/enqueue.schema.json +53 -0
- package/verbs/gather.schema.json +188 -0
- package/verbs/google_s2s.schema.json +42 -0
- package/verbs/hangup.schema.json +36 -0
- package/verbs/leave.schema.json +22 -0
- package/verbs/listen.schema.json +127 -0
- package/verbs/llm.schema.json +44 -0
- package/verbs/message.schema.json +82 -0
- package/verbs/openai_s2s.schema.json +42 -0
- package/verbs/pause.schema.json +36 -0
- package/verbs/pipeline.schema.json +240 -0
- package/verbs/play.schema.json +96 -0
- package/verbs/redirect.schema.json +34 -0
- package/verbs/s2s.schema.json +39 -0
- package/verbs/say.schema.json +107 -0
- package/verbs/sip-decline.schema.json +58 -0
- package/verbs/sip-refer.schema.json +58 -0
- package/verbs/sip-request.schema.json +54 -0
- package/verbs/stream.schema.json +103 -0
- package/verbs/tag.schema.json +41 -0
- package/verbs/transcribe.schema.json +57 -0
- package/verbs/ultravox_s2s.schema.json +41 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://jambonz.org/schema/callbacks/amd",
|
|
4
|
+
"title": "AMD ActionHook Payload",
|
|
5
|
+
"description": "Payload sent to the AMD actionHook when an answering machine detection event occurs. Multiple events may fire during a single call (e.g. amd_machine_detected followed by amd_machine_stopped_speaking or amd_tone_detected).",
|
|
6
|
+
"allOf": [{ "$ref": "base" }],
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"type": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "The AMD event type. IMPORTANT: This field is 'type', NOT 'amd_type'.",
|
|
12
|
+
"enum": [
|
|
13
|
+
"amd_human_detected",
|
|
14
|
+
"amd_machine_detected",
|
|
15
|
+
"amd_no_speech_detected",
|
|
16
|
+
"amd_decision_timeout",
|
|
17
|
+
"amd_machine_stopped_speaking",
|
|
18
|
+
"amd_tone_detected",
|
|
19
|
+
"amd_tone_timeout",
|
|
20
|
+
"amd_error",
|
|
21
|
+
"amd_stopped"
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
"reason": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"description": "Reason for the detection result (e.g. 'short greeting', 'long greeting', 'hint', 'digit count'). Present on amd_human_detected and amd_machine_detected events."
|
|
27
|
+
},
|
|
28
|
+
"greeting": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"description": "The transcribed greeting text. Present on amd_human_detected and amd_machine_detected events."
|
|
31
|
+
},
|
|
32
|
+
"hint": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"description": "The voicemail hint that matched, if detection was triggered by hint matching."
|
|
35
|
+
},
|
|
36
|
+
"language": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"description": "Language code from the transcription (e.g. 'en-US'). Present on amd_human_detected and amd_machine_detected events."
|
|
39
|
+
},
|
|
40
|
+
"frequency": {
|
|
41
|
+
"type": "number",
|
|
42
|
+
"description": "Frequency of the detected beep in Hz. Present on amd_tone_detected events."
|
|
43
|
+
},
|
|
44
|
+
"variance": {
|
|
45
|
+
"type": "number",
|
|
46
|
+
"description": "Frequency variance of the detected beep. Present on amd_tone_detected events."
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"required": ["type"]
|
|
50
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://jambonz.org/schema/callbacks/base",
|
|
4
|
+
"title": "ActionHook Base Payload",
|
|
5
|
+
"description": "Common fields present in every actionHook callback payload. All verb-specific callback schemas extend this base.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"call_sid": { "type": "string", "description": "Unique identifier for this call." },
|
|
9
|
+
"account_sid": { "type": "string", "description": "Account identifier." },
|
|
10
|
+
"application_sid": { "type": "string", "description": "Application identifier." },
|
|
11
|
+
"direction": { "type": "string", "enum": ["inbound", "outbound"], "description": "Call direction." },
|
|
12
|
+
"from": { "type": "string", "description": "Caller phone number or SIP URI." },
|
|
13
|
+
"to": { "type": "string", "description": "Called phone number or SIP URI." },
|
|
14
|
+
"call_id": { "type": "string", "description": "SIP Call-ID." },
|
|
15
|
+
"sbc_callid": { "type": "string", "description": "SBC-level Call-ID." },
|
|
16
|
+
"call_status": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"enum": ["trying", "ringing", "early-media", "in-progress", "completed", "failed", "busy", "no-answer", "queued"],
|
|
19
|
+
"description": "Current call state."
|
|
20
|
+
},
|
|
21
|
+
"sip_status": { "type": "integer", "description": "SIP response code (e.g. 200, 486)." },
|
|
22
|
+
"sip_reason": { "type": "string", "description": "SIP reason phrase (e.g. 'OK', 'Busy Here')." },
|
|
23
|
+
"trace_id": { "type": "string", "description": "Distributed tracing identifier for correlating logs across jambonz components." },
|
|
24
|
+
"originating_sip_ip": { "type": "string", "description": "IP address of the originating SIP trunk." },
|
|
25
|
+
"originating_sip_trunk_name": { "type": "string", "description": "Name of the originating SIP trunk as configured in jambonz." },
|
|
26
|
+
"api_base_url": { "type": "string", "description": "jambonz REST API base URL. Use this for mid-call control via the REST API." }
|
|
27
|
+
},
|
|
28
|
+
"additionalProperties": true
|
|
29
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://jambonz.org/schema/callbacks/call-status",
|
|
4
|
+
"title": "Call Status Webhook Payload",
|
|
5
|
+
"description": "Payload sent to the call status webhook URL whenever the call state changes (e.g. trying, in-progress, completed). The status webhook is configured at the application level in jambonz. Multiple status events are sent over the life of a call. The final event (completed or failed) includes additional fields like duration and termination cause.",
|
|
6
|
+
"allOf": [
|
|
7
|
+
{ "$ref": "base" }
|
|
8
|
+
],
|
|
9
|
+
"type": "object",
|
|
10
|
+
"properties": {
|
|
11
|
+
"call_termination_by": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"enum": ["caller", "jambonz"],
|
|
14
|
+
"description": "Who terminated the call. 'caller' if the remote party hung up, 'jambonz' if the call was ended by the application (e.g. hangup verb, REST API). Present only on the final status event (completed/failed)."
|
|
15
|
+
},
|
|
16
|
+
"duration": {
|
|
17
|
+
"type": "integer",
|
|
18
|
+
"description": "Call duration in seconds. Present only on the final status event (completed/failed)."
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"additionalProperties": true
|
|
22
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://jambonz.org/schema/callbacks/conference-status",
|
|
4
|
+
"title": "Conference StatusHook Payload",
|
|
5
|
+
"description": "Payload sent to the conference statusHook when a conference event occurs.",
|
|
6
|
+
"allOf": [
|
|
7
|
+
{ "$ref": "base" }
|
|
8
|
+
],
|
|
9
|
+
"type": "object",
|
|
10
|
+
"properties": {
|
|
11
|
+
"event": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"enum": ["start", "end", "join", "leave", "start-talking", "stop-talking"],
|
|
14
|
+
"description": "The conference event that occurred."
|
|
15
|
+
},
|
|
16
|
+
"conference_sid": { "type": "string", "description": "Conference identifier (format: conf:<account_sid>:<conference_name>)." },
|
|
17
|
+
"friendly_name": { "type": "string", "description": "The conference name as specified in the conference verb." },
|
|
18
|
+
"duration": { "type": "number", "description": "Time in seconds since the conference started." },
|
|
19
|
+
"members": { "type": "integer", "description": "Current number of participants in the conference." },
|
|
20
|
+
"time": { "type": "string", "format": "date-time", "description": "ISO 8601 timestamp of when the event occurred." }
|
|
21
|
+
},
|
|
22
|
+
"required": ["event", "conference_sid"],
|
|
23
|
+
"additionalProperties": true
|
|
24
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://jambonz.org/schema/callbacks/conference-wait",
|
|
4
|
+
"title": "Conference WaitHook Payload",
|
|
5
|
+
"description": "Payload sent to the conference waitHook while a participant is waiting for the conference to start. The response should contain an array of say, play, and/or pause verbs to play while waiting.",
|
|
6
|
+
"allOf": [
|
|
7
|
+
{ "$ref": "base" }
|
|
8
|
+
],
|
|
9
|
+
"type": "object",
|
|
10
|
+
"additionalProperties": true
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://jambonz.org/schema/callbacks/conference",
|
|
4
|
+
"title": "Conference ActionHook Payload",
|
|
5
|
+
"description": "Payload sent to the conference verb's actionHook when the participant leaves or the conference ends. Contains only the base call info.",
|
|
6
|
+
"allOf": [
|
|
7
|
+
{ "$ref": "base" }
|
|
8
|
+
],
|
|
9
|
+
"type": "object",
|
|
10
|
+
"additionalProperties": true
|
|
11
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://jambonz.org/schema/callbacks/dequeue",
|
|
4
|
+
"title": "Dequeue ActionHook Payload",
|
|
5
|
+
"description": "Payload sent to the dequeue verb's actionHook when the dequeue operation completes.",
|
|
6
|
+
"allOf": [
|
|
7
|
+
{ "$ref": "base" }
|
|
8
|
+
],
|
|
9
|
+
"type": "object",
|
|
10
|
+
"properties": {
|
|
11
|
+
"dequeue_result": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"enum": ["complete", "timeout", "hangup"],
|
|
14
|
+
"description": "Outcome of the dequeue. 'complete' — successfully dequeued and bridged; 'timeout' — no queued caller found; 'hangup' — call hung up during bridge."
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"required": ["dequeue_result"],
|
|
18
|
+
"additionalProperties": true
|
|
19
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://jambonz.org/schema/callbacks/dial-dtmf",
|
|
4
|
+
"title": "Dial DtmfHook Payload",
|
|
5
|
+
"description": "Payload sent to the dial dtmfHook when DTMF digits matching the configured pattern are detected during a dial.",
|
|
6
|
+
"allOf": [
|
|
7
|
+
{ "$ref": "base" }
|
|
8
|
+
],
|
|
9
|
+
"type": "object",
|
|
10
|
+
"properties": {
|
|
11
|
+
"dtmf": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"description": "The DTMF digit sequence that matched the configured dtmfCapture pattern."
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"required": ["dtmf"],
|
|
17
|
+
"additionalProperties": true
|
|
18
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://jambonz.org/schema/callbacks/dial-hold",
|
|
4
|
+
"title": "Dial OnHoldHook Payload",
|
|
5
|
+
"description": "Payload sent to the dial onHoldHook when the remote party places the call on hold. The response should contain say, play, and/or pause verbs to play as hold music. The hook is called repeatedly until the hold ends.",
|
|
6
|
+
"allOf": [
|
|
7
|
+
{ "$ref": "base" }
|
|
8
|
+
],
|
|
9
|
+
"type": "object",
|
|
10
|
+
"properties": {
|
|
11
|
+
"hold_detail": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"description": "Details of the hold event.",
|
|
14
|
+
"properties": {
|
|
15
|
+
"from": { "type": "string", "description": "SIP From header value." },
|
|
16
|
+
"to": { "type": "string", "description": "SIP To header value." }
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"required": ["hold_detail"],
|
|
21
|
+
"additionalProperties": true
|
|
22
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://jambonz.org/schema/callbacks/dial-refer",
|
|
4
|
+
"title": "Dial ReferHook Payload",
|
|
5
|
+
"description": "Payload sent to the dial referHook when a SIP REFER is received during an active dial. The response can contain new verbs to execute.",
|
|
6
|
+
"allOf": [
|
|
7
|
+
{ "$ref": "base" }
|
|
8
|
+
],
|
|
9
|
+
"type": "object",
|
|
10
|
+
"properties": {
|
|
11
|
+
"refer_details": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"description": "Details of the SIP REFER request. Any custom X-* headers on the REFER are also included as snake_cased properties (e.g. X-Override-Number becomes x_override_number).",
|
|
14
|
+
"properties": {
|
|
15
|
+
"sip_refer_to": { "type": "string", "description": "Full SIP Refer-To header value." },
|
|
16
|
+
"refer_to_user": { "type": "string", "description": "User part of the Refer-To URI (phone number or SIP user)." },
|
|
17
|
+
"sip_referred_by": { "type": "string", "description": "SIP Referred-By header value, if present." },
|
|
18
|
+
"referred_by_user": { "type": "string", "description": "User part of the Referred-By URI, if present." },
|
|
19
|
+
"sip_user_agent": { "type": "string", "description": "User-Agent header from the REFER request." },
|
|
20
|
+
"referring_call_sid": { "type": "string", "description": "Call SID of the leg that sent the REFER." },
|
|
21
|
+
"referred_call_sid": { "type": "string", "description": "Call SID of the leg being referred." }
|
|
22
|
+
},
|
|
23
|
+
"additionalProperties": true
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"required": ["refer_details"],
|
|
27
|
+
"additionalProperties": true
|
|
28
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://jambonz.org/schema/callbacks/dial",
|
|
4
|
+
"title": "Dial ActionHook Payload",
|
|
5
|
+
"description": "Payload sent to the actionHook when a dial verb completes, either because the dialed party hung up, the call was not answered, or an error occurred.",
|
|
6
|
+
"allOf": [
|
|
7
|
+
{ "$ref": "base" }
|
|
8
|
+
],
|
|
9
|
+
"type": "object",
|
|
10
|
+
"properties": {
|
|
11
|
+
"dial_call_status": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"enum": ["completed", "failed", "busy", "no-answer", "trying", "ringing", "early-media", "in-progress"],
|
|
14
|
+
"description": "Final status of the outbound (dialed) call leg."
|
|
15
|
+
},
|
|
16
|
+
"dial_sip_status": {
|
|
17
|
+
"type": "integer",
|
|
18
|
+
"description": "SIP response code from the dialed party (e.g. 200, 486, 487).",
|
|
19
|
+
"examples": [200, 486, 487]
|
|
20
|
+
},
|
|
21
|
+
"dial_call_sid": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"description": "Call SID of the outbound (dialed) call leg."
|
|
24
|
+
},
|
|
25
|
+
"dial_sbc_callid": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"description": "SBC-level Call-ID for the outbound (dialed) call leg."
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"additionalProperties": true
|
|
31
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://jambonz.org/schema/callbacks/enqueue-wait",
|
|
4
|
+
"title": "Enqueue WaitHook Payload",
|
|
5
|
+
"description": "Payload sent to the enqueue waitHook while a caller is waiting in the queue. The response should contain an array of say, play, pause, and/or leave verbs. Note: this payload is sparse — it contains queue-specific fields plus call_sid and call_id, but NOT the full base payload fields.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"queue_sid": { "type": "string", "description": "Queue identifier in the format 'queue:{account_sid}:{queue_name}'." },
|
|
9
|
+
"queue_time": { "type": "integer", "description": "Time in seconds the caller has been waiting in the queue." },
|
|
10
|
+
"queue_size": { "type": "integer", "description": "Total number of callers currently in the queue." },
|
|
11
|
+
"queue_position": { "type": "integer", "description": "Caller's current position in the queue (0-based)." },
|
|
12
|
+
"call_sid": { "type": "string", "description": "Unique identifier for this call." },
|
|
13
|
+
"call_id": { "type": "string", "description": "SIP Call-ID." }
|
|
14
|
+
},
|
|
15
|
+
"required": ["queue_sid", "queue_time"],
|
|
16
|
+
"additionalProperties": true
|
|
17
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://jambonz.org/schema/callbacks/enqueue",
|
|
4
|
+
"title": "Enqueue ActionHook Payload",
|
|
5
|
+
"description": "Payload sent to the enqueue actionHook when the enqueue verb completes — i.e. the call was bridged, abandoned, left the queue, or an error occurred.",
|
|
6
|
+
"allOf": [
|
|
7
|
+
{ "$ref": "base" }
|
|
8
|
+
],
|
|
9
|
+
"type": "object",
|
|
10
|
+
"properties": {
|
|
11
|
+
"queue_sid": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"description": "Queue identifier in the format 'queue:{account_sid}:{queue_name}'."
|
|
14
|
+
},
|
|
15
|
+
"queue_time": {
|
|
16
|
+
"type": "integer",
|
|
17
|
+
"description": "Time in seconds the caller spent waiting in the queue."
|
|
18
|
+
},
|
|
19
|
+
"queue_result": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"enum": ["bridged", "hangup", "leave", "error"],
|
|
22
|
+
"description": "Outcome of the enqueue. 'bridged' — call was dequeued and connected; 'hangup' — caller hung up while waiting; 'leave' — caller executed a leave verb from the waitHook; 'error' — an error occurred during bridging."
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"required": ["queue_sid", "queue_time", "queue_result"],
|
|
26
|
+
"additionalProperties": true
|
|
27
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://jambonz.org/schema/callbacks/gather-partial",
|
|
4
|
+
"title": "Gather Partial Transcript Payload",
|
|
5
|
+
"description": "Payload sent to the partialResultHook during a gather verb with speech input. Delivers interim (partial) speech recognition results as they arrive, before the gather completes. This hook is informational — the response is ignored and does not replace the verb stack. Note: the base fields use slightly different names than the actionHook payload (e.g. local_sip_address instead of fs_sip_address).",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"call_sid": { "type": "string", "description": "Unique identifier for this call." },
|
|
9
|
+
"account_sid": { "type": "string", "description": "Account identifier." },
|
|
10
|
+
"application_sid": { "type": "string", "description": "Application identifier." },
|
|
11
|
+
"direction": { "type": "string", "enum": ["inbound", "outbound"], "description": "Call direction." },
|
|
12
|
+
"from": { "type": "string", "description": "Caller phone number or SIP URI." },
|
|
13
|
+
"to": { "type": "string", "description": "Called phone number or SIP URI." },
|
|
14
|
+
"call_id": { "type": "string", "description": "SIP Call-ID." },
|
|
15
|
+
"sbc_callid": { "type": "string", "description": "SBC-level Call-ID." },
|
|
16
|
+
"call_status": { "type": "string", "description": "Current call state." },
|
|
17
|
+
"sip_status": { "type": "integer", "description": "SIP response code." },
|
|
18
|
+
"sip_reason": { "type": "string", "description": "SIP reason phrase." },
|
|
19
|
+
"trace_id": { "type": "string", "description": "Distributed tracing identifier." },
|
|
20
|
+
"b3": { "type": "string", "description": "B3 trace propagation header." },
|
|
21
|
+
"caller_name": { "type": "string", "description": "Caller display name from SIP, if available." },
|
|
22
|
+
"originating_sip_ip": { "type": "string", "description": "IP address of the originating SIP trunk." },
|
|
23
|
+
"originating_sip_trunk_name": { "type": "string", "description": "Name of the originating SIP trunk." },
|
|
24
|
+
"speech": {
|
|
25
|
+
"type": "object",
|
|
26
|
+
"description": "Interim speech recognition results.",
|
|
27
|
+
"properties": {
|
|
28
|
+
"language_code": { "type": "string", "description": "Language code used for recognition (e.g. 'en-US')." },
|
|
29
|
+
"channel_tag": { "type": "integer", "description": "Audio channel number." },
|
|
30
|
+
"is_final": { "type": "boolean", "description": "Always false for partial results." },
|
|
31
|
+
"alternatives": {
|
|
32
|
+
"type": "array",
|
|
33
|
+
"items": {
|
|
34
|
+
"type": "object",
|
|
35
|
+
"properties": {
|
|
36
|
+
"transcript": { "type": "string", "description": "The partial transcript recognized so far." },
|
|
37
|
+
"confidence": { "type": "number", "description": "Confidence score between 0 and 1." }
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"description": "Array of recognition alternatives, ordered by confidence."
|
|
41
|
+
},
|
|
42
|
+
"vendor": {
|
|
43
|
+
"type": "object",
|
|
44
|
+
"description": "Vendor-specific STT data. Structure varies by provider.",
|
|
45
|
+
"properties": {
|
|
46
|
+
"name": { "type": "string", "description": "STT vendor name (e.g. 'deepgram', 'google', 'aws')." },
|
|
47
|
+
"evt": { "type": "object", "description": "Raw vendor-specific event payload.", "additionalProperties": true }
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"additionalProperties": true
|
|
54
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://jambonz.org/schema/callbacks/gather",
|
|
4
|
+
"title": "Gather ActionHook Payload",
|
|
5
|
+
"description": "Payload sent to the actionHook when a gather verb completes, either due to speech detected, DTMF detected, or timeout.",
|
|
6
|
+
"allOf": [
|
|
7
|
+
{ "$ref": "base" }
|
|
8
|
+
],
|
|
9
|
+
"type": "object",
|
|
10
|
+
"properties": {
|
|
11
|
+
"reason": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"enum": ["speechDetected", "dtmfDetected", "timeout", "error", "stt-low-confidence"],
|
|
14
|
+
"description": "The reason the gather completed."
|
|
15
|
+
},
|
|
16
|
+
"speech": {
|
|
17
|
+
"type": "object",
|
|
18
|
+
"description": "Speech recognition results, present when reason is speechDetected.",
|
|
19
|
+
"properties": {
|
|
20
|
+
"language_code": { "type": "string", "description": "Language code used for recognition (e.g. 'en-US')." },
|
|
21
|
+
"channel_tag": { "type": "integer", "description": "Audio channel number." },
|
|
22
|
+
"is_final": { "type": "boolean", "description": "Whether this is a final (not interim) recognition result." },
|
|
23
|
+
"alternatives": {
|
|
24
|
+
"type": "array",
|
|
25
|
+
"items": {
|
|
26
|
+
"type": "object",
|
|
27
|
+
"properties": {
|
|
28
|
+
"transcript": { "type": "string", "description": "The recognized transcript." },
|
|
29
|
+
"confidence": { "type": "number", "description": "Confidence score between 0 and 1." }
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"description": "Array of recognition alternatives, ordered by confidence."
|
|
33
|
+
},
|
|
34
|
+
"vendor": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"description": "Vendor-specific STT data. Structure varies by provider.",
|
|
37
|
+
"properties": {
|
|
38
|
+
"name": { "type": "string", "description": "STT vendor name (e.g. 'deepgram', 'google', 'aws')." },
|
|
39
|
+
"evt": {
|
|
40
|
+
"description": "Raw vendor-specific event payload. A single object for simple utterances, or an array of objects when jambonz assembles the final transcript from multiple STT segments. Contains provider-specific fields like word-level timestamps, model info, etc.",
|
|
41
|
+
"oneOf": [
|
|
42
|
+
{ "type": "object", "additionalProperties": true },
|
|
43
|
+
{ "type": "array", "items": { "type": "object", "additionalProperties": true } }
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"digits": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"description": "DTMF digits collected, present when reason is dtmfDetected."
|
|
53
|
+
},
|
|
54
|
+
"details": {
|
|
55
|
+
"type": "object",
|
|
56
|
+
"description": "Error information if reason is error."
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"additionalProperties": true
|
|
60
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://jambonz.org/schema/callbacks/listen",
|
|
4
|
+
"title": "Listen ActionHook Payload",
|
|
5
|
+
"description": "Payload sent to the listen verb's actionHook when the listen verb completes.",
|
|
6
|
+
"allOf": [
|
|
7
|
+
{ "$ref": "base" }
|
|
8
|
+
],
|
|
9
|
+
"type": "object",
|
|
10
|
+
"properties": {
|
|
11
|
+
"dial_call_duration": {
|
|
12
|
+
"type": "integer",
|
|
13
|
+
"description": "Duration of the listen session in seconds, present if recording was active."
|
|
14
|
+
},
|
|
15
|
+
"digits": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "DTMF digit that ended the listen, present if finishOnKey was configured and pressed."
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"additionalProperties": true
|
|
21
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://jambonz.org/schema/callbacks/llm",
|
|
4
|
+
"title": "LLM ActionHook Payload",
|
|
5
|
+
"description": "Payload sent to the llm verb's actionHook when the LLM session ends. Applies to all LLM providers (OpenAI, Google, ElevenLabs, Ultravox, and generic voice agents).",
|
|
6
|
+
"allOf": [
|
|
7
|
+
{ "$ref": "base" }
|
|
8
|
+
],
|
|
9
|
+
"type": "object",
|
|
10
|
+
"properties": {
|
|
11
|
+
"completion_reason": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"enum": [
|
|
14
|
+
"normal conversation end",
|
|
15
|
+
"connection failure",
|
|
16
|
+
"disconnect from remote end",
|
|
17
|
+
"server failure",
|
|
18
|
+
"server error",
|
|
19
|
+
"client error calling function",
|
|
20
|
+
"client error calling mcp function"
|
|
21
|
+
],
|
|
22
|
+
"description": "Reason the LLM session ended."
|
|
23
|
+
},
|
|
24
|
+
"error": {
|
|
25
|
+
"description": "Error details, present when completion_reason indicates a failure."
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"required": ["completion_reason"],
|
|
29
|
+
"additionalProperties": true
|
|
30
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://jambonz.org/schema/callbacks/message",
|
|
4
|
+
"title": "Message ActionHook Payload",
|
|
5
|
+
"description": "Payload sent to the message verb's actionHook with the delivery status of an outbound SMS.",
|
|
6
|
+
"allOf": [
|
|
7
|
+
{ "$ref": "base" }
|
|
8
|
+
],
|
|
9
|
+
"type": "object",
|
|
10
|
+
"properties": {
|
|
11
|
+
"message_sid": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"description": "Unique identifier for the message."
|
|
14
|
+
},
|
|
15
|
+
"message_status": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"enum": ["success", "failure", "no carriers", "smpp configuration error", "system error"],
|
|
18
|
+
"description": "Delivery status of the message."
|
|
19
|
+
},
|
|
20
|
+
"carrier": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"description": "Name of the carrier used to send the message. Present on success or carrier-level failure."
|
|
23
|
+
},
|
|
24
|
+
"carrier_message_id": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"description": "Message ID returned by the carrier. Present on success or carrier-level failure."
|
|
27
|
+
},
|
|
28
|
+
"message_failure_reason": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"description": "Reason for failure. Present when message_status is 'failure' or 'system error'."
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"required": ["message_sid", "message_status"],
|
|
34
|
+
"additionalProperties": true
|
|
35
|
+
}
|