Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ docs/AdditionalDenialReason.md
docs/Address.md
docs/AnswerCallback.md
docs/AsyncLookupRequest.md
docs/AttestationLevelEnum.md
docs/BlockedWebhook.md
docs/BridgeCompleteCallback.md
docs/BridgeTargetCompleteCallback.md
Expand Down Expand Up @@ -264,6 +265,7 @@ src/main/java/com/bandwidth/sdk/model/AdditionalDenialReason.java
src/main/java/com/bandwidth/sdk/model/Address.java
src/main/java/com/bandwidth/sdk/model/AnswerCallback.java
src/main/java/com/bandwidth/sdk/model/AsyncLookupRequest.java
src/main/java/com/bandwidth/sdk/model/AttestationLevelEnum.java
src/main/java/com/bandwidth/sdk/model/BlockedWebhook.java
src/main/java/com/bandwidth/sdk/model/BridgeCompleteCallback.java
src/main/java/com/bandwidth/sdk/model/BridgeTargetCompleteCallback.java
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ Class | Method | HTTP request | Description
- [Address](docs/Address.md)
- [AnswerCallback](docs/AnswerCallback.md)
- [AsyncLookupRequest](docs/AsyncLookupRequest.md)
- [AttestationLevelEnum](docs/AttestationLevelEnum.md)
- [BlockedWebhook](docs/BlockedWebhook.md)
- [BridgeCompleteCallback](docs/BridgeCompleteCallback.md)
- [BridgeTargetCompleteCallback](docs/BridgeTargetCompleteCallback.md)
Expand Down
51 changes: 51 additions & 0 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11120,6 +11120,15 @@ components:
- segmentCount
- time
- to
attestationLevelEnum:
description: "The STIR/SHAKEN attestation level Bandwidth signs the call with:\
\ `A` (full), `B` (partial), or `C` (gateway)."
enum:
- A
- B
- C
example: B
type: string
callbackMethodEnum:
default: POST
description: The HTTP method to use to deliver the callback. GET or POST. Default
Expand Down Expand Up @@ -11263,6 +11272,33 @@ components:
example: "eyJhbGciOiJIUzI1NiJ9.WyJoaSJd.-znkjYyCkgz4djmHUPSXl9YrJ6Nix_XvmlwKGFh5ERM;encoding=jwt,aGVsbG8gd29ybGQ;encoding=base64"
nullable: true
type: string
requestedAttestationLevel:
allOf:
- $ref: "#/components/schemas/attestationLevelEnum"
description: |-
The STIR/SHAKEN attestation level (`A`, `B`, or `C`) you request Bandwidth sign this call with.
Applies to outbound calls to US destinations only, and only to accounts that use the
<a href='/docs/voice/stir-shaken/hosted-signing-service'>Hosted Signing Service</a>; it is ignored
for all other accounts. If omitted, the attestation policy configured on your account is used.

Cannot be combined with `identity`. A request that includes both is rejected with a `400`, as is
any value other than `A`, `B`, or `C`.
nullable: true
identity:
description: |-
A complete SIP `Identity` header value that you signed yourself. It must be a valid STIR/SHAKEN
PASSporT and may not exceed 2000 characters. Bandwidth sends it unmodified on the outbound call and
does not sign the call. Bandwidth checks only the format and size of the value, not the signature.
Applies to outbound calls to US destinations only.

