@jambonz/sdk 0.1.32 → 0.3.0

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 (127) hide show
  1. package/dist/client/index.cjs +9 -3
  2. package/dist/client/index.cjs.map +1 -1
  3. package/dist/client/index.d.cts +4 -4
  4. package/dist/client/index.d.ts +4 -4
  5. package/dist/client/index.js +9 -3
  6. package/dist/client/index.js.map +1 -1
  7. package/dist/index.cjs +55 -99
  8. package/dist/index.cjs.map +1 -1
  9. package/dist/index.d.cts +4 -4
  10. package/dist/index.d.ts +4 -4
  11. package/dist/index.js +57 -101
  12. package/dist/index.js.map +1 -1
  13. package/dist/{rest-B_GQITxM.d.cts → rest-BvOtq44O.d.cts} +3 -3
  14. package/dist/{rest-DgctQy2b.d.ts → rest-DAAEUWsa.d.ts} +3 -3
  15. package/dist/{session-DVGHbtan.d.cts → session-DKaSRkIo.d.cts} +19 -19
  16. package/dist/{session-DVGHbtan.d.ts → session-DKaSRkIo.d.ts} +19 -19
  17. package/dist/types/index.d.cts +3 -3
  18. package/dist/types/index.d.ts +3 -3
  19. package/dist/{verb-builder-tayDQ0fe.d.ts → verb-builder-CFPD9yWI.d.cts} +4 -4
  20. package/dist/{verb-builder-BCjmdgUX.d.cts → verb-builder-D5XRbTtu.d.ts} +4 -4
  21. package/dist/{verbs-B18Kazd9.d.cts → verbs-DKy6nGIH.d.cts} +6 -6
  22. package/dist/{verbs-B18Kazd9.d.ts → verbs-DKy6nGIH.d.ts} +6 -6
  23. package/dist/webhook/index.cjs +38 -88
  24. package/dist/webhook/index.cjs.map +1 -1
  25. package/dist/webhook/index.d.cts +2 -2
  26. package/dist/webhook/index.d.ts +2 -2
  27. package/dist/webhook/index.js +40 -90
  28. package/dist/webhook/index.js.map +1 -1
  29. package/dist/websocket/index.cjs +46 -96
  30. package/dist/websocket/index.cjs.map +1 -1
  31. package/dist/websocket/index.d.cts +7 -7
  32. package/dist/websocket/index.d.ts +7 -7
  33. package/dist/websocket/index.js +48 -98
  34. package/dist/websocket/index.js.map +1 -1
  35. package/package.json +4 -4
  36. package/schema/callbacks/amd.schema.json +0 -50
  37. package/schema/callbacks/base.schema.json +0 -29
  38. package/schema/callbacks/call-status.schema.json +0 -22
  39. package/schema/callbacks/conference-status.schema.json +0 -24
  40. package/schema/callbacks/conference-wait.schema.json +0 -11
  41. package/schema/callbacks/conference.schema.json +0 -11
  42. package/schema/callbacks/dequeue.schema.json +0 -19
  43. package/schema/callbacks/dial-dtmf.schema.json +0 -18
  44. package/schema/callbacks/dial-hold.schema.json +0 -22
  45. package/schema/callbacks/dial-refer.schema.json +0 -28
  46. package/schema/callbacks/dial.schema.json +0 -31
  47. package/schema/callbacks/enqueue-wait.schema.json +0 -17
  48. package/schema/callbacks/enqueue.schema.json +0 -27
  49. package/schema/callbacks/gather-partial.schema.json +0 -54
  50. package/schema/callbacks/gather.schema.json +0 -60
  51. package/schema/callbacks/listen.schema.json +0 -21
  52. package/schema/callbacks/llm.schema.json +0 -30
  53. package/schema/callbacks/message.schema.json +0 -35
  54. package/schema/callbacks/pipeline-turn.schema.json +0 -109
  55. package/schema/callbacks/play.schema.json +0 -36
  56. package/schema/callbacks/session-new.schema.json +0 -143
  57. package/schema/callbacks/session-reconnect.schema.json +0 -9
  58. package/schema/callbacks/session-redirect.schema.json +0 -38
  59. package/schema/callbacks/sip-refer-event.schema.json +0 -20
  60. package/schema/callbacks/sip-refer.schema.json +0 -22
  61. package/schema/callbacks/sip-request.schema.json +0 -27
  62. package/schema/callbacks/transcribe-translation.schema.json +0 -24
  63. package/schema/callbacks/transcribe.schema.json +0 -46
  64. package/schema/callbacks/tts-streaming-event.schema.json +0 -77
  65. package/schema/callbacks/verb-status.schema.json +0 -57
  66. package/schema/components/actionHook.schema.json +0 -36
  67. package/schema/components/actionHookDelayAction.schema.json +0 -37
  68. package/schema/components/amd.schema.json +0 -68
  69. package/schema/components/auth.schema.json +0 -18
  70. package/schema/components/bidirectionalAudio.schema.json +0 -22
  71. package/schema/components/fillerNoise.schema.json +0 -25
  72. package/schema/components/llm-base.schema.json +0 -94
  73. package/schema/components/recognizer-assemblyAiOptions.schema.json +0 -66
  74. package/schema/components/recognizer-awsOptions.schema.json +0 -52
  75. package/schema/components/recognizer-azureOptions.schema.json +0 -32
  76. package/schema/components/recognizer-cobaltOptions.schema.json +0 -34
  77. package/schema/components/recognizer-customOptions.schema.json +0 -27
  78. package/schema/components/recognizer-deepgramOptions.schema.json +0 -147
  79. package/schema/components/recognizer-elevenlabsOptions.schema.json +0 -39
  80. package/schema/components/recognizer-gladiaOptions.schema.json +0 -8
  81. package/schema/components/recognizer-googleOptions.schema.json +0 -35
  82. package/schema/components/recognizer-houndifyOptions.schema.json +0 -53
  83. package/schema/components/recognizer-ibmOptions.schema.json +0 -54
  84. package/schema/components/recognizer-nuanceOptions.schema.json +0 -150
  85. package/schema/components/recognizer-nvidiaOptions.schema.json +0 -39
  86. package/schema/components/recognizer-openaiOptions.schema.json +0 -59
  87. package/schema/components/recognizer-sonioxOptions.schema.json +0 -46
  88. package/schema/components/recognizer-speechmaticsOptions.schema.json +0 -100
  89. package/schema/components/recognizer-verbioOptions.schema.json +0 -46
  90. package/schema/components/recognizer.schema.json +0 -216
  91. package/schema/components/synthesizer.schema.json +0 -82
  92. package/schema/components/target.schema.json +0 -105
  93. package/schema/components/vad.schema.json +0 -48
  94. package/schema/jambonz-app.schema.json +0 -112
  95. package/schema/verbs/alert.schema.json +0 -34
  96. package/schema/verbs/answer.schema.json +0 -22
  97. package/schema/verbs/conference.schema.json +0 -107
  98. package/schema/verbs/config.schema.json +0 -218
  99. package/schema/verbs/deepgram_s2s.schema.json +0 -81
  100. package/schema/verbs/dequeue.schema.json +0 -51
  101. package/schema/verbs/dial.schema.json +0 -187
  102. package/schema/verbs/dialogflow.schema.json +0 -148
  103. package/schema/verbs/dtmf.schema.json +0 -49
  104. package/schema/verbs/dub.schema.json +0 -103
  105. package/schema/verbs/elevenlabs_s2s.schema.json +0 -81
  106. package/schema/verbs/enqueue.schema.json +0 -53
  107. package/schema/verbs/gather.schema.json +0 -188
  108. package/schema/verbs/google_s2s.schema.json +0 -42
  109. package/schema/verbs/hangup.schema.json +0 -36
  110. package/schema/verbs/leave.schema.json +0 -22
  111. package/schema/verbs/listen.schema.json +0 -127
  112. package/schema/verbs/llm.schema.json +0 -44
  113. package/schema/verbs/message.schema.json +0 -82
  114. package/schema/verbs/openai_s2s.schema.json +0 -42
  115. package/schema/verbs/pause.schema.json +0 -36
  116. package/schema/verbs/pipeline.schema.json +0 -240
  117. package/schema/verbs/play.schema.json +0 -96
  118. package/schema/verbs/redirect.schema.json +0 -34
  119. package/schema/verbs/s2s.schema.json +0 -39
  120. package/schema/verbs/say.schema.json +0 -107
  121. package/schema/verbs/sip-decline.schema.json +0 -58
  122. package/schema/verbs/sip-refer.schema.json +0 -58
  123. package/schema/verbs/sip-request.schema.json +0 -54
  124. package/schema/verbs/stream.schema.json +0 -103
  125. package/schema/verbs/tag.schema.json +0 -41
  126. package/schema/verbs/transcribe.schema.json +0 -57
  127. package/schema/verbs/ultravox_s2s.schema.json +0 -41
