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 pathConferenceSample.java
More file actions
49 lines (37 loc) · 1.48 KB
/
ConferenceSample.java
File metadata and controls
49 lines (37 loc) · 1.48 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
48
49
package samples;
import java.net.URI;
import com.rayo.core.verb.Conference;
import com.rayo.core.verb.Record;
import com.rayo.core.verb.Ssml;
import com.rayo.core.verb.VerbRef;
public class ConferenceSample extends BaseSample {
public void run(Conference conference) throws Exception {
String callId = client.waitForOffer().getCallId();
client.answer(callId);
client.command(conference, callId);
Record record = new Record();
VerbRef ref = client.record(record, conference.getRoomName());
client.stop(ref);
Thread.sleep(10000);
client.hangup(callId);
Thread.sleep(1000);
client.hangup(callId);
//client.say("Thank you");
}
public static void main(String[] args) throws Exception {
ConferenceSample sample1 = new ConferenceSample();
sample1.connect("localhost", "usera", "1", "localhost");
Conference conference = new Conference();
conference.setRoomName("1238");
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);
// Launch your first soft phone to answer this call
sample1.run(conference);
}
}