Skip to content

Voice call flow optional maxDuration #217

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ public class VoiceCallFlow implements Serializable {
@JsonProperty("default")
private boolean defaultCall;

@JsonProperty("maxDuration")
private Integer maxDuration;

private Date createdAt;
private Date updatedAt;

Expand Down Expand Up @@ -71,6 +74,10 @@ public void setDefaultCall(boolean defaultCall) {
this.defaultCall = defaultCall;
}

public Integer getMaxDuration() { return maxDuration; }

public void setMaxDuration(Integer maxDuration) { this.maxDuration = maxDuration; }

public Date getCreatedAt() {
return createdAt;
}
Expand Down Expand Up @@ -103,6 +110,7 @@ public String toString() {
", record=" + record +
", steps=" + steps +
", default=" + defaultCall +
", maxDuration=" + maxDuration +
", createdAt=" + createdAt +
", updatedAt=" + updatedAt +
'}';
Expand Down
1 change: 1 addition & 0 deletions api/src/test/java/com/messagebird/TestUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ static VoiceCall createVoiceCall(String destination) {
final VoiceCallFlow voiceCallFlow = new VoiceCallFlow();
VoiceStep voiceStep = new VoiceStep();
voiceStep.setAction("say");
voiceCallFlow.setMaxDuration(28800);

final VoiceStepOption voiceStepOption = new VoiceStepOption();
voiceStepOption.setPayload("This is a journey into sound. Good bye!");
Expand Down
1 change: 1 addition & 0 deletions examples/src/main/java/ExampleSendVoiceCall.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public static void main(String[] args) {
voiceStep.setOptions(voiceStepOption);

voiceCallFlow.setSteps(Collections.singletonList(voiceStep));
voiceCallFlow.setMaxDuration(28800);
voiceCall.setCallFlow(voiceCallFlow);
//Sending request to client
final VoiceCallResponse response = messageBirdClient.sendVoiceCall(voiceCall);
Expand Down