diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 0da4f8c5..a20a8358 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -168,6 +168,7 @@ docs/RecordingTranscriptions.md docs/RecordingsApi.md docs/RedirectCallback.md docs/RedirectMethodEnum.md +docs/ReferCompleteCallback.md docs/SipConnectionMetadata.md docs/SipCredentials.md docs/SmsMessageContent.md @@ -411,6 +412,7 @@ src/main/java/com/bandwidth/sdk/model/RecordingTranscriptionMetadata.java src/main/java/com/bandwidth/sdk/model/RecordingTranscriptions.java src/main/java/com/bandwidth/sdk/model/RedirectCallback.java src/main/java/com/bandwidth/sdk/model/RedirectMethodEnum.java +src/main/java/com/bandwidth/sdk/model/ReferCompleteCallback.java src/main/java/com/bandwidth/sdk/model/SipConnectionMetadata.java src/main/java/com/bandwidth/sdk/model/SipCredentials.java src/main/java/com/bandwidth/sdk/model/SmsMessageContent.java diff --git a/README.md b/README.md index 0f80d7dc..f9b3e855 100644 --- a/README.md +++ b/README.md @@ -344,6 +344,7 @@ Class | Method | HTTP request | Description - [RecordingTranscriptions](docs/RecordingTranscriptions.md) - [RedirectCallback](docs/RedirectCallback.md) - [RedirectMethodEnum](docs/RedirectMethodEnum.md) + - [ReferCompleteCallback](docs/ReferCompleteCallback.md) - [SipConnectionMetadata](docs/SipConnectionMetadata.md) - [SipCredentials](docs/SipCredentials.md) - [SmsMessageContent](docs/SmsMessageContent.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index cafcd1e3..2ac84393 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -12225,8 +12225,8 @@ components: \ bridgeComplete, bridgeTargetComplete, conferenceCreated, 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 type: string eventTime: @@ -12304,8 +12304,8 @@ components: \ bridgeComplete, bridgeTargetComplete, conferenceCreated, 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 type: string eventTime: @@ -12398,8 +12398,8 @@ components: \ bridgeComplete, bridgeTargetComplete, conferenceCreated, 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 type: string eventTime: @@ -12477,8 +12477,8 @@ components: \ bridgeComplete, bridgeTargetComplete, conferenceCreated, 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 type: string eventTime: @@ -12519,8 +12519,8 @@ components: \ bridgeComplete, bridgeTargetComplete, conferenceCreated, 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 type: string eventTime: @@ -12560,8 +12560,8 @@ components: \ bridgeComplete, bridgeTargetComplete, conferenceCreated, 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 type: string eventTime: @@ -12615,8 +12615,8 @@ components: \ bridgeComplete, bridgeTargetComplete, conferenceCreated, 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 type: string eventTime: @@ -12665,8 +12665,8 @@ components: \ bridgeComplete, bridgeTargetComplete, conferenceCreated, 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 type: string eventTime: @@ -12702,8 +12702,8 @@ components: \ bridgeComplete, bridgeTargetComplete, conferenceCreated, 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 type: string eventTime: @@ -12783,8 +12783,8 @@ components: \ bridgeComplete, bridgeTargetComplete, conferenceCreated, 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 type: string eventTime: @@ -12880,8 +12880,8 @@ components: \ bridgeComplete, bridgeTargetComplete, conferenceCreated, 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 type: string eventTime: @@ -12974,8 +12974,8 @@ components: \ bridgeComplete, bridgeTargetComplete, conferenceCreated, 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 type: string eventTime: @@ -13077,8 +13077,8 @@ components: \ bridgeComplete, bridgeTargetComplete, conferenceCreated, 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 type: string eventTime: @@ -13146,8 +13146,8 @@ components: \ bridgeComplete, bridgeTargetComplete, conferenceCreated, 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 type: string eventTime: @@ -13224,8 +13224,8 @@ components: \ bridgeComplete, bridgeTargetComplete, conferenceCreated, 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 type: string eventTime: @@ -13342,8 +13342,8 @@ components: \ bridgeComplete, bridgeTargetComplete, conferenceCreated, 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 type: string eventTime: @@ -13463,8 +13463,8 @@ components: \ bridgeComplete, bridgeTargetComplete, conferenceCreated, 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 type: string eventTime: @@ -13553,8 +13553,8 @@ components: \ bridgeComplete, bridgeTargetComplete, conferenceCreated, 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 type: string eventTime: @@ -13666,8 +13666,8 @@ components: \ bridgeComplete, bridgeTargetComplete, conferenceCreated, 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 type: string eventTime: @@ -13742,19 +13742,17 @@ components: type: string type: object transferCompleteCallback: - description: "This event is sent to the transferCompleteUrl of the A-leg's \ - \ verb when the transferred call (B-leg) completes. In a simultaneous ringing\ - \ scenario, only one B-leg succeeds and this event corresponds to that successful\ - \ leg. If none of the calls were answered, the transferComplete event corresponds\ - \ to one of the legs." + description: "The Refer Complete event is fired when the verb finishes\ + \ executing. This is sent to the referCompleteUrl specified on the \ + \ verb, and the BXML returned in it is executed on the call." properties: eventType: description: "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, transcriptionAvailable, transferAnswer,\ - \ transferComplete, transferDisconnect." + \ recordingAvailable, redirect, referComplete, transcriptionAvailable,\ + \ transferAnswer, transferComplete, transferDisconnect." example: bridgeComplete type: string eventTime: @@ -13846,6 +13844,119 @@ components: nullable: true type: string type: object + referCompleteCallback: + description: "The Refer Complete event is sent to the referCompleteUrl of the\ + \ verb when the SIP REFER operation completes. Note the success-semantics\ + \ asymmetry: unlike Transfer where success means the call continues, a successful\ + \ Refer means the remote endpoint has been redirected away and the call is\ + \ terminated. The BXML returned by this callback is executed on the call only\ + \ for failure recovery." + properties: + eventType: + description: "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." + example: bridgeComplete + type: string + eventTime: + description: "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." + example: 2022-06-17T22:19:40.375Z + format: date-time + type: string + accountId: + description: The user account associated with the call. + example: "9900000" + type: string + applicationId: + description: The id of the application associated with the call. + example: 04e88489-df02-4e34-a0ee-27a91849555f + type: string + from: + description: The provided identifier of the caller. Must be a phone number + in E.164 format (e.g. +15555555555). + example: "+15555555555" + type: string + to: + description: "The phone number that received the call, in E.164 format (e.g.\ + \ +15555555555)." + example: "+15555555555" + type: string + direction: + $ref: "#/components/schemas/callDirectionEnum" + callId: + description: The call id associated with the event. + example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + type: string + callUrl: + description: The URL of the call associated with the event. + example: https://voice.bandwidth.com/api/v2/accounts/9900000/calls/c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + format: uri + type: string + enqueuedTime: + description: "(optional) If call queueing is enabled and this is an outbound\ + \ call, time the call was queued, in ISO 8601 format." + example: 2022-06-17T22:20:00Z + format: date-time + nullable: true + type: string + startTime: + description: "Time the call was started, in ISO 8601 format." + example: 2022-06-17T22:19:40.375Z + format: date-time + type: string + answerTime: + description: "Time the call was answered, in ISO 8601 format." + example: 2022-06-17T22:20:00Z + format: date-time + nullable: true + type: string + tag: + description: "(optional) The tag specified on call creation. If no tag was\ + \ specified or it was previously cleared, this field will not be present." + example: exampleTag + nullable: true + type: string + referCallStatus: + description: The outcome of the SIP REFER attempt. Possible values include + 'success' and 'failure'. On success the call is terminated; on failure + the BXML returned by this callback is executed for recovery. + example: failure + type: string + referSipResponseCode: + description: "The SIP response code received from the remote endpoint in\ + \ response to the REFER request itself (e.g., 202 Accepted, 603 Declined)." + example: 202 + type: integer + notifySipResponseCode: + description: "The SIP response code received in the NOTIFY message that\ + \ reports the final status of the referred call (e.g., 200 OK if the refer\ + \ target answered, 486 Busy Here if it did not)." + example: 200 + type: integer + cause: + description: "Reason the call failed - hangup, busy, timeout, cancel, rejected,\ + \ callback-error, invalid-bxml, application-error, account-limit, node-capacity-exceeded,\ + \ error, or unknown." + example: busy + type: string + errorMessage: + description: Text explaining the reason that caused the call to fail in + case of errors. + example: Call c-2a913f94-6a486f3a-3cae-4034-bcc3-f0c9fa77ca2f is already + bridged with another call + nullable: true + type: string + errorId: + description: Bandwidth's internal id that references the error event. + example: 4642074b-7b58-478b-96e4-3a60955c6765 + nullable: true + type: string + type: object transferDisconnectCallback: description: "This event is sent to the transferDisconnectUrl of each \ \ tag when its respective call leg ends for any reason. The event is sent\ @@ -13859,8 +13970,8 @@ components: \ bridgeComplete, bridgeTargetComplete, conferenceCreated, 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 type: string eventTime: @@ -13968,8 +14079,8 @@ components: \ bridgeTargetComplete, conferenceCreated, 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 type: string eventTime: diff --git a/bandwidth.yml b/bandwidth.yml index 5927a5e8..bea25c10 100644 --- a/bandwidth.yml +++ b/bandwidth.yml @@ -5139,11 +5139,9 @@ components: transferCompleteCallback: type: object description: >- - This event is sent to the transferCompleteUrl of the A-leg's - verb when the transferred call (B-leg) completes. In a simultaneous - ringing scenario, only one B-leg succeeds and this event corresponds to - that successful leg. If none of the calls were answered, the - transferComplete event corresponds to one of the legs. + The Refer Complete event is fired when the verb finishes + executing. This is sent to the referCompleteUrl specified on the + verb, and the BXML returned in it is executed on the call. properties: eventType: $ref: '#/components/schemas/eventType' @@ -5181,6 +5179,68 @@ components: $ref: '#/components/schemas/errorMessage' errorId: $ref: '#/components/schemas/errorId' + referCompleteCallback: + type: object + description: >- + The Refer Complete event is sent to the referCompleteUrl of the + verb when the SIP REFER operation completes. Note the success-semantics + asymmetry: unlike Transfer where success means the call continues, a + successful Refer means the remote endpoint has been redirected away and + the call is terminated. The BXML returned by this callback is executed + on the call only for failure recovery. + 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' + enqueuedTime: + $ref: '#/components/schemas/enqueuedTime' + startTime: + $ref: '#/components/schemas/startTime' + answerTime: + $ref: '#/components/schemas/answerTime' + tag: + $ref: '#/components/schemas/tag1' + referCallStatus: + type: string + description: >- + The outcome of the SIP REFER attempt. Possible values include + 'success' and 'failure'. On success the call is terminated; on + failure the BXML returned by this callback is executed for recovery. + example: failure + referSipResponseCode: + type: integer + description: >- + The SIP response code received from the remote endpoint in response + to the REFER request itself (e.g., 202 Accepted, 603 Declined). + example: 202 + notifySipResponseCode: + type: integer + description: >- + The SIP response code received in the NOTIFY message that reports + the final status of the referred call (e.g., 200 OK if the refer + target answered, 486 Busy Here if it did not). + example: 200 + cause: + $ref: '#/components/schemas/cause' + errorMessage: + $ref: '#/components/schemas/errorMessage' + errorId: + $ref: '#/components/schemas/errorId' transferDisconnectCallback: type: object description: >- @@ -5239,8 +5299,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 diff --git a/docs/AnswerCallback.md b/docs/AnswerCallback.md index 1db1cdcd..2ce938c6 100644 --- a/docs/AnswerCallback.md +++ b/docs/AnswerCallback.md @@ -8,7 +8,7 @@ The Answer event is sent to the answerUrl specified in the createCall request wh | 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, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] | +|**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] | |**eventTime** | **OffsetDateTime** | 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] | |**accountId** | **String** | The user account associated with the call. | [optional] | |**applicationId** | **String** | The id of the application associated with the call. | [optional] | diff --git a/docs/BridgeCompleteCallback.md b/docs/BridgeCompleteCallback.md index ee9d956f..b8c20468 100644 --- a/docs/BridgeCompleteCallback.md +++ b/docs/BridgeCompleteCallback.md @@ -8,7 +8,7 @@ If the target call leaves the , then this callback is sent to the bridge | 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, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] | +|**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] | |**eventTime** | **OffsetDateTime** | 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] | |**accountId** | **String** | The user account associated with the call. | [optional] | |**applicationId** | **String** | The id of the application associated with the call. | [optional] | diff --git a/docs/BridgeTargetCompleteCallback.md b/docs/BridgeTargetCompleteCallback.md index c23f465c..770f78f5 100644 --- a/docs/BridgeTargetCompleteCallback.md +++ b/docs/BridgeTargetCompleteCallback.md @@ -8,7 +8,7 @@ If the originating call leaves the , then this callback is sent to the b | 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, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] | +|**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] | |**eventTime** | **OffsetDateTime** | 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] | |**accountId** | **String** | The user account associated with the call. | [optional] | |**applicationId** | **String** | The id of the application associated with the call. | [optional] | diff --git a/docs/ConferenceCompletedCallback.md b/docs/ConferenceCompletedCallback.md index 6840355c..765f93e0 100644 --- a/docs/ConferenceCompletedCallback.md +++ b/docs/ConferenceCompletedCallback.md @@ -8,7 +8,7 @@ The Conference Completed event is fired when the last member leaves the conferen | 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, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] | +|**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] | |**eventTime** | **OffsetDateTime** | 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] | |**conferenceId** | **String** | The unique, Bandwidth-generated ID of the conference that was recorded | [optional] | |**name** | **String** | The user-specified name of the conference that was recorded | [optional] | diff --git a/docs/ConferenceCreatedCallback.md b/docs/ConferenceCreatedCallback.md index 8f1196a0..0b777cd1 100644 --- a/docs/ConferenceCreatedCallback.md +++ b/docs/ConferenceCreatedCallback.md @@ -8,7 +8,7 @@ The Conference Created event is fired whenever a new conference that specified a | 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, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] | +|**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] | |**eventTime** | **OffsetDateTime** | 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] | |**conferenceId** | **String** | The unique, Bandwidth-generated ID of the conference that was recorded | [optional] | |**name** | **String** | The user-specified name of the conference that was recorded | [optional] | diff --git a/docs/ConferenceMemberExitCallback.md b/docs/ConferenceMemberExitCallback.md index 1a912f28..c089e576 100644 --- a/docs/ConferenceMemberExitCallback.md +++ b/docs/ConferenceMemberExitCallback.md @@ -8,7 +8,7 @@ The Conference Member Exit event is fired whenever a caller exits a conference t | 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, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] | +|**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] | |**eventTime** | **OffsetDateTime** | 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] | |**conferenceId** | **String** | The unique, Bandwidth-generated ID of the conference that was recorded | [optional] | |**name** | **String** | The user-specified name of the conference that was recorded | [optional] | diff --git a/docs/ConferenceMemberJoinCallback.md b/docs/ConferenceMemberJoinCallback.md index c8dec63d..aca57b71 100644 --- a/docs/ConferenceMemberJoinCallback.md +++ b/docs/ConferenceMemberJoinCallback.md @@ -8,7 +8,7 @@ The Conference Member Join event is fired whenever a caller joins a conference t | 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, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] | +|**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] | |**eventTime** | **OffsetDateTime** | 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] | |**conferenceId** | **String** | The unique, Bandwidth-generated ID of the conference that was recorded | [optional] | |**name** | **String** | The user-specified name of the conference that was recorded | [optional] | diff --git a/docs/ConferenceRecordingAvailableCallback.md b/docs/ConferenceRecordingAvailableCallback.md index 41a8f825..9d5c3f86 100644 --- a/docs/ConferenceRecordingAvailableCallback.md +++ b/docs/ConferenceRecordingAvailableCallback.md @@ -8,7 +8,7 @@ The Conference Recording Available event is sent after a conference recording ha | 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, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] | +|**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] | |**eventTime** | **OffsetDateTime** | 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] | |**conferenceId** | **String** | The unique, Bandwidth-generated ID of the conference that was recorded | [optional] | |**name** | **String** | The user-specified name of the conference that was recorded | [optional] | diff --git a/docs/ConferenceRedirectCallback.md b/docs/ConferenceRedirectCallback.md index 5dde9a89..ea1b18d1 100644 --- a/docs/ConferenceRedirectCallback.md +++ b/docs/ConferenceRedirectCallback.md @@ -8,7 +8,7 @@ The Conference Redirect event is fired whenever an existing conference is modifi | 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, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] | +|**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] | |**eventTime** | **OffsetDateTime** | 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] | |**conferenceId** | **String** | The unique, Bandwidth-generated ID of the conference that was recorded | [optional] | |**name** | **String** | The user-specified name of the conference that was recorded | [optional] | diff --git a/docs/DisconnectCallback.md b/docs/DisconnectCallback.md index d2fd7545..e2ef6c92 100644 --- a/docs/DisconnectCallback.md +++ b/docs/DisconnectCallback.md @@ -8,7 +8,7 @@ The Disconnect event is fired when a call ends, for any reason. | 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, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] | +|**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] | |**eventTime** | **OffsetDateTime** | 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] | |**accountId** | **String** | The user account associated with the call. | [optional] | |**applicationId** | **String** | The id of the application associated with the call. | [optional] | diff --git a/docs/DtmfCallback.md b/docs/DtmfCallback.md index 9f280db9..593adcc7 100644 --- a/docs/DtmfCallback.md +++ b/docs/DtmfCallback.md @@ -8,7 +8,7 @@ The DTMF event is sent for every digit detected after a verb is ex | 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, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] | +|**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] | |**eventTime** | **OffsetDateTime** | 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] | |**accountId** | **String** | The user account associated with the call. | [optional] | |**applicationId** | **String** | The id of the application associated with the call. | [optional] | diff --git a/docs/GatherCallback.md b/docs/GatherCallback.md index e3ef7da8..20977640 100644 --- a/docs/GatherCallback.md +++ b/docs/GatherCallback.md @@ -8,7 +8,7 @@ The gather event is sent after a verb is executed. Its purpose is to re | 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, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] | +|**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] | |**eventTime** | **OffsetDateTime** | 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] | |**accountId** | **String** | The user account associated with the call. | [optional] | |**applicationId** | **String** | The id of the application associated with the call. | [optional] | diff --git a/docs/InitiateCallback.md b/docs/InitiateCallback.md index 9a841ae8..c230fcc2 100644 --- a/docs/InitiateCallback.md +++ b/docs/InitiateCallback.md @@ -8,7 +8,7 @@ The Initiate event is fired when an inbound call is received for a Telephone Num | 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, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] | +|**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] | |**eventTime** | **OffsetDateTime** | 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] | |**accountId** | **String** | The user account associated with the call. | [optional] | |**applicationId** | **String** | The id of the application associated with the call. | [optional] | diff --git a/docs/MachineDetectionCompleteCallback.md b/docs/MachineDetectionCompleteCallback.md index 9a369e53..e828d1f8 100644 --- a/docs/MachineDetectionCompleteCallback.md +++ b/docs/MachineDetectionCompleteCallback.md @@ -8,7 +8,7 @@ This event is sent to the url informed when requesting a machine detection opera | 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, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] | +|**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] | |**eventTime** | **OffsetDateTime** | 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] | |**accountId** | **String** | The user account associated with the call. | [optional] | |**applicationId** | **String** | The id of the application associated with the call. | [optional] | diff --git a/docs/RecordingAvailableCallback.md b/docs/RecordingAvailableCallback.md index 90d6410d..06b7a2cb 100644 --- a/docs/RecordingAvailableCallback.md +++ b/docs/RecordingAvailableCallback.md @@ -8,7 +8,7 @@ The Recording Available event is sent after a recording has been processed. It i | 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, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] | +|**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] | |**eventTime** | **OffsetDateTime** | 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] | |**accountId** | **String** | The user account associated with the call. | [optional] | |**applicationId** | **String** | The id of the application associated with the call. | [optional] | diff --git a/docs/RecordingCompleteCallback.md b/docs/RecordingCompleteCallback.md index 17814da7..07449f25 100644 --- a/docs/RecordingCompleteCallback.md +++ b/docs/RecordingCompleteCallback.md @@ -8,7 +8,7 @@ The Record Complete event is sent after a verb has executed if the call | 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, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] | +|**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] | |**eventTime** | **OffsetDateTime** | 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] | |**accountId** | **String** | The user account associated with the call. | [optional] | |**applicationId** | **String** | The id of the application associated with the call. | [optional] | diff --git a/docs/RedirectCallback.md b/docs/RedirectCallback.md index 597a44ab..18f40276 100644 --- a/docs/RedirectCallback.md +++ b/docs/RedirectCallback.md @@ -8,7 +8,7 @@ The Redirect event is fired when a verb is executed. Its purpose is t | 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, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] | +|**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] | |**eventTime** | **OffsetDateTime** | 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] | |**accountId** | **String** | The user account associated with the call. | [optional] | |**applicationId** | **String** | The id of the application associated with the call. | [optional] | diff --git a/docs/Refer.md b/docs/Refer.md new file mode 100644 index 00000000..70233600 --- /dev/null +++ b/docs/Refer.md @@ -0,0 +1,22 @@ +# Refer + +The BXML verb initiates a SIP REFER on an existing inbound SIP URI call, instructing the remote SIP endpoint to contact a third party directly. On success the call is terminated — the remote endpoint redirects away from Bandwidth entirely. On failure, BXML returned from referCompleteUrl can be used for recovery. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**sipUri** | **SipUri** | The SIP URI to refer the call to. Must start with sip:. | required | +|**referCompleteUrl** | **URI** | URL to send the Refer Complete event to and request new BXML for failure recovery. May be a relative URL. | [optional] | +|**referCompleteMethod** | **String** | The HTTP method to use for the request to referCompleteUrl. GET or POST. Default value is POST. | [optional] | +|**referCompleteFallbackUrl** | **URI** | A fallback url which, if provided, will be used to retry the Refer Complete callback delivery in case referCompleteUrl fails to respond. | [optional] | +|**referCompleteFallbackMethod** | **String** | The HTTP method to use to deliver the Refer Complete callback to referCompleteFallbackUrl. GET or POST. Default value is POST. | [optional] | +|**username** | **String** | The username to send in the HTTP request to referCompleteUrl. | [optional] | +|**password** | **String** | The password to send in the HTTP request to referCompleteUrl. | [optional] | +|**fallbackUsername** | **String** | The username to send in the HTTP request to referCompleteFallbackUrl. | [optional] | +|**fallbackPassword** | **String** | The password to send in the HTTP request to referCompleteFallbackUrl. | [optional] | +|**tag** | **String** | A custom string that will be sent with these and all future callbacks unless overwritten by a future tag attribute or cleared. May be cleared by setting tag="". Max length 256 characters. | [optional] | + + + + diff --git a/docs/TranscriptionAvailableCallback.md b/docs/TranscriptionAvailableCallback.md index 0ec482e7..65bfcce5 100644 --- a/docs/TranscriptionAvailableCallback.md +++ b/docs/TranscriptionAvailableCallback.md @@ -8,7 +8,7 @@ The Transcription Available event is sent when the recording transcription is av | 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, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] | +|**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] | |**eventTime** | **OffsetDateTime** | 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] | |**accountId** | **String** | The user account associated with the call. | [optional] | |**applicationId** | **String** | The id of the application associated with the call. | [optional] | diff --git a/docs/TransferAnswerCallback.md b/docs/TransferAnswerCallback.md index d350b98f..22902e58 100644 --- a/docs/TransferAnswerCallback.md +++ b/docs/TransferAnswerCallback.md @@ -8,7 +8,7 @@ When processing a verb, this event is sent when a called party (B-leg | 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, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] | +|**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] | |**eventTime** | **OffsetDateTime** | 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] | |**accountId** | **String** | The user account associated with the call. | [optional] | |**applicationId** | **String** | The id of the application associated with the call. | [optional] | diff --git a/docs/TransferCompleteCallback.md b/docs/TransferCompleteCallback.md index d2dd0202..ef725883 100644 --- a/docs/TransferCompleteCallback.md +++ b/docs/TransferCompleteCallback.md @@ -2,13 +2,13 @@ # TransferCompleteCallback -This event is sent to the transferCompleteUrl of the A-leg's verb when the transferred call (B-leg) completes. In a simultaneous ringing scenario, only one B-leg succeeds and this event corresponds to that successful leg. If none of the calls were answered, the transferComplete event corresponds to one of the legs. +The Refer Complete event is fired when the verb finishes executing. This is sent to the referCompleteUrl specified on the 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, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] | +|**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] | |**eventTime** | **OffsetDateTime** | 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] | |**accountId** | **String** | The user account associated with the call. | [optional] | |**applicationId** | **String** | The id of the application associated with the call. | [optional] | diff --git a/docs/TransferDisconnectCallback.md b/docs/TransferDisconnectCallback.md index cc52e159..3622add6 100644 --- a/docs/TransferDisconnectCallback.md +++ b/docs/TransferDisconnectCallback.md @@ -8,7 +8,7 @@ This event is sent to the transferDisconnectUrl of each tag when i | 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, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] | +|**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] | |**eventTime** | **OffsetDateTime** | 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] | |**accountId** | **String** | The user account associated with the call. | [optional] | |**applicationId** | **String** | The id of the application associated with the call. | [optional] | diff --git a/src/main/java/com/bandwidth/sdk/JSON.java b/src/main/java/com/bandwidth/sdk/JSON.java index f2a30beb..c2311737 100644 --- a/src/main/java/com/bandwidth/sdk/JSON.java +++ b/src/main/java/com/bandwidth/sdk/JSON.java @@ -273,6 +273,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.RecordingTranscriptionMetadata.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.RecordingTranscriptions.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.RedirectCallback.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.ReferCompleteCallback.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.SipConnectionMetadata.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.SipCredentials.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.SmsMessageContent.CustomTypeAdapterFactory()); diff --git a/src/main/java/com/bandwidth/sdk/model/AnswerCallback.java b/src/main/java/com/bandwidth/sdk/model/AnswerCallback.java index 15b47454..f1d58527 100644 --- a/src/main/java/com/bandwidth/sdk/model/AnswerCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/AnswerCallback.java @@ -136,7 +136,7 @@ public AnswerCallback eventType(@javax.annotation.Nullable String eventType) { } /** - * 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, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * 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. * @return eventType */ @javax.annotation.Nullable diff --git a/src/main/java/com/bandwidth/sdk/model/BridgeCompleteCallback.java b/src/main/java/com/bandwidth/sdk/model/BridgeCompleteCallback.java index c8e2bad1..54682e8c 100644 --- a/src/main/java/com/bandwidth/sdk/model/BridgeCompleteCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/BridgeCompleteCallback.java @@ -145,7 +145,7 @@ public BridgeCompleteCallback eventType(@javax.annotation.Nullable String eventT } /** - * 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, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * 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. * @return eventType */ @javax.annotation.Nullable diff --git a/src/main/java/com/bandwidth/sdk/model/BridgeTargetCompleteCallback.java b/src/main/java/com/bandwidth/sdk/model/BridgeTargetCompleteCallback.java index cfb25513..f70aca7e 100644 --- a/src/main/java/com/bandwidth/sdk/model/BridgeTargetCompleteCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/BridgeTargetCompleteCallback.java @@ -130,7 +130,7 @@ public BridgeTargetCompleteCallback eventType(@javax.annotation.Nullable 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, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * 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. * @return eventType */ @javax.annotation.Nullable diff --git a/src/main/java/com/bandwidth/sdk/model/ConferenceCompletedCallback.java b/src/main/java/com/bandwidth/sdk/model/ConferenceCompletedCallback.java index 64f72b42..f259bae7 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceCompletedCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceCompletedCallback.java @@ -88,7 +88,7 @@ public ConferenceCompletedCallback eventType(@javax.annotation.Nullable String e } /** - * 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, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * 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. * @return eventType */ @javax.annotation.Nullable diff --git a/src/main/java/com/bandwidth/sdk/model/ConferenceCreatedCallback.java b/src/main/java/com/bandwidth/sdk/model/ConferenceCreatedCallback.java index 3635dbca..a7ba8363 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceCreatedCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceCreatedCallback.java @@ -88,7 +88,7 @@ public ConferenceCreatedCallback eventType(@javax.annotation.Nullable String eve } /** - * 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, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * 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. * @return eventType */ @javax.annotation.Nullable diff --git a/src/main/java/com/bandwidth/sdk/model/ConferenceMemberExitCallback.java b/src/main/java/com/bandwidth/sdk/model/ConferenceMemberExitCallback.java index 6478cf56..62a431fd 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceMemberExitCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceMemberExitCallback.java @@ -103,7 +103,7 @@ public ConferenceMemberExitCallback eventType(@javax.annotation.Nullable 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, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * 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. * @return eventType */ @javax.annotation.Nullable diff --git a/src/main/java/com/bandwidth/sdk/model/ConferenceMemberJoinCallback.java b/src/main/java/com/bandwidth/sdk/model/ConferenceMemberJoinCallback.java index e60d7ad3..7bc4b0ae 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceMemberJoinCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceMemberJoinCallback.java @@ -103,7 +103,7 @@ public ConferenceMemberJoinCallback eventType(@javax.annotation.Nullable 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, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * 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. * @return eventType */ @javax.annotation.Nullable diff --git a/src/main/java/com/bandwidth/sdk/model/ConferenceRecordingAvailableCallback.java b/src/main/java/com/bandwidth/sdk/model/ConferenceRecordingAvailableCallback.java index 6397e9d2..11480fd0 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceRecordingAvailableCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceRecordingAvailableCallback.java @@ -135,7 +135,7 @@ public ConferenceRecordingAvailableCallback eventType(@javax.annotation.Nullable } /** - * 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, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * 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. * @return eventType */ @javax.annotation.Nullable diff --git a/src/main/java/com/bandwidth/sdk/model/ConferenceRedirectCallback.java b/src/main/java/com/bandwidth/sdk/model/ConferenceRedirectCallback.java index af69f833..b2b40b4c 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceRedirectCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceRedirectCallback.java @@ -88,7 +88,7 @@ public ConferenceRedirectCallback eventType(@javax.annotation.Nullable String ev } /** - * 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, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * 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. * @return eventType */ @javax.annotation.Nullable diff --git a/src/main/java/com/bandwidth/sdk/model/DisconnectCallback.java b/src/main/java/com/bandwidth/sdk/model/DisconnectCallback.java index fe8e1c31..3edcc946 100644 --- a/src/main/java/com/bandwidth/sdk/model/DisconnectCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/DisconnectCallback.java @@ -150,7 +150,7 @@ public DisconnectCallback eventType(@javax.annotation.Nullable String eventType) } /** - * 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, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * 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. * @return eventType */ @javax.annotation.Nullable diff --git a/src/main/java/com/bandwidth/sdk/model/DtmfCallback.java b/src/main/java/com/bandwidth/sdk/model/DtmfCallback.java index ecdde816..21094e73 100644 --- a/src/main/java/com/bandwidth/sdk/model/DtmfCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/DtmfCallback.java @@ -150,7 +150,7 @@ public DtmfCallback eventType(@javax.annotation.Nullable String eventType) { } /** - * 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, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * 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. * @return eventType */ @javax.annotation.Nullable diff --git a/src/main/java/com/bandwidth/sdk/model/GatherCallback.java b/src/main/java/com/bandwidth/sdk/model/GatherCallback.java index 2b7b5008..0ffd4b9a 100644 --- a/src/main/java/com/bandwidth/sdk/model/GatherCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/GatherCallback.java @@ -155,7 +155,7 @@ public GatherCallback eventType(@javax.annotation.Nullable String eventType) { } /** - * 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, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * 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. * @return eventType */ @javax.annotation.Nullable diff --git a/src/main/java/com/bandwidth/sdk/model/InitiateCallback.java b/src/main/java/com/bandwidth/sdk/model/InitiateCallback.java index 871ac648..2b32d437 100644 --- a/src/main/java/com/bandwidth/sdk/model/InitiateCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/InitiateCallback.java @@ -131,7 +131,7 @@ public InitiateCallback eventType(@javax.annotation.Nullable String eventType) { } /** - * 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, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * 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. * @return eventType */ @javax.annotation.Nullable diff --git a/src/main/java/com/bandwidth/sdk/model/MachineDetectionCompleteCallback.java b/src/main/java/com/bandwidth/sdk/model/MachineDetectionCompleteCallback.java index 39d43a74..5e175ecd 100644 --- a/src/main/java/com/bandwidth/sdk/model/MachineDetectionCompleteCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/MachineDetectionCompleteCallback.java @@ -136,7 +136,7 @@ public MachineDetectionCompleteCallback eventType(@javax.annotation.Nullable Str } /** - * 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, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * 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. * @return eventType */ @javax.annotation.Nullable diff --git a/src/main/java/com/bandwidth/sdk/model/RecordingAvailableCallback.java b/src/main/java/com/bandwidth/sdk/model/RecordingAvailableCallback.java index 74a2cc39..9c68b0c6 100644 --- a/src/main/java/com/bandwidth/sdk/model/RecordingAvailableCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/RecordingAvailableCallback.java @@ -176,7 +176,7 @@ public RecordingAvailableCallback eventType(@javax.annotation.Nullable String ev } /** - * 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, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * 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. * @return eventType */ @javax.annotation.Nullable diff --git a/src/main/java/com/bandwidth/sdk/model/RecordingCompleteCallback.java b/src/main/java/com/bandwidth/sdk/model/RecordingCompleteCallback.java index fa92e165..1a47ce41 100644 --- a/src/main/java/com/bandwidth/sdk/model/RecordingCompleteCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/RecordingCompleteCallback.java @@ -176,7 +176,7 @@ public RecordingCompleteCallback eventType(@javax.annotation.Nullable String eve } /** - * 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, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * 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. * @return eventType */ @javax.annotation.Nullable diff --git a/src/main/java/com/bandwidth/sdk/model/RedirectCallback.java b/src/main/java/com/bandwidth/sdk/model/RedirectCallback.java index a2a27d29..f9e21709 100644 --- a/src/main/java/com/bandwidth/sdk/model/RedirectCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/RedirectCallback.java @@ -145,7 +145,7 @@ public RedirectCallback eventType(@javax.annotation.Nullable String eventType) { } /** - * 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, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * 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. * @return eventType */ @javax.annotation.Nullable diff --git a/src/main/java/com/bandwidth/sdk/model/TranscriptionAvailableCallback.java b/src/main/java/com/bandwidth/sdk/model/TranscriptionAvailableCallback.java index 89963376..f7d91768 100644 --- a/src/main/java/com/bandwidth/sdk/model/TranscriptionAvailableCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/TranscriptionAvailableCallback.java @@ -172,7 +172,7 @@ public TranscriptionAvailableCallback eventType(@javax.annotation.Nullable Strin } /** - * 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, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * 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. * @return eventType */ @javax.annotation.Nullable diff --git a/src/main/java/com/bandwidth/sdk/model/TransferAnswerCallback.java b/src/main/java/com/bandwidth/sdk/model/TransferAnswerCallback.java index bcfdb773..c5803e1d 100644 --- a/src/main/java/com/bandwidth/sdk/model/TransferAnswerCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/TransferAnswerCallback.java @@ -140,7 +140,7 @@ public TransferAnswerCallback eventType(@javax.annotation.Nullable String eventT } /** - * 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, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * 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. * @return eventType */ @javax.annotation.Nullable diff --git a/src/main/java/com/bandwidth/sdk/model/TransferCompleteCallback.java b/src/main/java/com/bandwidth/sdk/model/TransferCompleteCallback.java index fbb2d928..33e68d3f 100644 --- a/src/main/java/com/bandwidth/sdk/model/TransferCompleteCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/TransferCompleteCallback.java @@ -52,7 +52,7 @@ import com.bandwidth.sdk.JSON; /** - * This event is sent to the transferCompleteUrl of the A-leg's <Transfer> verb when the transferred call (B-leg) completes. In a simultaneous ringing scenario, only one B-leg succeeds and this event corresponds to that successful leg. If none of the calls were answered, the transferComplete event corresponds to one of the legs. + * 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. */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class TransferCompleteCallback { @@ -155,7 +155,7 @@ public TransferCompleteCallback eventType(@javax.annotation.Nullable String even } /** - * 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, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * 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. * @return eventType */ @javax.annotation.Nullable diff --git a/src/main/java/com/bandwidth/sdk/model/TransferDisconnectCallback.java b/src/main/java/com/bandwidth/sdk/model/TransferDisconnectCallback.java index 27969041..a6df3888 100644 --- a/src/main/java/com/bandwidth/sdk/model/TransferDisconnectCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/TransferDisconnectCallback.java @@ -165,7 +165,7 @@ public TransferDisconnectCallback eventType(@javax.annotation.Nullable String ev } /** - * 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, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * 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. * @return eventType */ @javax.annotation.Nullable diff --git a/src/main/java/com/bandwidth/sdk/model/bxml/Bxml.java b/src/main/java/com/bandwidth/sdk/model/bxml/Bxml.java index 3d09ad9e..53c5258b 100644 --- a/src/main/java/com/bandwidth/sdk/model/bxml/Bxml.java +++ b/src/main/java/com/bandwidth/sdk/model/bxml/Bxml.java @@ -43,6 +43,7 @@ public class Bxml { @XmlElement(name = PlayAudio.TYPE_NAME, type = PlayAudio.class), @XmlElement(name = Record.TYPE_NAME, type = Record.class), @XmlElement(name = Redirect.TYPE_NAME, type = Redirect.class), + @XmlElement(name = Refer.TYPE_NAME, type = Refer.class), @XmlElement(name = ResumeRecording.TYPE_NAME, type = ResumeRecording.class), @XmlElement(name = Ring.TYPE_NAME, type = Ring.class), @XmlElement(name = SendDtmf.TYPE_NAME, type = SendDtmf.class), diff --git a/src/main/java/com/bandwidth/sdk/model/bxml/Refer.java b/src/main/java/com/bandwidth/sdk/model/bxml/Refer.java new file mode 100644 index 00000000..dec5b613 --- /dev/null +++ b/src/main/java/com/bandwidth/sdk/model/bxml/Refer.java @@ -0,0 +1,86 @@ +/** + * The {@code } verb is used to initiate a SIP REFER on an existing call, + * instructing the remote SIP endpoint to contact a third party directly. + * On success the call is terminated — the remote endpoint redirects away from Bandwidth entirely. + */ + +package com.bandwidth.sdk.model.bxml; + +import static com.bandwidth.sdk.model.bxml.utils.BxmlConstants.DEFAULT_CALLBACK_METHOD; + +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlAttribute; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlType; +import java.net.URI; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Builder.Default; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.NoArgsConstructor; + +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = Refer.TYPE_NAME) +@Builder +@NoArgsConstructor +@AllArgsConstructor +@Getter +@EqualsAndHashCode +/** + * + * @param sipUri (SipUri, required): The SIP URI to refer the call to. Must start with "sip:". + * @param referCompleteUrl (str, optional): URL to send the Refer Complete event to and request new BXML for failure recovery. May be a relative URL. Defaults to None. + * @param referCompleteMethod (str, optional): The HTTP method to use for the request to referCompleteUrl. GET or POST. Default value is POST. + * @param referCompleteFallbackUrl (str, optional): A fallback url which, if provided, will be used to retry the Refer Complete callback delivery in case referCompleteUrl fails to respond. Defaults to None. + * @param referCompleteFallbackMethod (str, optional): The HTTP method to use to deliver the Refer Complete callback to referCompleteFallbackUrl. GET or POST. Default value is POST. + * @param username (str, optional): The username to send in the HTTP request to referCompleteUrl. Defaults to None. + * @param password (str, optional): The password to send in the HTTP request to referCompleteUrl. Defaults to None. + * @param fallbackUsername (str, optional): The username to send in the HTTP request to referCompleteFallbackUrl. Defaults to None. + * @param fallbackPassword (str, optional): The password to send in the HTTP request to referCompleteFallbackUrl. Defaults to None. + * @param tag (str, optional): A custom string that will be sent with these and all future callbacks unless overwritten by a future tag attribute or cleared. May be cleared by setting tag="". Max length 256 characters. Defaults to None. + * + */ +public class Refer implements Verb { + + public static final String TYPE_NAME = "Refer"; + + @XmlElement(name = SipUri.TYPE_NAME, type = SipUri.class) + protected SipUri sipUri; + + @XmlAttribute + protected URI referCompleteUrl; + + @XmlAttribute + @Default + protected String referCompleteMethod = DEFAULT_CALLBACK_METHOD; + + @XmlAttribute + protected URI referCompleteFallbackUrl; + + @XmlAttribute + @Default + protected String referCompleteFallbackMethod = DEFAULT_CALLBACK_METHOD; + + @XmlAttribute + protected String username; + + @XmlAttribute + protected String password; + + @XmlAttribute + protected String fallbackUsername; + + @XmlAttribute + protected String fallbackPassword; + + @XmlAttribute + protected String tag; + + @Override + public String getVerbName() { + return TYPE_NAME; + } +} + diff --git a/src/test/java/com/bandwidth/sdk/unit/models/bxml/ReferVerbTest.java b/src/test/java/com/bandwidth/sdk/unit/models/bxml/ReferVerbTest.java new file mode 100644 index 00000000..893f54ac --- /dev/null +++ b/src/test/java/com/bandwidth/sdk/unit/models/bxml/ReferVerbTest.java @@ -0,0 +1,55 @@ +/** + * + * Unit tests for Refer Verb class + * + * @throws JAXBException if the test fails + */ + +package com.bandwidth.sdk.unit.models.bxml; + +import com.bandwidth.sdk.model.bxml.Bxml; +import com.bandwidth.sdk.model.bxml.Refer; +import com.bandwidth.sdk.model.bxml.SipUri; + +import jakarta.xml.bind.JAXBContext; +import jakarta.xml.bind.JAXBException; + +import org.junit.jupiter.api.Test; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.is; + +import java.net.URI; + +public class ReferVerbTest { + + SipUri sipUri = SipUri.builder() + .uri("sip:alice@atlanta.example.com") + .build(); + + Refer refer = Refer.builder() + .sipUri(sipUri) + .referCompleteUrl(URI.create("https://example.com/webhooks/refer_complete")) + .referCompleteMethod("POST") + .tag("test-tag") + .build(); + + Refer referMinimal = Refer.builder() + .sipUri(sipUri) + .build(); + + @Test + public void referVerbWithAllAttributes() throws JAXBException { + JAXBContext jaxbContext = JAXBContext.newInstance(Bxml.class); + String expectedBxml = "sip:alice@atlanta.example.com"; + assertThat(new Bxml().with(refer).toBxml(jaxbContext), is(expectedBxml)); + } + + @Test + public void referVerbMinimal() throws JAXBException { + JAXBContext jaxbContext = JAXBContext.newInstance(Bxml.class); + String expectedBxml = "sip:alice@atlanta.example.com"; + assertThat(new Bxml().with(referMinimal).toBxml(jaxbContext), is(expectedBxml)); + } +} +