VAPI-3437 Add <Refer> BXML verb#201
Open
stampercasey wants to merge 5 commits into
Open
Conversation
The <Refer> verb hands a call off to a SIP endpoint via SIP REFER. Reuses the existing Transfer-flavored SipUri type instead of a distinct Refer-only type, with validation rejecting Transfer-only attributes (TransferAnswerUrl, Username, Uui, etc.) when a SipUri is attached to Refer.
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
ckoegel
reviewed
Jul 7, 2026
Contributor
There was a problem hiding this comment.
this seems to be trying to replicate the autogenerated model docs for the opeanpi schemas. Since it wont come from the api spec, it will need to be hand maintained going forward, and it is also the only BXML verb to have one of these docs. I'd recommend deleting this, customers can use the guide on the dev docs and see the code snippets we'll add there instead
Contributor
There was a problem hiding this comment.
This model got a bit over-engineered. I'm gonna make some changes on the branch to make it more closely align to our other verbs, but for reference:
- we typically leave validation out of BXML models for simplicity, and if validation is needed it can be done on the PV side
- no other verbs only have the
WithFieldNamemethods, these are unnecessary for constructing the verb and add bloat to the model
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.
Summary
<Refer>BXML verb, which sends a call off to a SIP endpoint via SIP REFER.SipUritype for<Refer>'s SIP URI child element, rather than introducing a separateReferSipUritype — see VAPI-3437 for the design rationale.Refer.SipUriElement's setter validates that onlyUriis set (and that it starts withsip:); attaching aSipUriwith any Transfer-only attribute (Username,TransferAnswerUrl,Uui, etc.) throwsArgumentExceptionnaming the offending attribute(s).ReferCompleteCallbackmodel — that will land separately once the api-specs schema (VAPI-3440) is merged, so the SDK-generation workflow can produce it consistently across SDKs.Supersedes #190, which bundled the verb with the callback model and used a nested
Refer.SipUriclass that unintentionally shadowed the sharedSipUritype.Test plan
dotnet testpasses forTestRefer.cs, including new cases covering each Transfer-only attribute being rejected (both viaWithSipUri()and directSipUriElementassignment) and a regression check thatTransfer's own use ofSipUriis unaffecteddocs/Refer.md) reviewed for the Transfer-vs-Refer attribute table