@jambonz/sdk 0.3.1 → 0.3.2

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 (2) hide show
  1. package/AGENTS.md +6 -0
  2. package/package.json +2 -2
package/AGENTS.md CHANGED
@@ -359,8 +359,14 @@ session.injectTag({ supervisor: 'jane', priority: 'high' });
359
359
 
360
360
  // Generic inject (for any command)
361
361
  session.injectCommand('redirect', { call_hook: '/new-flow' });
362
+
363
+ // Target a specific call leg (e.g., B-leg during a bridged call)
364
+ // Pass call_sid as the third argument to route the command to that leg
365
+ session.injectCommand('dub', { action: 'sayOnTrack', track: 'callee-audio', say: 'Hello' }, dialCallSid);
362
366
  ```
363
367
 
368
+ **Targeting specific call legs:** When bridging calls with `dial`, inject commands default to the A-leg. To target the B-leg, pass its `call_sid` as the third argument. Capture the B-leg call_sid from `call:status` events where `direction === 'outbound'`. See `guide:session-commands` for the full pattern.
369
+
364
370
  ## Session Commands
365
371
 
366
372
  Beyond verbs, WebSocket apps can perform async operations at any time during a call: TTS token streaming, inject commands (mute, whisper, DTMF, recording), and LLM tool output. These are SDK method calls that execute immediately without affecting the verb stack.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jambonz/sdk",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "jambonz SDK for building voice applications — optimized for AI agents",
5
5
  "author": "Dave Horton",
6
6
  "license": "MIT",
@@ -95,7 +95,7 @@
95
95
  "postpublish": "npm run clean-docs"
96
96
  },
97
97
  "dependencies": {
98
- "@jambonz/schema": "^0.2.1",
98
+ "@jambonz/schema": "^0.2.2",
99
99
  "ajv": "^8.17.1",
100
100
  "ws": "^8.18.0"
101
101
  },