我有一条短信猫,我想向我的网络服务发送一条短信。因此,我使用smslib。但是,当我尝试发送“ OK”和smslib中包含的其他字符串时,它将关闭。因为smslib将“ OK”识别为终止符字符串。因此我无法发送“确定”。 我可以发送OK的任何方法吗?
this.terminators = new String[14];
this.terminators[0] = "OK\\s";
this.terminators[1] = "\\s*[\\p{ASCII}]*\\s+OK\\s";
this.terminators[2] = "(ERROR|NO CARRIER|NO DIALTONE)\\s";
this.terminators[3] = "ERROR:\\s*\\d+\\s";
this.terminators[4] = "\\+CM[ES]\\s+ERROR:\\s*\\d+\\s";
this.terminators[5] = "\\+CPIN:\\s*READY\\s";
this.terminators[6] = "\\+CPIN:\\s*SIM\\s*BUSY\\s";
this.terminators[7] = "\\+CPIN:\\s*SIM\\s*PIN\\s";
this.terminators[8] = "\\+CPIN:\\s*SIM\\s*PIN2\\s";
this.terminators[9] = "\\+CUSD:\\s.*\\s";
this.terminators[10] = "\\+CMTI:\\s*\\p{Punct}[\\p{ASCII}]+\\p{Punct}\\p{Punct}\\s*\\d+\\s";
this.terminators[11] = "\\+CDSI:\\s*\\p{Punct}[\\p{ASCII}]+\\p{Punct}\\p{Punct}\\s*\\d+\\s";
this.terminators[12] = "RING\\s";
this.terminators[13] = "\\+CLIP:\\s*\\p{Punct}[\\p{ASCII}]*\\p{Punct}\\p{Punct}\\s*\\d+[\\p{ASCII}]*\\s";
this.unsolicitedResponses = new String[5];
this.unsolicitedResponses[0] = "+CMTI";
this.unsolicitedResponses[1] = "+CDSI";
this.unsolicitedResponses[2] = "RING";
this.unsolicitedResponses[3] = "+CLIP";
this.unsolicitedResponses[4] = "+CUSD";