Skip to content

Commit 2d193e4

Browse files
committed
refactor: Rename new voice snippets
1 parent f3992b9 commit 2d193e4

File tree

4 files changed

+18
-18
lines changed

4 files changed

+18
-18
lines changed

SNIPPETS.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2784,6 +2784,11 @@ post("/webhooks/notification", (req, res) -> {
27842784
```java
27852785
var response = client.getVoiceClient().stopStream(VOICE_CALL_ID);
27862786
```
2787+
### Unsubscribe From DTMF Events
2788+
2789+
```java
2790+
client.getVoiceClient().removeDtmfListener(VOICE_CALL_ID);
2791+
```
27872792
### Transfer Call NCCO
27882793

27892794
```java
@@ -2888,6 +2893,11 @@ Spark.port(3000);
28882893
Spark.get("/webhooks/answer", answerRoute);
28892894
Spark.post("/webhooks/answer", answerRoute);
28902895
```
2896+
### Stop Text To Speech
2897+
2898+
```java
2899+
var response = client.getVoiceClient().stopTalk(VOICE_CALL_ID);
2900+
```
28912901
### Record Call
28922902

28932903
```java
@@ -2921,6 +2931,11 @@ Spark.port(3000);
29212931
Spark.get("/webhooks/answer", answerRoute);
29222932
Spark.post("/webhooks/recordings", recordingRoute);
29232933
```
2934+
### Subscribe To DTMF Events
2935+
2936+
```java
2937+
client.getVoiceClient().addDtmfListener(VOICE_CALL_ID, VOICE_EVENT_URL);
2938+
```
29242939
### Stream Audio To Call
29252940

29262941
```java
@@ -3049,16 +3064,6 @@ Spark.port(3000);
30493064
Spark.get("/webhooks/answer", answerRoute);
30503065
Spark.post("/webhooks/dtmf", inputRoute);
30513066
```
3052-
### Subscribe DTMF
3053-
3054-
```java
3055-
client.getVoiceClient().addDtmfListener(VOICE_CALL_ID, VOICE_EVENT_URL);
3056-
```
3057-
### Stop Speech
3058-
3059-
```java
3060-
var response = client.getVoiceClient().stopTalk(VOICE_CALL_ID);
3061-
```
30623067
### Send DTMF To Call
30633068

30643069
```java
@@ -3097,11 +3102,6 @@ client.getVoiceClient().startTalk(VOICE_CALL_ID, payload);
30973102
```java
30983103
client.getVoiceClient().createCall(new Call(VOICE_TO_NUMBER, VONAGE_VIRTUAL_NUMBER, VOICE_ANSWER_URL));
30993104
```
3100-
### Unsubscribe DTMF
3101-
3102-
```java
3103-
client.getVoiceClient().removeDtmfListener(VOICE_CALL_ID);
3104-
```
31053105
### ASR Input
31063106

31073107
```java

src/main/java/com/vonage/quickstart/voice/StopSpeech.java renamed to src/main/java/com/vonage/quickstart/voice/StopTextToSpeech.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import com.vonage.client.VonageClient;
2525
import static com.vonage.quickstart.EnvironmentVariables.*;
2626

27-
public class StopSpeech {
27+
public class StopTextToSpeech {
2828
public static void main(String... args) throws Exception {
2929
VonageClient client = VonageClient.builder()
3030
.applicationId(VONAGE_APPLICATION_ID)

src/main/java/com/vonage/quickstart/voice/SubscribeDtmf.java renamed to src/main/java/com/vonage/quickstart/voice/SubscribeToDtmfEvents.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import com.vonage.client.VonageClient;
2525
import static com.vonage.quickstart.EnvironmentVariables.*;
2626

27-
public class SubscribeDtmf {
27+
public class SubscribeToDtmfEvents {
2828
public static void main(String... args) throws Exception {
2929
VonageClient client = VonageClient.builder()
3030
.applicationId(VONAGE_APPLICATION_ID)

src/main/java/com/vonage/quickstart/voice/UnsubscribeDtmf.java renamed to src/main/java/com/vonage/quickstart/voice/UnsubscribeFromDtmfEvents.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import com.vonage.client.VonageClient;
2525
import static com.vonage.quickstart.EnvironmentVariables.*;
2626

27-
public class UnsubscribeDtmf {
27+
public class UnsubscribeFromDtmfEvents {
2828
public static void main(String... args) throws Exception {
2929
VonageClient client = VonageClient.builder()
3030
.applicationId(VONAGE_APPLICATION_ID)

0 commit comments

Comments
 (0)