Cannot be combined with `requestedAttestationLevel`. A request that includes both, or a value that is too long
or not in the expected format, is rejected with a `400`.
example: eyJhbGciOiJFUzI1NiIsInBwdCI6InNoYWtlbiIsInR5cCI6InBhc3Nwb3J0IiwieDV1IjoiaHR0cHM6Ly9jZXJ0LmV4YW1wbGUvY2VydC5wZW0ifQ.eyJhdHRlc3QiOiJBIiwiZGVzdCI6eyJ0biI6WyIxOTE5NTU1MTIzNCJdfSwiaWF0IjoxNzAwMDAwMDAwLCJvcmlnIjp7InRuIjoiMTU1NTU1NTEyMTIifSwib3JpZ2lkIjoiMTIzNCJ9.c2lnbmF0dXJl;info=<https://cert.example/cert.pem>;alg=ES256;ppt="shaken"
maxLength: 2000
minLength: 1
nullable: true
pattern: "^ *[A-Za-z0-9\\-_.+/=;:<>\"][A-Za-z0-9\\-_.+/=;:<>\" ]*$"
type: string
applicationId:
description: The id of the application associated with the `from` number.
example: 1234-qwer-5679-tyui
Expand Down Expand Up @@ -11411,6 +11447,8 @@ components:
fallbackUsername: mySecretUsername
fallbackPassword: mySecretPassword1!
priority: 5
requestedAttestationLevel: ""
identity: eyJhbGciOiJFUzI1NiIsInBwdCI6InNoYWtlbiIsInR5cCI6InBhc3Nwb3J0IiwieDV1IjoiaHR0cHM6Ly9jZXJ0LmV4YW1wbGUvY2VydC5wZW0ifQ.eyJhdHRlc3QiOiJBIiwiZGVzdCI6eyJ0biI6WyIxOTE5NTU1MTIzNCJdfSwiaWF0IjoxNzAwMDAwMDAwLCJvcmlnIjp7InRuIjoiMTU1NTU1NTEyMTIifSwib3JpZ2lkIjoiMTIzNCJ9.c2lnbmF0dXJl;info=<https://cert.example/cert.pem>;alg=ES256;ppt="shaken"
properties:
applicationId:
description: The id of the application associated with the `from` number.
Expand Down Expand Up @@ -11512,6 +11550,19 @@ components:
example: 5
nullable: true
type: integer
requestedAttestationLevel:
allOf:
- $ref: "#/components/schemas/attestationLevelEnum"
description: |-
The `requestedAttestationLevel` provided in the Create Call request, if any. This is the level you requested,
which can differ from the level the call is ultimately signed with.
nullable: true
identity:
description: "The `identity` value provided in the Create Call request,\
\ if any."
example: eyJhbGciOiJFUzI1NiIsInBwdCI6InNoYWtlbiIsInR5cCI6InBhc3Nwb3J0IiwieDV1IjoiaHR0cHM6Ly9jZXJ0LmV4YW1wbGUvY2VydC5wZW0ifQ.eyJhdHRlc3QiOiJBIiwiZGVzdCI6eyJ0biI6WyIxOTE5NTU1MTIzNCJdfSwiaWF0IjoxNzAwMDAwMDAwLCJvcmlnIjp7InRuIjoiMTU1NTU1NTEyMTIifSwib3JpZ2lkIjoiMTIzNCJ9.c2lnbmF0dXJl;info=<https://cert.example/cert.pem>;alg=ES256;ppt="shaken"
nullable: true
type: string
required:
- accountId
- answerMethod
Expand Down
70 changes: 70 additions & 0 deletions bandwidth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3241,6 +3241,16 @@ components:
- direction
- to
- from
attestationLevelEnum:
type: string
enum:
- A
- B
- C
description: >-
The STIR/SHAKEN attestation level Bandwidth signs the call with: `A`
(full), `B` (partial), or `C` (gateway).
example: B
callbackMethodEnum:
type: string
nullable: true
Expand Down Expand Up @@ -3419,6 +3429,52 @@ components:
entire value

cannot exceed 350 characters, including parameters and separators.
requestedAttestationLevel:
nullable: true
allOf:
- $ref: '#/components/schemas/attestationLevelEnum'
description: >-
The STIR/SHAKEN attestation level (`A`, `B`, or `C`) you request
Bandwidth sign this call with.

Applies to outbound calls to US destinations only, and only to
accounts that use the

<a href='/docs/voice/stir-shaken/hosted-signing-service'>Hosted
Signing Service</a>; it is ignored

for all other accounts. If omitted, the attestation policy
configured on your account is used.


Cannot be combined with `identity`. A request that includes both is
rejected with a `400`, as is

any value other than `A`, `B`, or `C`.
identity:
nullable: true
type: string
minLength: 1
maxLength: 2000
pattern: ^ *[A-Za-z0-9\-_.+/=;:<>"][A-Za-z0-9\-_.+/=;:<>" ]*$
description: >-
A complete SIP `Identity` header value that you signed yourself. It
must be a valid STIR/SHAKEN

