Created
August 6, 2009 21:45
-
-
Save cloudvoxcode/163584 to your computer and use it in GitHub Desktop.
Receive phone call with Java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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/ */ | |
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("Swift", "\"You have successfully received a call through Cloudvox. That's a mighty long string.\""); | |
hangup(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
callin.agi = ExampleCallIn |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment