Skip to content
Open
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
4 changes: 4 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@ docs/RecordingTranscriptions.md
docs/RecordingsApi.md
docs/RedirectCallback.md
docs/RedirectMethodEnum.md
docs/ReferCallStatus.md
docs/ReferCompleteCallback.md
docs/SipConnectionMetadata.md
docs/SipCredentials.md
docs/SmsMessageContent.md
Expand Down Expand Up @@ -385,6 +387,8 @@ models/recording-transcription-metadata.ts
models/recording-transcriptions.ts
models/redirect-callback.ts
models/redirect-method-enum.ts
models/refer-call-status.ts
models/refer-complete-callback.ts
models/sip-connection-metadata.ts
models/sip-credentials.ts
models/sms-message-content.ts
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,8 @@ Class | Method | HTTP request | Description
- [RecordingTranscriptions](docs/RecordingTranscriptions.md)
- [RedirectCallback](docs/RedirectCallback.md)
- [RedirectMethodEnum](docs/RedirectMethodEnum.md)
- [ReferCallStatus](docs/ReferCallStatus.md)
- [ReferCompleteCallback](docs/ReferCompleteCallback.md)
- [SipConnectionMetadata](docs/SipConnectionMetadata.md)
- [SipCredentials](docs/SipCredentials.md)
- [SmsMessageContent](docs/SmsMessageContent.md)
Expand Down
64 changes: 62 additions & 2 deletions bandwidth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5237,6 +5237,66 @@ components:
$ref: '#/components/schemas/errorMessage'
errorId:
$ref: '#/components/schemas/errorId'
referCompleteCallback:
type: object
description: >-
The Refer Complete event is fired when the <Refer> verb finishes
executing. This is sent to the referCompleteUrl specified on the
<Refer> verb, and the BXML returned in it is executed on the call.
properties:
eventType:
$ref: '#/components/schemas/eventType'
eventTime:
$ref: '#/components/schemas/eventTime'
accountId:
$ref: '#/components/schemas/accountId'
applicationId:
$ref: '#/components/schemas/applicationId1'
from:
$ref: '#/components/schemas/from'
to:
$ref: '#/components/schemas/to'
direction:
$ref: '#/components/schemas/callDirectionEnum'
callId:
$ref: '#/components/schemas/callId'
callUrl:
$ref: '#/components/schemas/callUrl'
startTime:
$ref: '#/components/schemas/startTime'
answerTime:
$ref: '#/components/schemas/answerTime'
tag:
$ref: '#/components/schemas/tag1'
referCallStatus:
$ref: '#/components/schemas/referCallStatus'
referSipResponseCode:
$ref: '#/components/schemas/referSipResponseCode'
notifySipResponseCode:
$ref: '#/components/schemas/notifySipResponseCode'
referCallStatus:
type: string
description: >-
The outcome of the REFER attempt. Possible values are success or
failure.
enum:
- success
- failure
example: success
referSipResponseCode:
type: integer
nullable: true
description: >-
The SIP response code received for the REFER request (e.g. 202, 405,
603). Absent when not applicable.
example: 202
notifySipResponseCode:
type: integer
nullable: true
description: >-
The SIP response code received in the NOTIFY message (e.g. 200, 404,
486). Absent on REFER rejection or NOTIFY timeout.
example: 200
eventType:
type: string
description: >-
Expand All @@ -5245,8 +5305,8 @@ components:
conferenceRedirect, conferenceMemberJoin, conferenceMemberExit,
conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf,
gather, initiate, machineDetectionComplete, recordingComplete,
recordingAvailable, redirect, transcriptionAvailable, transferAnswer,
transferComplete, transferDisconnect.
recordingAvailable, redirect, referComplete, transcriptionAvailable,
transferAnswer, transferComplete, transferDisconnect.
example: bridgeComplete
eventTime:
type: string
Expand Down
11 changes: 11 additions & 0 deletions docs/ReferCallStatus.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# ReferCallStatus

The outcome of the REFER attempt. Possible values are success or failure.

## Enum

* `Success` (value: `'success'`)

* `Failure` (value: `'failure'`)

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
49 changes: 49 additions & 0 deletions docs/ReferCompleteCallback.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# ReferCompleteCallback

The Refer Complete event is fired when the <Refer> verb finishes executing. This is sent to the referCompleteUrl specified on the <Refer> verb, and the BXML returned in it is executed on the call.

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**eventType** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] [default to undefined]
**eventTime** | **string** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] [default to undefined]
**accountId** | **string** | The user account associated with the call. | [optional] [default to undefined]
**applicationId** | **string** | The id of the application associated with the call. | [optional] [default to undefined]
**from** | **string** | The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). | [optional] [default to undefined]
**to** | **string** | The phone number that received the call, in E.164 format (e.g. +15555555555). | [optional] [default to undefined]
**direction** | [**CallDirectionEnum**](CallDirectionEnum.md) | | [optional] [default to undefined]
**callId** | **string** | The call id associated with the event. | [optional] [default to undefined]
**callUrl** | **string** | The URL of the call associated with the event. | [optional] [default to undefined]
**startTime** | **string** | Time the call was started, in ISO 8601 format. | [optional] [default to undefined]
**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]
**referCallStatus** | [**ReferCallStatus**](ReferCallStatus.md) | | [optional] [default to undefined]
**referSipResponseCode** | **number** | The SIP response code received for the REFER request (e.g. 202, 405, 603). Absent when not applicable. | [optional] [default to undefined]
**notifySipResponseCode** | **number** | The SIP response code received in the NOTIFY message (e.g. 200, 404, 486). Absent on REFER rejection or NOTIFY timeout. | [optional] [default to undefined]

