forked from asterisk-java/asterisk-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExampleCallin.java
More file actions
21 lines (17 loc) · 722 Bytes
/
ExampleCallin.java
File metadata and controls
21 lines (17 loc) · 722 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* Cloudvox - answer and control a phone call with Java
Place and receive phone calls via open API: http://cloudvox.com/
Learn about call scripting, Asterisk/AGI, voice apps: http://help.cloudvox.com/
Added to the project and modified by Tropo: http://tropo.com */
import org.asteriskjava.fastagi.AgiChannel;
import org.asteriskjava.fastagi.AgiException;
import org.asteriskjava.fastagi.AgiRequest;
import org.asteriskjava.fastagi.BaseAgiScript;
/* Example incoming call handler
Answer call, speak message */
public class ExampleCallIn extends BaseAgiScript {
public void service(AgiRequest request, AgiChannel channel) throws AgiException {
answer();
exec("Playback", "tt-monkeys");
hangup();
}
}