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
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
2 changes: 2 additions & 0 deletions docs/AnswerCallback.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Name | Type | Description | Notes
**answerTime** | **string** | Time the call was answered, in ISO 8601 format. | [optional] [default to undefined]
**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] [default to undefined]
**machineDetectionResult** | [**MachineDetectionResult**](MachineDetectionResult.md) | | [optional] [default to undefined]
**sipCallId** | **string** | (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. | [optional] [default to undefined]

## Example

Expand All @@ -41,6 +42,7 @@ const instance: AnswerCallback = {
answerTime,
tag,
machineDetectionResult,
sipCallId,
};
```

Expand Down
4 changes: 4 additions & 0 deletions docs/DisconnectCallback.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ Name | Type | Description | Notes
**errorMessage** | **string** | Text explaining the reason that caused the call to fail in case of errors. | [optional] [default to undefined]
**errorId** | **string** | Bandwidth\'s internal id that references the error event. | [optional] [default to undefined]
**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] [default to undefined]
**sipCallId** | **string** | (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. | [optional] [default to undefined]
**sipResponseCode** | **number** | (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. | [optional] [default to undefined]

## Example

Expand All @@ -47,6 +49,8 @@ const instance: DisconnectCallback = {
errorMessage,
errorId,
tag,
sipCallId,
sipResponseCode,
};
```

Expand Down
4 changes: 4 additions & 0 deletions docs/InitiateCallback.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ Name | Type | Description | Notes
**diversion** | [**Diversion**](Diversion.md) | | [optional] [default to undefined]
**stirShaken** | [**StirShaken**](StirShaken.md) | | [optional] [default to undefined]
**uui** | **string** | The value of the `User-To-User` header to send within the initial `INVITE`. Must include the encoding parameter as specified in RFC 7433. Only `base64`, `jwt` and `hex` encoding are currently allowed. This value, including the encoding specifier, may not exceed 256 characters. | [optional] [default to undefined]
**sipCallId** | **string** | (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. | [optional] [default to undefined]
**sipHeaders** | **{ [key: string]: string; }** | (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. | [optional] [default to undefined]

## Example

Expand All @@ -39,6 +41,8 @@ const instance: InitiateCallback = {
diversion,
stirShaken,
uui,
sipCallId,
sipHeaders,
};
```

Expand Down
4 changes: 4 additions & 0 deletions models/answer-callback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ export interface AnswerCallback {
*/
'tag'?: string | null;
'machineDetectionResult'?: MachineDetectionResult | null;
/**
* (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.
*/
'sipCallId'?: string;
}


Expand Down
8 changes: 8 additions & 0 deletions models/disconnect-callback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,14 @@ export interface DisconnectCallback {
* (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present.
*/
'tag'?: string | null;
/**
* (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.
*/
'sipCallId'?: string;
/**
* (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.
*/
'sipResponseCode'?: number;
}


Expand Down
8 changes: 8 additions & 0 deletions models/initiate-callback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@ export interface InitiateCallback {
* The value of the `User-To-User` header to send within the initial `INVITE`. Must include the encoding parameter as specified in RFC 7433. Only `base64`, `jwt` and `hex` encoding are currently allowed. This value, including the encoding specifier, may not exceed 256 characters.
*/
'uui'?: string;
/**
* (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.
*/
'sipCallId'?: string;
/**
* (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.
*/
'sipHeaders'?: { [key: string]: string; };
}


Expand Down
2 changes: 2 additions & 0 deletions tests/unit/models/answer-callback.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ describe('AnswerCallback', () => {
answerTime: 'test-answerTime',
tag: 'test-tag',
machineDetectionResult: {} as unknown as MachineDetectionResult,
sipCallId: 'test-sipCallId',
};

expect(fixture.eventType).toBe('test-eventType');
Expand All @@ -35,5 +36,6 @@ describe('AnswerCallback', () => {
expect(fixture.answerTime).toBe('test-answerTime');
expect(fixture.tag).toBe('test-tag');
expect(fixture.machineDetectionResult).toBeDefined();
expect(fixture.sipCallId).toBe('test-sipCallId');
});
});
4 changes: 4 additions & 0 deletions tests/unit/models/disconnect-callback.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ describe('DisconnectCallback', () => {
errorMessage: 'test-errorMessage',
errorId: 'test-errorId',
tag: 'test-tag',
sipCallId: 'test-sipCallId',
sipResponseCode: 200,
};

expect(fixture.eventType).toBe('test-eventType');
Expand All @@ -40,5 +42,7 @@ describe('DisconnectCallback', () => {
expect(fixture.errorMessage).toBe('test-errorMessage');
expect(fixture.errorId).toBe('test-errorId');
expect(fixture.tag).toBe('test-tag');
expect(fixture.sipCallId).toBe('test-sipCallId');
expect(fixture.sipResponseCode).toBe(200);
});
});
4 changes: 4 additions & 0 deletions tests/unit/models/initiate-callback.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ describe('InitiateCallback', () => {
diversion: {} as unknown as Diversion,
stirShaken: {} as unknown as StirShaken,
uui: 'test-uui',
sipCallId: 'test-sipCallId',
sipHeaders: { 'test-header': 'test-value' },
};

expect(fixture.eventType).toBe('test-eventType');
Expand All @@ -34,5 +36,7 @@ describe('InitiateCallback', () => {
expect(fixture.diversion).toBeDefined();
expect(fixture.stirShaken).toBeDefined();
expect(fixture.uui).toBe('test-uui');
expect(fixture.sipCallId).toBe('test-sipCallId');
expect(fixture.sipHeaders).toEqual({ 'test-header': 'test-value' });
});
});