## Example

```typescript
import { ReferCompleteCallback } from 'bandwidth-sdk';

const instance: ReferCompleteCallback = {
eventType,
eventTime,
accountId,
applicationId,
from,
to,
direction,
callId,
callUrl,
startTime,
answerTime,
tag,
referCallStatus,
referSipResponseCode,
notifySipResponseCode,
};
```

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
38 changes: 38 additions & 0 deletions models/bxml/verbs/Refer.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import { NestableVerb } from '../NestableVerb';
import { ReferSipUri } from './ReferSipUri';

export interface ReferAttributes {
referCompleteUrl?: string;
referCompleteMethod?: string;
tag?: string;
}

/**
* @export
* @class Refer
* @extends {NestableVerb}
* Represents a Refer BXML verb.
* NOTE: On success the call is terminated — the remote SIP endpoint redirects away from Bandwidth.
* Recovery BXML in referCompleteUrl only makes sense for failure handling.
*/
export class Refer extends NestableVerb {
attributes: ReferAttributes;

/**
* Creates an instance of Refer
* @param {ReferSipUri} sipUri The SipUri child element (required — spec mandates exactly one)
* @param {ReferAttributes} attributes The attributes to add to the element
*/
constructor(sipUri: ReferSipUri, attributes?: ReferAttributes) {
super('Refer', undefined, attributes, [sipUri]);
}

/**
* Set the SipUri for this Refer verb
* @param {ReferSipUri} sipUri The SipUri to refer to
*/
setSipUri(sipUri: ReferSipUri): void {
// Replaces the single required SipUri child — <Refer> allows exactly one.
this.nestedVerbs = [sipUri];
Comment thread
s-aher marked this conversation as resolved.
}
}
22 changes: 22 additions & 0 deletions models/bxml/verbs/ReferSipUri.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { Verb } from '../Verb';

/**
* @export
* @class ReferSipUri
* @extends {Verb}
* Represents a SipUri child element scoped to the Refer verb.
* Unlike the Transfer-scoped SipUri, this accepts only a URI — no
* transferAnswerUrl, uui, username/password, or other Transfer attributes.
*/
export class ReferSipUri extends Verb {
uri: string;

/**
* Creates an instance of ReferSipUri
* @param {string} uri The SIP URI to refer to (must start with sip:)
*/
constructor(uri: string) {
super('SipUri', uri);
}
}

2 changes: 2 additions & 0 deletions models/bxml/verbs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ export * from './PhoneNumber';
export * from './PlayAudio';
export * from './Record';
export * from './Redirect';
export * from './Refer';
export * from './ReferSipUri';
export * from './ResumeRecording';
export * from './Ring';
export * from './SendDtmf';
Expand Down
2 changes: 2 additions & 0 deletions models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ export * from './recording-transcription-metadata';
export * from './recording-transcriptions';
export * from './redirect-callback';
export * from './redirect-method-enum';
export * from './refer-call-status';
export * from './refer-complete-callback';
export * from './sip-connection-metadata';
export * from './sip-credentials';
export * from './sms-message-content';
Expand Down
29 changes: 29 additions & 0 deletions models/refer-call-status.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/* tslint:disable */
/* eslint-disable */
/**
* 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.
*/



/**
* The outcome of the REFER attempt. Possible values are success or failure.
*/

export const ReferCallStatus = {
Success: 'success',
Failure: 'failure'
} as const;

export type ReferCallStatus = typeof ReferCallStatus[keyof typeof ReferCallStatus];



84 changes: 84 additions & 0 deletions models/refer-complete-callback.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
/* tslint:disable */
/* eslint-disable */
/**
* 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.
*/


// May contain unused imports in some cases
// @ts-ignore
import type { CallDirectionEnum } from './call-direction-enum';
// May contain unused imports in some cases
// @ts-ignore
import type { ReferCallStatus } from './refer-call-status';

/**
* The Refer Complete event is fired when the <Refer> verb finishes executing. This is sent to the referCompleteUrl specified on the <Refer> verb, and the BXML returned in it is executed on the call.
*/
export interface ReferCompleteCallback {
/**
* The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect.
*/
'eventType'?: string;
/**
* The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution.
*/
'eventTime'?: string;
/**
* The user account associated with the call.
*/
'accountId'?: string;
/**
* The id of the application associated with the call.
*/
'applicationId'?: string;
/**
* The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555).
*/
'from'?: string;
/**
* The phone number that received the call, in E.164 format (e.g. +15555555555).
*/
'to'?: string;
'direction'?: CallDirectionEnum;
/**
* The call id associated with the event.
*/
'callId'?: string;
/**
* The URL of the call associated with the event.
*/
'callUrl'?: string;
/**
* Time the call was started, in ISO 8601 format.
*/
'startTime'?: string;
/**
* Time the call was answered, in ISO 8601 format.
*/
'answerTime'?: string | null;
/**
* (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;
'referCallStatus'?: ReferCallStatus;
/**
* The SIP response code received for the REFER request (e.g. 202, 405, 603). Absent when not applicable.
*/
'referSipResponseCode'?: number | null;
/**
* The SIP response code received in the NOTIFY message (e.g. 200, 404, 486). Absent on REFER rejection or NOTIFY timeout.
*/
'notifySipResponseCode'?: number | null;
}



Loading