From 43f5dace4b47d81f678c88c90ed1de9351cda148 Mon Sep 17 00:00:00 2001 From: DX-Bandwidth Date: Tue, 21 Jul 2026 14:44:07 +0000 Subject: [PATCH 1/2] Generate SDK with OpenAPI Generator Version --- bandwidth.yml | 40 +++++++++++++++++++++++++++++++++++ docs/AnswerCallback.md | 2 ++ docs/DisconnectCallback.md | 4 ++++ docs/InitiateCallback.md | 4 ++++ models/answer-callback.ts | 4 ++++ models/disconnect-callback.ts | 8 +++++++ models/initiate-callback.ts | 8 +++++++ 7 files changed, 70 insertions(+) diff --git a/bandwidth.yml b/bandwidth.yml index 52ceffd..305a40b 100644 --- a/bandwidth.yml +++ b/bandwidth.yml @@ -4568,6 +4568,8 @@ components: $ref: '#/components/schemas/tag1' machineDetectionResult: $ref: '#/components/schemas/machineDetectionResult' + sipCallId: + $ref: '#/components/schemas/sipCallId' bridgeCompleteCallback: type: object description: >- @@ -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: >- @@ -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: >- @@ -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: diff --git a/docs/AnswerCallback.md b/docs/AnswerCallback.md index 4ad5b52..e7aed98 100644 --- a/docs/AnswerCallback.md +++ b/docs/AnswerCallback.md @@ -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 @@ -41,6 +42,7 @@ const instance: AnswerCallback = { answerTime, tag, machineDetectionResult, + sipCallId, }; ``` diff --git a/docs/DisconnectCallback.md b/docs/DisconnectCallback.md index 69bee1c..44beeed 100644 --- a/docs/DisconnectCallback.md +++ b/docs/DisconnectCallback.md @@ -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 @@ -47,6 +49,8 @@ const instance: DisconnectCallback = { errorMessage, errorId, tag, + sipCallId, + sipResponseCode, }; ``` diff --git a/docs/InitiateCallback.md b/docs/InitiateCallback.md index 7a28b4c..cf76fb6 100644 --- a/docs/InitiateCallback.md +++ b/docs/InitiateCallback.md @@ -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 @@ -39,6 +41,8 @@ const instance: InitiateCallback = { diversion, stirShaken, uui, + sipCallId, + sipHeaders, }; ``` diff --git a/models/answer-callback.ts b/models/answer-callback.ts index da67333..136cc9f 100644 --- a/models/answer-callback.ts +++ b/models/answer-callback.ts @@ -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; } diff --git a/models/disconnect-callback.ts b/models/disconnect-callback.ts index 3c2afef..2985ea4 100644 --- a/models/disconnect-callback.ts +++ b/models/disconnect-callback.ts @@ -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; } diff --git a/models/initiate-callback.ts b/models/initiate-callback.ts index 87abcf8..ce61c2d 100644 --- a/models/initiate-callback.ts +++ b/models/initiate-callback.ts @@ -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; }; } From dacab7643dda3b81c4a372f32d666814735abf34 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Wed, 22 Jul 2026 14:59:24 -0400 Subject: [PATCH 2/2] unit tests --- tests/unit/models/answer-callback.test.ts | 2 ++ tests/unit/models/disconnect-callback.test.ts | 4 ++++ tests/unit/models/initiate-callback.test.ts | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/tests/unit/models/answer-callback.test.ts b/tests/unit/models/answer-callback.test.ts index 6c7ab70..5758269 100644 --- a/tests/unit/models/answer-callback.test.ts +++ b/tests/unit/models/answer-callback.test.ts @@ -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'); @@ -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'); }); }); diff --git a/tests/unit/models/disconnect-callback.test.ts b/tests/unit/models/disconnect-callback.test.ts index 6781dda..51a2b8b 100644 --- a/tests/unit/models/disconnect-callback.test.ts +++ b/tests/unit/models/disconnect-callback.test.ts @@ -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'); @@ -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); }); }); diff --git a/tests/unit/models/initiate-callback.test.ts b/tests/unit/models/initiate-callback.test.ts index 3360fe4..6b3d3c1 100644 --- a/tests/unit/models/initiate-callback.test.ts +++ b/tests/unit/models/initiate-callback.test.ts @@ -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'); @@ -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' }); }); });