Skip to content

Commit c3f1795

Browse files
committed
Deploy
1 parent a016c35 commit c3f1795

File tree

7 files changed

+171
-4
lines changed

7 files changed

+171
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ Install the SDK by adding the following dependency in your project's pom.xml fil
1010
<dependency>
1111
<groupId>com.bandwidth.sdk</groupId>
1212
<artifactId>bandwidth-sdk</artifactId>
13-
<version>1.0.0</version>
13+
<version>1.1.0</version>
1414
</dependency>
1515
```
1616

1717
You can also view the package at:
18-
https://mvnrepository.com/artifact/com.bandwidth.sdk/bandwidth-sdk/1.0.0
18+
https://mvnrepository.com/artifact/com.bandwidth.sdk/bandwidth-sdk/1.1.0
1919

2020
## Initialize the API Client
2121

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<project><modelVersion>4.0.0</modelVersion><groupId>com.bandwidth.sdk</groupId><artifactId>bandwidth-sdk</artifactId><version>1.0.0</version><packaging>jar</packaging><name>BandwidthLib</name><build><pluginManagement><plugins><plugin><groupId>org.eclipse.m2e</groupId><artifactId>lifecycle-mapping</artifactId><version>1.0.0</version><configuration><lifecycleMappingMetadata><pluginExecutions><pluginExecution><pluginExecutionFilter><groupId>org.apache.maven.plugins</groupId><artifactId>maven-enforcer-plugin</artifactId><versionRange>[2.0.0,)</versionRange><goals><goal>enforce</goal></goals></pluginExecutionFilter><action><execute><runOnIncremental>true</runOnIncremental></execute></action></pluginExecution></pluginExecutions></lifecycleMappingMetadata></configuration></plugin></plugins></pluginManagement><plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-enforcer-plugin</artifactId><version>3.0.0-M2</version><executions><execution><id>enforce-versions</id><goals><goal>enforce</goal></goals><configuration><fail>true</fail><rules><requireJavaVersion><version>1.8</version></requireJavaVersion></rules></configuration></execution></executions></plugin><plugin><artifactId>maven-assembly-plugin</artifactId><configuration><descriptorRefs><descriptorRef>jar-with-dependencies</descriptorRef></descriptorRefs><appendAssemblyId>false</appendAssemblyId></configuration></plugin><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-source-plugin</artifactId><version>3.1.0</version><executions><execution><id>attach-sources</id><goals><goal>jar</goal></goals></execution></executions></plugin><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-gpg-plugin</artifactId><version>1.5</version><executions><execution><id>sign-artifacts</id><phase>verify</phase><goals><goal>sign</goal></goals></execution></executions></plugin><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-javadoc-plugin</artifactId><version>3.1.1</version><configuration><failOnError>false</failOnError></configuration><executions><execution><id>attach-javadocs</id><goals><goal>jar</goal></goals></execution></executions></plugin></plugins></build><properties><jackson.version>2.9.10</jackson.version><maven.compiler.source>1.8</maven.compiler.source><maven.compiler.target>1.8</maven.compiler.target></properties><dependencies><dependency><groupId>javax.xml.bind</groupId><artifactId>jaxb-api</artifactId><version>2.3.0</version></dependency><dependency><groupId>com.sun.xml.bind</groupId><artifactId>jaxb-core</artifactId><version>2.3.0</version></dependency><dependency><groupId>com.sun.xml.bind</groupId><artifactId>jaxb-impl</artifactId><version>2.3.0</version></dependency><dependency><groupId>org.projectlombok</groupId><artifactId>lombok</artifactId><version>1.18.8</version></dependency><dependency><groupId>com.squareup.okhttp3</groupId><artifactId>okhttp</artifactId><version>3.12.1</version></dependency><dependency><groupId>com.fasterxml.jackson.core</groupId><artifactId>jackson-databind</artifactId><version>${jackson.version}</version></dependency><dependency><groupId>com.fasterxml.jackson.core</groupId><artifactId>jackson-core</artifactId><version>${jackson.version}</version></dependency><dependency><groupId>com.fasterxml.jackson.core</groupId><artifactId>jackson-annotations</artifactId><version>${jackson.version}</version></dependency></dependencies><distributionManagement><snapshotRepository><id>ossrh</id><url>https://oss.sonatype.org/content/repositories/snapshots</url></snapshotRepository><repository><id>ossrh</id><url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url></repository></distributionManagement><parent><groupId>org.sonatype.oss</groupId><artifactId>oss-parent</artifactId><version>7</version></parent><licenses><license><name>Apache License, Version 2.0</name><url>http://www.apache.org/licenses/LICENSE-2.0.txt</url><distribution>repo</distribution></license></licenses><scm><url>https://github.com/Bandwidth/java-sdk</url><connection>scm:git:git@github.com:Bandwidth/java-sdk.git</connection><developerConnection>scm:git:git@github.com:Bandwidth/java-sdk.git</developerConnection></scm><developers><developer><id>support</id><name>Bandwidth Support</name><email>info@bandwidth.com</email><organization>Bandwidth, Inc.</organization><organizationUrl>http://bandwidth.com</organizationUrl><timezone>-5</timezone></developer></developers></project>
1+
<project><modelVersion>4.0.0</modelVersion><groupId>com.bandwidth.sdk</groupId><artifactId>bandwidth-sdk</artifactId><version>1.1.0</version><packaging>jar</packaging><name>BandwidthLib</name><build><pluginManagement><plugins><plugin><groupId>org.eclipse.m2e</groupId><artifactId>lifecycle-mapping</artifactId><version>1.0.0</version><configuration><lifecycleMappingMetadata><pluginExecutions><pluginExecution><pluginExecutionFilter><groupId>org.apache.maven.plugins</groupId><artifactId>maven-enforcer-plugin</artifactId><versionRange>[2.0.0,)</versionRange><goals><goal>enforce</goal></goals></pluginExecutionFilter><action><execute><runOnIncremental>true</runOnIncremental></execute></action></pluginExecution></pluginExecutions></lifecycleMappingMetadata></configuration></plugin></plugins></pluginManagement><plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-enforcer-plugin</artifactId><version>3.0.0-M2</version><executions><execution><id>enforce-versions</id><goals><goal>enforce</goal></goals><configuration><fail>true</fail><rules><requireJavaVersion><version>1.8</version></requireJavaVersion></rules></configuration></execution></executions></plugin><plugin><artifactId>maven-assembly-plugin</artifactId><configuration><descriptorRefs><descriptorRef>jar-with-dependencies</descriptorRef></descriptorRefs><appendAssemblyId>false</appendAssemblyId></configuration></plugin><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-source-plugin</artifactId><version>3.1.0</version><executions><execution><id>attach-sources</id><goals><goal>jar</goal></goals></execution></executions></plugin><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-gpg-plugin</artifactId><version>1.5</version><executions><execution><id>sign-artifacts</id><phase>verify</phase><goals><goal>sign</goal></goals></execution></executions></plugin><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-javadoc-plugin</artifactId><version>3.1.1</version><configuration><failOnError>false</failOnError></configuration><executions><execution><id>attach-javadocs</id><goals><goal>jar</goal></goals></execution></executions></plugin></plugins></build><properties><jackson.version>2.9.10</jackson.version><maven.compiler.source>1.8</maven.compiler.source><maven.compiler.target>1.8</maven.compiler.target></properties><dependencies><dependency><groupId>javax.xml.bind</groupId><artifactId>jaxb-api</artifactId><version>2.3.0</version></dependency><dependency><groupId>com.sun.xml.bind</groupId><artifactId>jaxb-core</artifactId><version>2.3.0</version></dependency><dependency><groupId>com.sun.xml.bind</groupId><artifactId>jaxb-impl</artifactId><version>2.3.0</version></dependency><dependency><groupId>org.projectlombok</groupId><artifactId>lombok</artifactId><version>1.18.8</version></dependency><dependency><groupId>com.squareup.okhttp3</groupId><artifactId>okhttp</artifactId><version>3.12.1</version></dependency><dependency><groupId>com.fasterxml.jackson.core</groupId><artifactId>jackson-databind</artifactId><version>${jackson.version}</version></dependency><dependency><groupId>com.fasterxml.jackson.core</groupId><artifactId>jackson-core</artifactId><version>${jackson.version}</version></dependency><dependency><groupId>com.fasterxml.jackson.core</groupId><artifactId>jackson-annotations</artifactId><version>${jackson.version}</version></dependency></dependencies><distributionManagement><snapshotRepository><id>ossrh</id><url>https://oss.sonatype.org/content/repositories/snapshots</url></snapshotRepository><repository><id>ossrh</id><url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url></repository></distributionManagement><parent><groupId>org.sonatype.oss</groupId><artifactId>oss-parent</artifactId><version>7</version></parent><licenses><license><name>Apache License, Version 2.0</name><url>http://www.apache.org/licenses/LICENSE-2.0.txt</url><distribution>repo</distribution></license></licenses><scm><url>https://github.com/Bandwidth/java-sdk</url><connection>scm:git:git@github.com:Bandwidth/java-sdk.git</connection><developerConnection>scm:git:git@github.com:Bandwidth/java-sdk.git</developerConnection></scm><developers><developer><id>support</id><name>Bandwidth Support</name><email>info@bandwidth.com</email><organization>Bandwidth, Inc.</organization><organizationUrl>http://bandwidth.com</organizationUrl><timezone>-5</timezone></developer></developers></project>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
2+
package com.bandwidth.voice.bxml.verbs;
3+
4+
import lombok.Builder;
5+
6+
import javax.xml.bind.annotation.XmlType;
7+
8+
/**
9+
* The PauseRecording verb is used to pause a recording that was previously started by a <StartRecording> verb.
10+
*<br/>
11+
* Audio that occurs between a <PauseRecording> verb and a <ResumeRecording> verb will not be present in the recording.
12+
*<br/>
13+
* The paused period will not be included in the duration of the recording and therefore will not contribute to the recording portion of the bill.
14+
*<br/>
15+
* If there is not an ongoing recording at the time of this verb's execution, it has no effect.
16+
*<br/>
17+
* The Hangup verb is also used to reject incoming calls either explicitly or implicitly.
18+
*/
19+
@Builder
20+
@XmlType(name = PauseRecording.TYPE_NAME)
21+
public class PauseRecording implements Verb {
22+
public static final String TYPE_NAME = "PauseRecording";
23+
24+
}

src/main/java/com/bandwidth/voice/bxml/verbs/Response.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@ public class Response {
3434
@XmlElement(name = Pause.TYPE_NAME, type = Pause.class),
3535
@XmlElement(name = Forward.TYPE_NAME, type = Forward.class),
3636
@XmlElement(name = SendDtmf.TYPE_NAME, type = SendDtmf.class),
37-
@XmlElement(name = Record.TYPE_NAME, type = Record.class)
37+
@XmlElement(name = Record.TYPE_NAME, type = Record.class),
38+
@XmlElement(name = StartRecording.TYPE_NAME, type = StartRecording.class),
39+
@XmlElement(name = StopRecording.TYPE_NAME, type = StopRecording.class),
40+
@XmlElement(name = PauseRecording.TYPE_NAME, type = PauseRecording.class),
41+
@XmlElement(name = ResumeRecording.TYPE_NAME, type = ResumeRecording.class)
3842
})
3943
private final List<Verb> verbs = new ArrayList<>();
4044

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
package com.bandwidth.voice.bxml.verbs;
3+
4+
import lombok.Builder;
5+
6+
import javax.xml.bind.annotation.XmlType;
7+
8+
/**
9+
* The ResumeRecording verb is used to resume a recording that was previously paused by a <PauseRecording> verb.
10+
*<br/>
11+
* Audio that occurs between a <PauseRecording> verb and a <ResumeRecording> verb will not be present in the recording.
12+
*<br/>
13+
* The paused period will not be included in the duration of the recording and therefore will not contribute to the recording portion of the bill.
14+
*<br/>
15+
* If there is not an ongoing recording at the time of this verb's execution, it has no effect.
16+
*/
17+
@Builder
18+
@XmlType(name = ResumeRecording.TYPE_NAME)
19+
public class ResumeRecording implements Verb {
20+
public static final String TYPE_NAME = "ResumeRecording";
21+
22+
}
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
2+
package com.bandwidth.voice.bxml.verbs;
3+
4+
import lombok.Builder;
5+
6+
import java.net.URI;
7+
import javax.xml.bind.annotation.XmlAttribute;
8+
import javax.xml.bind.annotation.XmlType;
9+
10+
/**
11+
* The StartRecording verb allows a segment of a call to be recorded while other verbs are executing.
12+
*<br/>
13+
* All audio on both sides of the call will be recorded until the call ends or the <StopRecording> verb is used or the <PauseRecording> verb is used.
14+
*/
15+
@Builder
16+
@XmlType(name = StartRecording.TYPE_NAME)
17+
public class StartRecording implements Verb {
18+
public static final String TYPE_NAME = "StartRecording";
19+
20+
/**
21+
* <i>(optional)</i> URL to send the Record Complete event to once it has ended. Accepts BXML.
22+
*/
23+
@XmlAttribute
24+
private URI recordingAvailableUrl;
25+
26+
/**
27+
* <i>(optional)</i> The HTTP method to use for the request to recordingAvailableUrl. GET or POST. Default Value is POST.
28+
*/
29+
@XmlAttribute
30+
private Method recordingAvailableMethod;
31+
32+
/**
33+
* <i>(optional)</i> A custom string that will be sent with this and all future callbacks unless overwritten by a future tag attribute or cleared.
34+
* <br/>
35+
* May be cleared by setting tag=""
36+
* <br/>
37+
* Max length 256 characters.
38+
*/
39+
@XmlAttribute
40+
private String tag;
41+
42+
/**
43+
* <i>(optional)</i> The username to send in the HTTP request to recordCompleteUrl or recordingAvailableUrl. If specified, the URLs must be TLS-encrypted (i.e., https).
44+
*/
45+
@XmlAttribute
46+
protected String username;
47+
48+
/**
49+
* <i>(optional)</i> The password to send in the HTTP request to recordCompleteUrl or recordingAvailableUrl. If specified, the URLs must be TLS-encrypted (i.e., https).
50+
*/
51+
@XmlAttribute
52+
protected String password;
53+
54+
/**
55+
* <i>(optional)</i> A boolean value indicating whether or not the recording file should separate each side of the call into its own audio channel. Default value is false. true results in two channels.
56+
*/
57+
@XmlAttribute
58+
protected boolean multiChannel;
59+
60+
/**
61+
* <i>(optional)</i> The audio format that the recording will be saved as: mp3 or wav. Default value is wav.
62+
*/
63+
@XmlAttribute
64+
protected String fileFormat;
65+
66+
public static class StartRecordingBuilder {
67+
68+
/**
69+
* <b>(required)</b> URL to send the Recording Available event to once it has been processed. Does not accept BXML.
70+
*/
71+
public StartRecordingBuilder recordingAvailableUrl(URI uri ){
72+
this.recordingAvailableUrl = uri;
73+
return this;
74+
}
75+
76+
/**
77+
* <b>(required)</b> URL to send the Recording Available event to once it has been processed. Does not accept BXML.
78+
*/
79+
public StartRecordingBuilder recordingAvailableUrl(String uri){
80+
return recordingAvailableUrl(URI.create(uri));
81+
}
82+
83+
/**
84+
* <i>(optional)</i> The HTTP method to use for the request to recordingAvailableUrl. GET or POST. Default Value is POST.
85+
*/
86+
public StartRecordingBuilder recordingAvailableMethod(Method method){
87+
this.recordingAvailableMethod = method;
88+
return this;
89+
}
90+
91+
/**
92+
* <i>(optional)</i> The HTTP method to use for the request to recordingAvailableUrl. GET or POST. Default Value is POST. Converts String to Method using Method.fromValue(method)
93+
*/
94+
public StartRecordingBuilder recordingAvailableMethod(String method){
95+
return recordingAvailableMethod(Method.fromValue(method));
96+
}
97+
}
98+
99+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
2+
package com.bandwidth.voice.bxml.verbs;
3+
4+
import lombok.Builder;
5+
6+
import javax.xml.bind.annotation.XmlType;
7+
8+
/**
9+
* The StopRecording verb is used to stop a recording that was previously started by a <StartRecording> verb.
10+
* <br/>
11+
* If there is not an ongoing recording at the time of this verb's execution, it has no effect. If a previous recording was paused, will end it.
12+
*/
13+
@Builder
14+
@XmlType(name = StopRecording.TYPE_NAME)
15+
public class StopRecording implements Verb {
16+
public static final String TYPE_NAME = "StopRecording";
17+
18+
}

0 commit comments

Comments
 (0)