PASSporT and may not exceed 2000 characters. Bandwidth sends it
unmodified on the outbound call and

does not sign the call. Bandwidth checks only the format and size of
the value, not the signature.

Applies to outbound calls to US destinations only.


Cannot be combined with `requestedAttestationLevel`. A request that
includes both, or a value that is too long

or not in the expected format, is rejected with a `400`.
example: eyJhbGciOiJFUzI1NiIsInBwdCI6InNoYWtlbiIsInR5cCI6InBhc3Nwb3J0IiwieDV1IjoiaHR0cHM6Ly9jZXJ0LmV4YW1wbGUvY2VydC5wZW0ifQ.eyJhdHRlc3QiOiJBIiwiZGVzdCI6eyJ0biI6WyIxOTE5NTU1MTIzNCJdfSwiaWF0IjoxNzAwMDAwMDAwLCJvcmlnIjp7InRuIjoiMTU1NTU1NTEyMTIifSwib3JpZ2lkIjoiMTIzNCJ9.c2lnbmF0dXJl;info=<https://cert.example/cert.pem>;alg=ES256;ppt="shaken"
applicationId:
type: string
description: The id of the application associated with the `from` number.
Expand Down Expand Up @@ -3688,6 +3744,20 @@ components:
type: integer
example: 5
description: The priority of this call over other calls from your account.
requestedAttestationLevel:
nullable: true
allOf:
- $ref: '#/components/schemas/attestationLevelEnum'
description: >-
The `requestedAttestationLevel` provided in the Create Call request,
if any. This is the level you requested,

which can differ from the level the call is ultimately signed with.
identity:
nullable: true
type: string
description: The `identity` value provided in the Create Call request, if any.
example: eyJhbGciOiJFUzI1NiIsInBwdCI6InNoYWtlbiIsInR5cCI6InBhc3Nwb3J0IiwieDV1IjoiaHR0cHM6Ly9jZXJ0LmV4YW1wbGUvY2VydC5wZW0ifQ.eyJhdHRlc3QiOiJBIiwiZGVzdCI6eyJ0biI6WyIxOTE5NTU1MTIzNCJdfSwiaWF0IjoxNzAwMDAwMDAwLCJvcmlnIjp7InRuIjoiMTU1NTU1NTEyMTIifSwib3JpZ2lkIjoiMTIzNCJ9.c2lnbmF0dXJl;info=<https://cert.example/cert.pem>;alg=ES256;ppt="shaken"
callState:
type: object
properties:
Expand Down
15 changes: 15 additions & 0 deletions docs/AttestationLevelEnum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@


# AttestationLevelEnum

## Enum


* `A` (value: `"A"`)

* `B` (value: `"B"`)

* `C` (value: `"C"`)