@@ -1,11 +0,0 @@
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
- }
@@ -1,19 +0,0 @@
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
- }
@@ -1,18 +0,0 @@
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
- }
@@ -1,22 +0,0 @@
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
- }
@@ -1,28 +0,0 @@
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
- }
@@ -1,31 +0,0 @@
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
- }
@@ -1,17 +0,0 @@
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
- }
@@ -1,27 +0,0 @@
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
- }
@@ -1,54 +0,0 @@
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
- }
@@ -1,60 +0,0 @@
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
- }
@@ -1,21 +0,0 @@
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
- }
@@ -1,30 +0,0 @@
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
- }
@@ -1,35 +0,0 @@
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
- }
@@ -1,109 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://jambonz.org/schema/callbacks/pipeline-turn",
4
- "title": "Pipeline EventHook Events",
5
- "description": "Events sent to the pipeline verb's eventHook during a conversation. These are sent as 'pipeline:event' messages over the WebSocket connection.",
6
- "type": "object",
7
- "oneOf": [
8
- {
9
- "properties": {
10
- "type": {
11
- "const": "turn_end",
12
- "description": "Sent at the end of each conversational turn."
13
- },
14
- "transcript": {
15
- "type": "string",
16
- "description": "The user's final speech-to-text transcript for this turn."
17
- },
18
- "response": {
19
- "type": "string",
20
- "description": "The assistant's text response for this turn. May be trimmed to what was actually spoken if the turn was interrupted and alignment tracking is enabled."
21
- },
22
- "interrupted": {
23
- "type": "boolean",
24
- "description": "True if the user interrupted the assistant before it finished speaking.",
25
- "default": false
26
- },
27
- "latency": {
28
- "type": "object",
29
- "description": "Latency metrics for this turn, all in milliseconds. Fields are absent when not applicable.",
30
- "properties": {
31
- "transcriber_latency": {
32
- "type": "integer",
33
- "description": "STT processing latency: time from user stops talking until final transcript received, in milliseconds."
34
- },
35
- "turn_detection_latency": {
36
- "type": "integer",
37
- "description": "Additional wait after final transcript for end-of-turn detection, in milliseconds. Absent when EOT fires before or with the transcript."
38
- },
39
- "model_latency": {
40
- "type": "integer",
41
- "description": "LLM latency: time spent waiting for the first LLM token after the system is ready to prompt, in milliseconds. Absent on a preflight hit."
42
- },
43
- "voice_latency": {
44
- "type": "integer",
45
- "description": "TTS engine latency: time from first text sent to the TTS engine until first audio received back, in milliseconds."
46
- },
47
- "preflight": {
48
- "type": "object",
49
- "description": "Early generation (preflight) metrics. Only present when earlyGeneration is enabled.",
50
- "properties": {
51
- "result": {
52
- "type": "string",
53
- "enum": ["hit", "miss", "pending"],
54
- "description": "Whether the speculative preflight transcript matched the final transcript ('hit'), did not match ('miss'), or was still in progress ('pending')."
55
- },
56
- "tokens": {
57
- "type": "integer",
58
- "description": "Number of preflight tokens that were buffered. Only present on a 'hit'."
59
- }
60
- },
61
- "additionalProperties": false
62
- }
63
- },
64
- "additionalProperties": false
65
- }
66
- },
67
- "required": ["type", "transcript", "response", "interrupted", "latency"],
68
- "additionalProperties": false
69
- },
70
- {
71
- "properties": {
72
- "type": {
73
- "const": "user_transcript",
74
- "description": "Sent when the user's final transcript is available and the system is proceeding to prompt the LLM. This indicates the end of the user's speech input for the current turn."
75
- },
76
- "transcript": {
77
- "type": "string",
78
- "description": "The user's final speech-to-text transcript."
79
- }
80
- },
81
- "required": ["type", "transcript"],
82
- "additionalProperties": false
83
- },
84
- {
85
- "properties": {
86
- "type": {
87
- "const": "agent_response",
88
- "description": "Sent when the LLM has finished generating its response for the current turn. Contains the complete response text."
89
- },
90
- "response": {
91
- "type": "string",
92
- "description": "The assistant's complete text response."
93
- }
94
- },
95
- "required": ["type", "response"],
96
- "additionalProperties": false
97
- },
98
- {
99
- "properties": {
100
- "type": {
101
- "const": "user_interruption",
102
- "description": "Sent when the user barges in (interrupts) while the assistant is speaking. This event has no additional data."
103
- }
104
- },
105
- "required": ["type"],
106
- "additionalProperties": false
107
- }
108
- ]
109
- }
@@ -1,36 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://jambonz.org/schema/callbacks/play",
4
- "title": "Play ActionHook Payload",
5
- "description": "Payload sent to the play verb's actionHook when playback completes or fails.",
6
- "allOf": [
7
- { "$ref": "base" }
8
- ],
9
- "type": "object",
10
- "properties": {
11
- "reason": {
12
- "type": "string",
13
- "enum": ["playCompleted", "playFailed"],
14
- "description": "Outcome of playback. 'playCompleted' on success, 'playFailed' on file-not-found or other error."
15
- },
16
- "playback_seconds": {
17
- "type": "integer",
18
- "description": "Total playback duration in seconds. Present when reason is 'playCompleted'."
19
- },
20
- "playback_milliseconds": {
21
- "type": "integer",
22
- "description": "Total playback duration in milliseconds. Present when reason is 'playCompleted'."
23
- },
24
- "playback_last_offset_pos": {
25
- "type": "string",
26
- "description": "Last offset position in the audio stream. Present when reason is 'playCompleted'."
27
- },
28
- "status": {
29
- "type": "string",
30
- "enum": ["fail"],
31
- "description": "Set to 'fail' when playback failed (e.g. file not found)."
32
- }
33
- },
34
- "required": ["reason"],
35
- "additionalProperties": true
36
- }