Adjustment to transfer example via SWAIG#307
Open
Manny-r31 wants to merge 11 commits into
Open
Conversation
Contributor
Contributor
|
This PR is stale because it has been open 25 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
Collaborator
|
@github-actions don't you dare |
The transfer field was added to the SWMLAction TypeSpec model but the generated JSON schema was never recompiled, so action[].transfer was missing from SWMLObject.json (and the sealed schema would have rejected it). Recompiled with @typespec/json-schema 1.11.0. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
action[].transfer has two source-backed forms (mod_openai/actions.c):
a boolean used alongside a sibling SWML payload (hard-transfer vs inline
execute), and an object {dest, summarize} used standalone to transfer to
a destination. The prior edit relabeled transfer as a pure boolean,
contradicting the transfer.dest/transfer.summarize sub-fields documented
just below it. Describe both forms so the snippet is internally consistent.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
get_next_dest_from_string (mod_infrastructure/swml.c) resolves transfer.dest to either a section in the current SWML document or a SWML URL — not a raw phone number or SIP URI, which would fall through to an unmatched section name. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
swml.mdx still used the old two-object pattern ({"transfer": true}, {"swml":
...}); the SWML action key is uppercase SWML and must sit in the same action
object as transfer (mod_openai/actions.c reads both off one item). Also fix the
swaig.mdx action table, which listed the key as lowercase swml.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Collaborator
ReviewShould be good to go now. I added the following fixes:
|
hey-august
approved these changes
Jun 5, 2026
Collaborator
hey-august
left a comment
There was a problem hiding this comment.
Approving, but @Manny-r31 since I made quite a few edits you'll probably want to confirm it looks good to you as well!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes to SWAIG transfer example to make transfer true requirement more explicit.
Description
This Github issue was made last month. From comments made on the issue recently it appears that more explicit verbiage should be given to the examples where a transfer is being completed via SWAIG function. From what I can see, this was already addressed by us last month when I made my adjustments to the docs to account for this. However one page still required a few small adjustments
Type of Change
Related Issues
https://github.com/signalwire/cloud-product/issues/18361#issuecomment-4345605918
Checklist