Skip to content

VAPI-3437 Add <Refer> BXML verb#201

Open
stampercasey wants to merge 5 commits into
mainfrom
VAPI-3437
Open

VAPI-3437 Add <Refer> BXML verb#201
stampercasey wants to merge 5 commits into
mainfrom
VAPI-3437

Conversation

@stampercasey

@stampercasey stampercasey commented Jul 7, 2026

Copy link
Copy Markdown

Summary

  • Adds the <Refer> BXML verb, which sends a call off to a SIP endpoint via SIP REFER.
  • Reuses the existing Transfer-flavored SipUri type for <Refer>'s SIP URI child element, rather than introducing a separate ReferSipUri type — see VAPI-3437 for the design rationale.
  • Refer.SipUriElement's setter validates that only Uri is set (and that it starts with sip:); attaching a SipUri with any Transfer-only attribute (Username, TransferAnswerUrl, Uui, etc.) throws ArgumentException naming the offending attribute(s).
  • This PR intentionally does not include the ReferCompleteCallback model — 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.SipUri class that unintentionally shadowed the shared SipUri type.

Test plan

  • dotnet test passes for TestRefer.cs, including new cases covering each Transfer-only attribute being rejected (both via WithSipUri() and direct SipUriElement assignment) and a regression check that Transfer's own use of SipUri is unaffected
  • Docs (docs/Refer.md) reviewed for the Transfer-vs-Refer attribute table

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.
@stampercasey stampercasey requested review from a team as code owners July 7, 2026 13:30
@bwappsec

bwappsec commented Jul 7, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@stampercasey stampercasey changed the title VAPI-3437 Add <Refer> BXML verb (reuses shared SipUri) feat(bxml): add Refer verb for SIP call transfer Jul 7, 2026
@stampercasey stampercasey changed the title feat(bxml): add Refer verb for SIP call transfer VAPI-3437 Add <Refer> BXML verb Jul 7, 2026
Comment thread docs/Refer.md Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 WithFieldName methods, these are unnecessary for constructing the verb and add bloat to the model

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants