我已经成功实现了Java Api并开始发送短信和拨打电话.但我发现无法接听来电.我已经尝试了RI事件(serialPort.notifyOnRingIndicator(true);).但是它没有触发只有DATA_AVAILABLE事件才会被激活
我正在尝试实现一个IVR系统.如何在这种情况下发送ATA命令,如何检测RING以及为什么RI事件不会触发
package sample;
import java.io.*;
import java.util.*;
import gnu.io.*;
import java.io.*;
import javax.sound.sampled.AudioInputStream;
import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.Clip;
import javax.sound.sampled.LineUnavailableException;
import javax.sound.sampled.UnsupportedAudioFileException;
import org.apache.log4j.chainsaw.Main;
import sun.audio.*;
public class GSMConnect implements SerialPortEventListener,
CommPortOwnershipListener {
private static String comPort = "COM6"; // This COM Port must be connect with GSM Modem or your mobile phone
private String messageString = "";
private CommPortIdentifier portId = null;
private Enumeration portList; …Run Code Online (Sandbox Code Playgroud)