Asterisk-Java -


Apache
跨平台
Java

软件简介

AsteriskJava 是用于集成 Asterisk PBX 的 Java
类库。

示例代码:

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();
  }
}