Skip to content

Commit

Permalink
Merge pull request #11 from sinch/DEVEXP-470-voice-V1-design
Browse files Browse the repository at this point in the history
feat (Voice): Move to Voice 'V1' design
  • Loading branch information
JPPortier authored Nov 7, 2024
2 parents c24555e + 5f8fb7d commit a4d9e41
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions snippets/voice/callouts_text_to_speech/Snippet.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package voice;

import com.sinch.sdk.domains.voice.*;
import com.sinch.sdk.domains.voice.models.*;
import com.sinch.sdk.domains.voice.models.requests.*;
import com.sinch.sdk.domains.voice.api.v1.CalloutsService;
import com.sinch.sdk.domains.voice.api.v1.VoiceService;
import com.sinch.sdk.domains.voice.models.v1.callouts.request.CalloutRequestTTS;
import com.sinch.sdk.domains.voice.models.v1.destination.DestinationPstn;

public class Snippet {

Expand All @@ -13,9 +14,9 @@ public static String execute(VoiceService voiceService) {
String phoneNumber = "YOUR_phone_number";
String message = "Hello, this is a call from Sinch. Congratulations! You made your first call.";

CalloutRequestParametersTTS parameters =
CalloutRequestParametersTTS.builder()
.setDestination(DestinationNumber.valueOf(phoneNumber))
CalloutRequestTTS parameters =
CalloutRequestTTS.builder()
.setDestination(DestinationPstn.from(phoneNumber))
.setText(message)
.build();

Expand Down

0 comments on commit a4d9e41

Please sign in to comment.