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
68 changes: 68 additions & 0 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12379,6 +12379,13 @@ components:
type: string
machineDetectionResult:
$ref: "#/components/schemas/machineDetectionResult"
sipCallId:
description: "(optional) The SIP Call-ID of the call's current SIP dialog\
\ with Bandwidth's SBC. Used to correlate dialogs and trace calls. Present\
\ on any call, inbound or outbound, once that dialog has been established;\
\ may be absent very early in a call before the dialog exists."
example: c95ac8d6e1a31c52eb38f419893c151633ec68f8d@sbc.bandwidth.com
type: string
type: object
bridgeCompleteCallback:
description: "If the target call leaves the <Bridge>, then this callback is\
Expand Down Expand Up @@ -12958,6 +12965,19 @@ components:
example: exampleTag
nullable: true
type: string
sipCallId:
description: "(optional) The SIP Call-ID of the call's current SIP dialog\
\ with Bandwidth's SBC. Used to correlate dialogs and trace calls. Present\
\ on any call, inbound or outbound, once that dialog has been established;\
\ may be absent very early in a call before the dialog exists."
example: c95ac8d6e1a31c52eb38f419893c151633ec68f8d@sbc.bandwidth.com
type: string
sipResponseCode:
description: "(optional) The SIP status code returned by Bandwidth's SBC\
\ when it rejected an outbound call's INVITE (e.g. 486 for busy, 603 for\
\ decline). Present only when an outbound call was rejected by the SBC."
example: 486
type: integer
type: object
dtmfCallback:
description: The DTMF event is sent for every digit detected after a <StartGather>
Expand Down Expand Up @@ -13222,6 +13242,27 @@ components:
example: bXktdXVp
maxLength: 256
type: string
sipCallId:
description: "(optional) The SIP Call-ID of the call's current SIP dialog\
\ with Bandwidth's SBC. Used to correlate dialogs and trace calls. Present\
\ on any call, inbound or outbound, once that dialog has been established;\
\ may be absent very early in a call before the dialog exists."
example: c95ac8d6e1a31c52eb38f419893c151633ec68f8d@sbc.bandwidth.com
type: string
sipHeaders:
additionalProperties:
type: string
description: "(optional) Map of customer-supplied X-* headers from the original\
\ INVITE. Keys are lowercase (SIP headers are case-insensitive). Present\
\ only for inbound SIP URI calls with custom headers. Note - keys preserve\
\ the original SIP header name in lowercase rather than Bandwidth's usual\
\ camelCase JSON convention, since these are passthrough values from the\
\ caller's SIP INVITE, not Bandwidth-defined fields. If the same header\
\ name is sent more than once in the INVITE, only the last value is kept."
example:
x-custom-header: customer-value
x-session-id: sess-12345
type: object
type: object
machineDetectionCompleteCallback:
description: "This event is sent to the url informed when requesting a machine\
Expand Down Expand Up @@ -14309,6 +14350,33 @@ components:
example: bXktdXVp
maxLength: 256
type: string
sipCallId:
description: "(optional) The SIP Call-ID of the call's current SIP dialog with\
\ Bandwidth's SBC. Used to correlate dialogs and trace calls. Present on any\
\ call, inbound or outbound, once that dialog has been established; may be\
\ absent very early in a call before the dialog exists."
example: c95ac8d6e1a31c52eb38f419893c151633ec68f8d@sbc.bandwidth.com
type: string
sipHeaders:
additionalProperties:
type: string
description: "(optional) Map of customer-supplied X-* headers from the original\
\ INVITE. Keys are lowercase (SIP headers are case-insensitive). Present only\
\ for inbound SIP URI calls with custom headers. Note - keys preserve the\
\ original SIP header name in lowercase rather than Bandwidth's usual camelCase\
\ JSON convention, since these are passthrough values from the caller's SIP\
\ INVITE, not Bandwidth-defined fields. If the same header name is sent more\
\ than once in the INVITE, only the last value is kept."
example:
x-custom-header: customer-value
x-session-id: sess-12345
type: object
sipResponseCode:
description: "(optional) The SIP status code returned by Bandwidth's SBC when\
\ it rejected an outbound call's INVITE (e.g. 486 for busy, 603 for decline).\
\ Present only when an outbound call was rejected by the SBC."
example: 486
type: integer
codeRequest:
properties:
to:
Expand Down
40 changes: 40 additions & 0 deletions bandwidth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4568,6 +4568,8 @@ components:
$ref: '#/components/schemas/tag1'
machineDetectionResult:
$ref: '#/components/schemas/machineDetectionResult'
sipCallId:
$ref: '#/components/schemas/sipCallId'
bridgeCompleteCallback:
type: object
description: >-
Expand Down Expand Up @@ -4832,6 +4834,10 @@ components:
$ref: '#/components/schemas/errorId'
tag:
$ref: '#/components/schemas/tag1'
sipCallId:
$ref: '#/components/schemas/sipCallId'
sipResponseCode:
$ref: '#/components/schemas/sipResponseCode'
dtmfCallback:
type: object
description: >-
Expand Down Expand Up @@ -4948,6 +4954,10 @@ components:
$ref: '#/components/schemas/stirShaken'
uui:
$ref: '#/components/schemas/uui'
sipCallId:
$ref: '#/components/schemas/sipCallId'
sipHeaders:
$ref: '#/components/schemas/sipHeaders'
machineDetectionCompleteCallback:
type: object
description: >-
Expand Down Expand Up @@ -5595,6 +5605,36 @@ components:
value, including the encoding specifier, may not exceed 256 characters.
example: bXktdXVp
maxLength: 256
sipCallId:
type: string
description: >-
(optional) The SIP Call-ID of the call's current SIP dialog with
Bandwidth's SBC. Used to correlate dialogs and trace calls. Present on
any call, inbound or outbound, once that dialog has been established;
may be absent very early in a call before the dialog exists.
example: c95ac8d6e1a31c52eb38f419893c151633ec68f8d@sbc.bandwidth.com
sipHeaders:
type: object
additionalProperties:
type: string
description: >-
(optional) Map of customer-supplied X-* headers from the original
INVITE. Keys are lowercase (SIP headers are case-insensitive). Present
only for inbound SIP URI calls with custom headers. Note - keys preserve
the original SIP header name in lowercase rather than Bandwidth's usual
camelCase JSON convention, since these are passthrough values from the
caller's SIP INVITE, not Bandwidth-defined fields. If the same header
name is sent more than once in the INVITE, only the last value is kept.
example:
x-custom-header: customer-value
x-session-id: sess-12345
sipResponseCode:
type: integer
description: >-
(optional) The SIP status code returned by Bandwidth's SBC when it
rejected an outbound call's INVITE (e.g. 486 for busy, 603 for decline).
Present only when an outbound call was rejected by the SBC.
example: 486
codeRequest:
type: object
properties:
Expand Down
1 change: 1 addition & 0 deletions docs/AnswerCallback.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ The Answer event is sent to the answerUrl specified in the createCall request wh
|**answerTime** | **OffsetDateTime** | Time the call was answered, in ISO 8601 format. | [optional] |
|**tag** | **String** | (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. | [optional] |
|**machineDetectionResult** | [**MachineDetectionResult**](MachineDetectionResult.md) | | [optional] |
|**sipCallId** | **String** | (optional) The SIP Call-ID of the call&#39;s current SIP dialog with Bandwidth&#39;s SBC. Used to correlate dialogs and trace calls. Present on any call, inbound or outbound, once that dialog has been established; may be absent very early in a call before the dialog exists. | [optional] |



2 changes: 2 additions & 0 deletions docs/DisconnectCallback.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ The Disconnect event is fired when a call ends, for any reason.
|**errorMessage** | **String** | Text explaining the reason that caused the call to fail in case of errors. | [optional] |
|**errorId** | **String** | Bandwidth&#39;s internal id that references the error event. | [optional] |
|**tag** | **String** | (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. | [optional] |
|**sipCallId** | **String** | (optional) The SIP Call-ID of the call&#39;s current SIP dialog with Bandwidth&#39;s SBC. Used to correlate dialogs and trace calls. Present on any call, inbound or outbound, once that dialog has been established; may be absent very early in a call before the dialog exists. | [optional] |
|**sipResponseCode** | **Integer** | (optional) The SIP status code returned by Bandwidth&#39;s SBC when it rejected an outbound call&#39;s INVITE (e.g. 486 for busy, 603 for decline). Present only when an outbound call was rejected by the SBC. | [optional] |



2 changes: 2 additions & 0 deletions docs/InitiateCallback.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ The Initiate event is fired when an inbound call is received for a Telephone Num
|**diversion** | [**Diversion**](Diversion.md) | | [optional] |
|**stirShaken** | [**StirShaken**](StirShaken.md) | | [optional] |
|**uui** | **String** | The value of the &#x60;User-To-User&#x60; header to send within the initial &#x60;INVITE&#x60;. Must include the encoding parameter as specified in RFC 7433. Only &#x60;base64&#x60;, &#x60;jwt&#x60; and &#x60;hex&#x60; encoding are currently allowed. This value, including the encoding specifier, may not exceed 256 characters. | [optional] |
|**sipCallId** | **String** | (optional) The SIP Call-ID of the call&#39;s current SIP dialog with Bandwidth&#39;s SBC. Used to correlate dialogs and trace calls. Present on any call, inbound or outbound, once that dialog has been established; may be absent very early in a call before the dialog exists. | [optional] |
|**sipHeaders** | **Map&lt;String, String&gt;** | (optional) Map of customer-supplied X-* headers from the original INVITE. Keys are lowercase (SIP headers are case-insensitive). Present only for inbound SIP URI calls with custom headers. Note - keys preserve the original SIP header name in lowercase rather than Bandwidth&#39;s usual camelCase JSON convention, since these are passthrough values from the caller&#39;s SIP INVITE, not Bandwidth-defined fields. If the same header name is sent more than once in the INVITE, only the last value is kept. | [optional] |



35 changes: 32 additions & 3 deletions src/main/java/com/bandwidth/sdk/model/AnswerCallback.java
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,11 @@ public class AnswerCallback {
@javax.annotation.Nullable
private MachineDetectionResult machineDetectionResult;

public static final String SERIALIZED_NAME_SIP_CALL_ID = "sipCallId";
@SerializedName(SERIALIZED_NAME_SIP_CALL_ID)
@javax.annotation.Nullable
private String sipCallId;

public AnswerCallback() {
}

Expand Down Expand Up @@ -395,6 +400,25 @@ public void setMachineDetectionResult(@javax.annotation.Nullable MachineDetectio
this.machineDetectionResult = machineDetectionResult;
}


public AnswerCallback sipCallId(@javax.annotation.Nullable String sipCallId) {
this.sipCallId = sipCallId;
return this;
}

/**
* (optional) The SIP Call-ID of the call&#39;s current SIP dialog with Bandwidth&#39;s SBC. Used to correlate dialogs and trace calls. Present on any call, inbound or outbound, once that dialog has been established; may be absent very early in a call before the dialog exists.
* @return sipCallId
*/
@javax.annotation.Nullable
public String getSipCallId() {
return sipCallId;
}

public void setSipCallId(@javax.annotation.Nullable String sipCallId) {
this.sipCallId = sipCallId;
}

/**
* A container for additional, undeclared properties.
* This is a holder for any undeclared properties as specified with
Expand Down Expand Up @@ -463,7 +487,8 @@ public boolean equals(Object o) {
Objects.equals(this.startTime, answerCallback.startTime) &&
Objects.equals(this.answerTime, answerCallback.answerTime) &&
Objects.equals(this.tag, answerCallback.tag) &&
Objects.equals(this.machineDetectionResult, answerCallback.machineDetectionResult)&&
Objects.equals(this.machineDetectionResult, answerCallback.machineDetectionResult) &&
Objects.equals(this.sipCallId, answerCallback.sipCallId)&&
Objects.equals(this.additionalProperties, answerCallback.additionalProperties);
}

Expand All @@ -473,7 +498,7 @@ private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b)

@Override
public int hashCode() {
return Objects.hash(eventType, eventTime, accountId, applicationId, from, to, direction, callId, callUrl, enqueuedTime, startTime, answerTime, tag, machineDetectionResult, additionalProperties);
return Objects.hash(eventType, eventTime, accountId, applicationId, from, to, direction, callId, callUrl, enqueuedTime, startTime, answerTime, tag, machineDetectionResult, sipCallId, additionalProperties);
}

private static <T> int hashCodeNullable(JsonNullable<T> a) {
Expand Down Expand Up @@ -501,6 +526,7 @@ public String toString() {
sb.append(" answerTime: ").append(toIndentedString(answerTime)).append("\n");
sb.append(" tag: ").append(toIndentedString(tag)).append("\n");
sb.append(" machineDetectionResult: ").append(toIndentedString(machineDetectionResult)).append("\n");
sb.append(" sipCallId: ").append(toIndentedString(sipCallId)).append("\n");
sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
sb.append("}");
return sb.toString();
Expand All @@ -523,7 +549,7 @@ private String toIndentedString(Object o) {

static {
// a set of all properties/fields (JSON key names)
openapiFields = new HashSet<String>(Arrays.asList("eventType", "eventTime", "accountId", "applicationId", "from", "to", "direction", "callId", "callUrl", "enqueuedTime", "startTime", "answerTime", "tag", "machineDetectionResult"));
openapiFields = new HashSet<String>(Arrays.asList("eventType", "eventTime", "accountId", "applicationId", "from", "to", "direction", "callId", "callUrl", "enqueuedTime", "startTime", "answerTime", "tag", "machineDetectionResult", "sipCallId"));

// a set of required properties/fields (JSON key names)
openapiRequiredFields = new HashSet<String>(0);
Expand Down Expand Up @@ -574,6 +600,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
if (jsonObj.get("machineDetectionResult") != null && !jsonObj.get("machineDetectionResult").isJsonNull()) {
MachineDetectionResult.validateJsonElement(jsonObj.get("machineDetectionResult"));
}
if ((jsonObj.get("sipCallId") != null && !jsonObj.get("sipCallId").isJsonNull()) && !jsonObj.get("sipCallId").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `sipCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sipCallId").toString()));
}
}

public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
Expand Down
Loading