Skip to content

Commit 3961094

Browse files
committed
VAPI-3162-REFER
1 parent 7aa7818 commit 3961094

7 files changed

Lines changed: 670 additions & 0 deletions

File tree

.openapi-generator/FILES

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,8 @@ lib/bandwidth-sdk/models/recording_transcription_metadata.rb
388388
lib/bandwidth-sdk/models/recording_transcriptions.rb
389389
lib/bandwidth-sdk/models/redirect_callback.rb
390390
lib/bandwidth-sdk/models/redirect_method_enum.rb
391+
lib/bandwidth-sdk/models/refer_call_status_enum.rb
392+
lib/bandwidth-sdk/models/refer_complete_callback.rb
391393
lib/bandwidth-sdk/models/sip_connection_metadata.rb
392394
lib/bandwidth-sdk/models/sip_credentials.rb
393395
lib/bandwidth-sdk/models/sms_message_content.rb

bandwidth.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3209,6 +3209,13 @@ components:
32093209
Setting the conference state to `completed` ends the conference and
32103210
ejects all members.
32113211
example: completed
3212+
referCallStatusEnum:
3213+
type: string
3214+
enum:
3215+
- success
3216+
- failure
3217+
description: The status of the SIP REFER request.
3218+
example: success
32123219
machineDetectionModeEnum:
32133220
type: string
32143221
default: async
@@ -5047,6 +5054,62 @@ components:
50475054
$ref: '#/components/schemas/transferCallerId'
50485055
transferTo:
50495056
$ref: '#/components/schemas/transferTo'
5057+
referCompleteCallback:
5058+
type: object
5059+
description: >-
5060+
This event is sent to the referCompleteUrl of the <Refer> verb when the
5061+
SIP REFER request has been resolved — either the remote endpoint has
5062+
accepted and redirected the call (success) or the REFER was rejected or
5063+
timed out (failure). On success the original call is terminated.
5064+
properties:
5065+
eventType:
5066+
$ref: '#/components/schemas/eventType'
5067+
eventTime:
5068+
$ref: '#/components/schemas/eventTime'
5069+
accountId:
5070+
$ref: '#/components/schemas/accountId'
5071+
applicationId:
5072+
$ref: '#/components/schemas/applicationId1'
5073+
from:
5074+
$ref: '#/components/schemas/from'
5075+
to:
5076+
$ref: '#/components/schemas/to'
5077+
direction:
5078+
$ref: '#/components/schemas/callDirectionEnum'
5079+
callId:
5080+
$ref: '#/components/schemas/callId'
5081+
callUrl:
5082+
$ref: '#/components/schemas/callUrl'
5083+
enqueuedTime:
5084+
$ref: '#/components/schemas/enqueuedTime'
5085+
startTime:
5086+
$ref: '#/components/schemas/startTime'
5087+
answerTime:
5088+
$ref: '#/components/schemas/answerTime'
5089+
tag:
5090+
$ref: '#/components/schemas/tag1'
5091+
referTo:
5092+
type: string
5093+
description: The SIP URI that the call was referred to.
5094+
example: sip:alice@atlanta.example.com
5095+
referCallStatus:
5096+
$ref: '#/components/schemas/referCallStatusEnum'
5097+
referSipResponseCode:
5098+
type: integer
5099+
description: >-
5100+
The SIP response code received in response to the REFER request.
5101+
Present when the status of the REFER is known (e.g. 202 Accepted or
5102+
405 Method Not Allowed). Absent when the REFER was not attempted.
5103+
example: 202
5104+
nullable: true
5105+
notifySipResponseCode:
5106+
type: integer
5107+
description: >-
5108+
The SIP response code received in a NOTIFY from the remote endpoint
5109+
after it attempted to reach the transfer target. Present only if a
5110+
NOTIFY was received before the 30-second timeout.
5111+
example: 200
5112+
nullable: true
50505113
transcriptionAvailableCallback:
50515114
type: object
50525115
description: >-

lib/bandwidth-sdk.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,8 @@
174174
require 'bandwidth-sdk/models/recording_transcriptions'
175175
require 'bandwidth-sdk/models/redirect_callback'
176176
require 'bandwidth-sdk/models/redirect_method_enum'
177+
require 'bandwidth-sdk/models/refer_call_status_enum'
178+
require 'bandwidth-sdk/models/refer_complete_callback'
177179
require 'bandwidth-sdk/models/sip_connection_metadata'
178180
require 'bandwidth-sdk/models/sip_credentials'
179181
require 'bandwidth-sdk/models/sms_message_content'
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
=begin
2+
#Bandwidth
3+
#Bandwidth's Communication APIs
4+
The version of the OpenAPI document: 1.0.0
5+
Contact: letstalk@bandwidth.com
6+
Generated by: https://openapi-generator.tech
7+
Generator version: 7.17.0
8+
=end
9+
10+
require 'date'
11+
require 'time'
12+
13+
module Bandwidth
14+
class ReferCallStatusEnum
15+
SUCCESS = "success".freeze
16+
FAILURE = "failure".freeze
17+
18+
def self.all_vars
19+
@all_vars ||= [SUCCESS, FAILURE].freeze
20+
end
21+
22+
# Builds the enum from string
23+
# @param [String] The enum value in the form of the string
24+
# @return [String] The enum value
25+
def self.build_from_hash(value)
26+
new.build_from_hash(value)
27+
end
28+
29+
# Builds the enum from string
30+
# @param [String] The enum value in the form of the string
31+
# @return [String] The enum value
32+
def build_from_hash(value)
33+
return value if ReferCallStatusEnum.all_vars.include?(value)
34+
raise "Invalid ENUM value #{value} for class #ReferCallStatusEnum"
35+
end
36+
end
37+
end

0 commit comments

Comments
 (0)