From 7d77f26450b3e0433b38da1ee4e85e33c43c0277 Mon Sep 17 00:00:00 2001 From: Nicolas Asanov Date: Tue, 20 Oct 2026 17:11:18 -0400 Subject: [PATCH 1/4] feat(VAPI-3321): add attestationLevel and identity attributes to Transfer verb --- .../bandwidth/sdk/model/bxml/Transfer.java | 8 +++++++ .../unit/models/bxml/TransferVerbTest.java | 24 +++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/src/main/java/com/bandwidth/sdk/model/bxml/Transfer.java b/src/main/java/com/bandwidth/sdk/model/bxml/Transfer.java index 51f36fe2..99966e83 100644 --- a/src/main/java/com/bandwidth/sdk/model/bxml/Transfer.java +++ b/src/main/java/com/bandwidth/sdk/model/bxml/Transfer.java @@ -67,6 +67,8 @@ * This parameter is considered only when diversionTreatment is set to stack. Defaults is unknown. * Defaults to None. * @param privacy (bool, optional): A boolean value to indicate that the calling number should be hidden. Use transferCallerDisplayName to customize the name shown to the recipient. Default is false. + * @param attestationLevel (str, optional): The STIR/SHAKEN attestation level Bandwidth signs the transferred call with. Can be A, B, or C. US outbound only, and only applies to accounts using the Hosted Signing Service (otherwise ignored). If omitted, the account-level attestation policy applies. Cannot be combined with identity. Defaults to None. + * @param identity (str, optional): A finished SIP Identity header value (PASSporT) signed off-platform. Bandwidth passes it unmodified, does not sign the call, and does not verify the signature. Max length 2000 characters; may contain only A-Z a-z 0-9 - _ . + / = ; : < > " and spaces. Cannot be combined with attestationLevel. Defaults to None. * */ public class Transfer implements Verb { @@ -132,6 +134,12 @@ public class Transfer implements Verb { @XmlAttribute protected Boolean privacy; + @XmlAttribute + protected String attestationLevel; + + @XmlAttribute + protected String identity; + @Override public String getVerbName() { return TYPE_NAME; diff --git a/src/test/java/com/bandwidth/sdk/unit/models/bxml/TransferVerbTest.java b/src/test/java/com/bandwidth/sdk/unit/models/bxml/TransferVerbTest.java index 25dad468..13e2d25e 100644 --- a/src/test/java/com/bandwidth/sdk/unit/models/bxml/TransferVerbTest.java +++ b/src/test/java/com/bandwidth/sdk/unit/models/bxml/TransferVerbTest.java @@ -55,6 +55,14 @@ public class TransferVerbTest { .transferCallerDisplayName("Clark Kent") .tag("test") .build(); + Transfer transferWithAttestationLevel = Transfer.builder() + .destinations(List.of(phonenumber)) + .attestationLevel("A") + .build(); + Transfer transferWithIdentity = Transfer.builder() + .destinations(List.of(phonenumber)) + .identity("eyJhbGciOiJFUzI1NiJ9.eyJhdHRlc3QiOiJBIn0.c2ln;info=;ppt=\"shaken\"") + .build(); @Test public void transferVerbWorks() throws JAXBException { @@ -65,4 +73,20 @@ public void transferVerbWorks() throws JAXBException { assertThat(new Bxml().with(transfer1).toBxml(jaxbContext), is(expectedSipUriBxml)); assertThat(new Bxml().with(transfer2).toBxml(jaxbContext), is(expectedPhoneNumberBxml)); } + + @Test + public void transferVerbAttestationLevelWorks() throws JAXBException { + JAXBContext jaxbContext = JAXBContext.newInstance(Bxml.class); + String expectedBxml = "+19195551234"; + + assertThat(new Bxml().with(transferWithAttestationLevel).toBxml(jaxbContext), is(expectedBxml)); + } + + @Test + public void transferVerbIdentityWorks() throws JAXBException { + JAXBContext jaxbContext = JAXBContext.newInstance(Bxml.class); + String expectedBxml = "+19195551234"; + + assertThat(new Bxml().with(transferWithIdentity).toBxml(jaxbContext), is(expectedBxml)); + } }; From a5a2bebe95f797f40a07c7b011a3a5cee26a9d65 Mon Sep 17 00:00:00 2001 From: Nicolas Asanov Date: Tue, 3 Nov 2026 12:10:41 -0500 Subject: [PATCH 2/4] VAPI-4422 Tighten Attestation Level and Identity Docs --- src/main/java/com/bandwidth/sdk/model/bxml/Transfer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/bandwidth/sdk/model/bxml/Transfer.java b/src/main/java/com/bandwidth/sdk/model/bxml/Transfer.java index 99966e83..186bcd02 100644 --- a/src/main/java/com/bandwidth/sdk/model/bxml/Transfer.java +++ b/src/main/java/com/bandwidth/sdk/model/bxml/Transfer.java @@ -67,8 +67,8 @@ * This parameter is considered only when diversionTreatment is set to stack. Defaults is unknown. * Defaults to None. * @param privacy (bool, optional): A boolean value to indicate that the calling number should be hidden. Use transferCallerDisplayName to customize the name shown to the recipient. Default is false. - * @param attestationLevel (str, optional): The STIR/SHAKEN attestation level Bandwidth signs the transferred call with. Can be A, B, or C. US outbound only, and only applies to accounts using the Hosted Signing Service (otherwise ignored). If omitted, the account-level attestation policy applies. Cannot be combined with identity. Defaults to None. - * @param identity (str, optional): A finished SIP Identity header value (PASSporT) signed off-platform. Bandwidth passes it unmodified, does not sign the call, and does not verify the signature. Max length 2000 characters; may contain only A-Z a-z 0-9 - _ . + / = ; : < > " and spaces. Cannot be combined with attestationLevel. Defaults to None. + * @param attestationLevel (str, optional): The STIR/SHAKEN attestation level to sign the transferred call with. Can be A, B, or C. Only applies to accounts using the Hosted Signing Service. Cannot be combined with identity. Defaults to None. + * @param identity (str, optional): A SIP Identity header value (PASSporT) signed by you, sent unmodified on the transferred call. Max length 2000 characters. Cannot be combined with attestationLevel. Defaults to None. * */ public class Transfer implements Verb { From 6dd26663b22581d4268fd3c8eefc2325f173e6cc Mon Sep 17 00:00:00 2001 From: Nicolas Asanov Date: Wed, 11 Nov 2026 11:33:41 -0500 Subject: [PATCH 3/4] refactor(VAPI-4422): rename Transfer attestationLevel to requestedAttestationLevel --- .../java/com/bandwidth/sdk/model/bxml/Transfer.java | 6 +++--- .../sdk/unit/models/bxml/TransferVerbTest.java | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/bandwidth/sdk/model/bxml/Transfer.java b/src/main/java/com/bandwidth/sdk/model/bxml/Transfer.java index 186bcd02..5101c9d9 100644 --- a/src/main/java/com/bandwidth/sdk/model/bxml/Transfer.java +++ b/src/main/java/com/bandwidth/sdk/model/bxml/Transfer.java @@ -67,8 +67,8 @@ * This parameter is considered only when diversionTreatment is set to stack. Defaults is unknown. * Defaults to None. * @param privacy (bool, optional): A boolean value to indicate that the calling number should be hidden. Use transferCallerDisplayName to customize the name shown to the recipient. Default is false. - * @param attestationLevel (str, optional): The STIR/SHAKEN attestation level to sign the transferred call with. Can be A, B, or C. Only applies to accounts using the Hosted Signing Service. Cannot be combined with identity. Defaults to None. - * @param identity (str, optional): A SIP Identity header value (PASSporT) signed by you, sent unmodified on the transferred call. Max length 2000 characters. Cannot be combined with attestationLevel. Defaults to None. + * @param requestedAttestationLevel (str, optional): The STIR/SHAKEN attestation level to sign the transferred call with. Can be A, B, or C. Only applies to accounts using the Hosted Signing Service. Cannot be combined with identity. Defaults to None. + * @param identity (str, optional): A SIP Identity header value (PASSporT) signed by you, sent unmodified on the transferred call. Max length 2000 characters. Cannot be combined with requestedAttestationLevel. Defaults to None. * */ public class Transfer implements Verb { @@ -135,7 +135,7 @@ public class Transfer implements Verb { protected Boolean privacy; @XmlAttribute - protected String attestationLevel; + protected String requestedAttestationLevel; @XmlAttribute protected String identity; diff --git a/src/test/java/com/bandwidth/sdk/unit/models/bxml/TransferVerbTest.java b/src/test/java/com/bandwidth/sdk/unit/models/bxml/TransferVerbTest.java index 13e2d25e..d99352c9 100644 --- a/src/test/java/com/bandwidth/sdk/unit/models/bxml/TransferVerbTest.java +++ b/src/test/java/com/bandwidth/sdk/unit/models/bxml/TransferVerbTest.java @@ -55,9 +55,9 @@ public class TransferVerbTest { .transferCallerDisplayName("Clark Kent") .tag("test") .build(); - Transfer transferWithAttestationLevel = Transfer.builder() + Transfer transferWithRequestedAttestationLevel = Transfer.builder() .destinations(List.of(phonenumber)) - .attestationLevel("A") + .requestedAttestationLevel("A") .build(); Transfer transferWithIdentity = Transfer.builder() .destinations(List.of(phonenumber)) @@ -75,11 +75,11 @@ public void transferVerbWorks() throws JAXBException { } @Test - public void transferVerbAttestationLevelWorks() throws JAXBException { + public void transferVerbRequestedAttestationLevelWorks() throws JAXBException { JAXBContext jaxbContext = JAXBContext.newInstance(Bxml.class); - String expectedBxml = "+19195551234"; + String expectedBxml = "+19195551234"; - assertThat(new Bxml().with(transferWithAttestationLevel).toBxml(jaxbContext), is(expectedBxml)); + assertThat(new Bxml().with(transferWithRequestedAttestationLevel).toBxml(jaxbContext), is(expectedBxml)); } @Test From 3e31fb4f103a176093f0e806d78f226d2796fa19 Mon Sep 17 00:00:00 2001 From: Nicolas Asanov Date: Wed, 11 Nov 2026 11:44:11 -0500 Subject: [PATCH 4/4] test(VAPI-4422): fold Transfer attestation and identity into existing tests --- .../unit/models/bxml/TransferVerbTest.java | 28 ++----------------- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/src/test/java/com/bandwidth/sdk/unit/models/bxml/TransferVerbTest.java b/src/test/java/com/bandwidth/sdk/unit/models/bxml/TransferVerbTest.java index d99352c9..2b7133fb 100644 --- a/src/test/java/com/bandwidth/sdk/unit/models/bxml/TransferVerbTest.java +++ b/src/test/java/com/bandwidth/sdk/unit/models/bxml/TransferVerbTest.java @@ -47,6 +47,8 @@ public class TransferVerbTest { .transferCallerId("+19195554321") .tag("test") .privacy(true) + .requestedAttestationLevel("A") + .identity("eyJhbGciOiJFUzI1NiJ9.eyJhdHRlc3QiOiJBIn0.c2ln;info=;ppt=\"shaken\"") .build(); Transfer transfer2 = Transfer.builder() .callTimeout(15d) @@ -55,38 +57,14 @@ public class TransferVerbTest { .transferCallerDisplayName("Clark Kent") .tag("test") .build(); - Transfer transferWithRequestedAttestationLevel = Transfer.builder() - .destinations(List.of(phonenumber)) - .requestedAttestationLevel("A") - .build(); - Transfer transferWithIdentity = Transfer.builder() - .destinations(List.of(phonenumber)) - .identity("eyJhbGciOiJFUzI1NiJ9.eyJhdHRlc3QiOiJBIn0.c2ln;info=;ppt=\"shaken\"") - .build(); @Test public void transferVerbWorks() throws JAXBException { JAXBContext jaxbContext = JAXBContext.newInstance(Bxml.class); - String expectedSipUriBxml = "sip@bw.com"; + String expectedSipUriBxml = "sip@bw.com"; String expectedPhoneNumberBxml = "+19195551234"; assertThat(new Bxml().with(transfer1).toBxml(jaxbContext), is(expectedSipUriBxml)); assertThat(new Bxml().with(transfer2).toBxml(jaxbContext), is(expectedPhoneNumberBxml)); } - - @Test - public void transferVerbRequestedAttestationLevelWorks() throws JAXBException { - JAXBContext jaxbContext = JAXBContext.newInstance(Bxml.class); - String expectedBxml = "+19195551234"; - - assertThat(new Bxml().with(transferWithRequestedAttestationLevel).toBxml(jaxbContext), is(expectedBxml)); - } - - @Test - public void transferVerbIdentityWorks() throws JAXBException { - JAXBContext jaxbContext = JAXBContext.newInstance(Bxml.class); - String expectedBxml = "+19195551234"; - - assertThat(new Bxml().with(transferWithIdentity).toBxml(jaxbContext), is(expectedBxml)); - } };