This repository was archived by the owner on May 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMixerSample2.java
More file actions
47 lines (36 loc) · 1.52 KB
/
MixerSample2.java
File metadata and controls
47 lines (36 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package samples;
import com.rayo.core.verb.Conference;
import com.rayo.core.verb.Ssml;
public class MixerSample2 extends BaseSample {
public void run() throws Exception {
connect("localhost", "userc", "1", "localhost");
String firstCall = client.waitForOffer().getCallId();
client.answer(firstCall);
client.say("We are going to create a conference and then say something to it", firstCall);
Thread.sleep(10000);
Conference conference = buildConference();
client.conference(conference, firstCall);
client.ask("Questions are now allowed", "[4-5 DIGITS]", conference.getRoomName());
Thread.sleep(15000);
//Thread.sleep(3000);
client.say("You obviously didn't heard that", conference.getRoomName());
Thread.sleep(10000);
client.hangup(firstCall);
}
private Conference buildConference() {
Conference conference = new Conference();
conference.setRoomName("123");
conference.setModerator(true);
conference.setBeep(false);
Ssml announcementSsml = new Ssml("has joined the conference");
announcementSsml.setVoice("allison");
conference.setAnnouncement(announcementSsml);
Ssml musicSsml = new Ssml("The moderator how not yet joined.. Listen to this awesome music while you wait.<audio src='http://www.yanni.com/music/awesome.mp3' />");
musicSsml.setVoice("herbert");
conference.setHoldMusic(musicSsml);
return conference;
}
public static void main(String[] args) throws Exception {
new MixerSample2().run();
}
}