2 changes: 2 additions & 0 deletions docs/CreateCall.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
|**privacy** | **Boolean** | Hide the calling number. The &#x60;displayName&#x60; field can be used to customize the displayed name. | [optional] |
|**displayName** | **String** | The caller display name to use when the call is created. May not exceed 256 characters nor contain control characters such as new lines. If &#x60;privacy&#x60; is true, only the following values are valid: &#x60;Restricted&#x60;, &#x60;Anonymous&#x60;, &#x60;Private&#x60;, or &#x60;Unavailable&#x60;. | [optional] |
|**uui** | **String** | A comma-separated list of &#39;User-To-User&#39; headers to be sent in the INVITE when calling a SIP URI. Each value must end with an &#39;encoding&#39; parameter as described in &lt;a href&#x3D;&#39;https://tools.ietf.org/html/rfc7433&#39;&gt;RFC 7433&lt;/a&gt;. Only &#39;jwt&#39;, &#39;base64&#39; and &#39;hex&#39; encodings are allowed. The entire value cannot exceed 350 characters, including parameters and separators. | [optional] |
|**requestedAttestationLevel** | **AttestationLevelEnum** | The STIR/SHAKEN attestation level (&#x60;A&#x60;, &#x60;B&#x60;, or &#x60;C&#x60;) you request Bandwidth sign this call with. Applies to outbound calls to US destinations only, and only to accounts that use the &lt;a href&#x3D;&#39;/docs/voice/stir-shaken/hosted-signing-service&#39;&gt;Hosted Signing Service&lt;/a&gt;; it is ignored for all other accounts. If omitted, the attestation policy configured on your account is used. Cannot be combined with &#x60;identity&#x60;. A request that includes both is rejected with a &#x60;400&#x60;, as is any value other than &#x60;A&#x60;, &#x60;B&#x60;, or &#x60;C&#x60;. | [optional] |
|**identity** | **String** | A complete SIP &#x60;Identity&#x60; header value that you signed yourself. It must be a valid STIR/SHAKEN PASSporT and may not exceed 2000 characters. Bandwidth sends it unmodified on the outbound call and does not sign the call. Bandwidth checks only the format and size of the value, not the signature. Applies to outbound calls to US destinations only. Cannot be combined with &#x60;requestedAttestationLevel&#x60;. A request that includes both, or a value that is too long or not in the expected format, is rejected with a &#x60;400&#x60;. | [optional] |
|**applicationId** | **String** | The id of the application associated with the &#x60;from&#x60; number. | |
|**answerUrl** | **URI** | The full URL to send the &lt;a href&#x3D;&#39;/docs/voice/webhooks/answer&#39;&gt;Answer&lt;/a&gt; event to when the called party answers. This endpoint should return the first &lt;a href&#x3D;&#39;/docs/voice/bxml&#39;&gt;BXML document&lt;/a&gt; to be executed in the call. Must use &#x60;https&#x60; if specifying &#x60;username&#x60; and &#x60;password&#x60;. | |
|**answerMethod** | **CallbackMethodEnum** | | [optional] |
Expand Down
2 changes: 2 additions & 0 deletions docs/CreateCallResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
|**fallbackUsername** | **String** | Basic auth username. | [optional] |
|**fallbackPassword** | **String** | Basic auth password. | [optional] |
|**priority** | **Integer** | The priority of this call over other calls from your account. | [optional] |
|**requestedAttestationLevel** | **AttestationLevelEnum** | The &#x60;requestedAttestationLevel&#x60; provided in the Create Call request, if any. This is the level you requested, which can differ from the level the call is ultimately signed with. | [optional] |
|**identity** | **String** | The &#x60;identity&#x60; value provided in the Create Call request, if any. | [optional] |



80 changes: 80 additions & 0 deletions src/main/java/com/bandwidth/sdk/model/AttestationLevelEnum.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
/*
* Bandwidth
* Bandwidth's Communication APIs
*
* The version of the OpenAPI document: 1.0.0
* Contact: letstalk@bandwidth.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/


package com.bandwidth.sdk.model;

import java.util.Objects;
import com.google.gson.annotations.SerializedName;

import java.io.IOException;
import com.google.gson.TypeAdapter;
import com.google.gson.JsonElement;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;

/**
* The STIR/SHAKEN attestation level Bandwidth signs the call with: &#x60;A&#x60; (full), &#x60;B&#x60; (partial), or &#x60;C&#x60; (gateway).
*/
@JsonAdapter(AttestationLevelEnum.Adapter.class)
public enum AttestationLevelEnum {

A("A"),

B("B"),

C("C");

private String value;

AttestationLevelEnum(String value) {
this.value = value;
}

public String getValue() {
return value;
}

@Override
public String toString() {
return String.valueOf(value);
}

public static AttestationLevelEnum fromValue(String value) {
for (AttestationLevelEnum b : AttestationLevelEnum.values()) {
if (b.value.equalsIgnoreCase(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}

public static class Adapter extends TypeAdapter<AttestationLevelEnum> {
@Override
public void write(final JsonWriter jsonWriter, final AttestationLevelEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}

@Override
public AttestationLevelEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return AttestationLevelEnum.fromValue(value);
}
}

public static void validateJsonElement(JsonElement jsonElement) throws IOException {
String value = jsonElement.getAsString();
AttestationLevelEnum.fromValue(value);
}
}

Loading