我正在开发一个向号码发送短信的应用程序。我正在为应用程序使用 GSMComm 库。
该程序从 SQL 数据库中获取详细信息,并且有一个特定的时间将其发送到该号码。
bool check;
do
{
detail = new string[3];
//Gets the Details from the database
detail = q.GetQueuePhone();
// the target time of sending the sms
int time = Convert.ToInt32(Convert.ToDateTime(detail[2]).TimeOfDay.TotalMilliseconds);
if (time != 0)
{
//time left
int Interval = time - Convert.ToInt32(DateTime.Now.TimeOfDay.TotalMilliseconds);
//Start counting
Thread.Sleep(Interval);
SmsSubmitPdu pdu;
//detail[1] have the Phone Number
pdu = new SmsSubmitPdu(TextMsg, detail[1]);
comm.SendMessage(pdu);
//sending on that number is done
q.UpdateCustomerStat(detail[0]);
}
else
{
//recheck the database again
check = true;
Thread.Sleep(30000);
}
} while (check);
当电话号码未收到程序发送的消息时,我的问题就开始了。
谁能帮我?
编辑:这是来自 GSMComm 的日志
Info 16:07:48.005 Sending message...
Info 16:07:50.091 Message sent successfully.
Info 16:07:48.015 [gsmphone] Activating PDU mode...
Verbose 16:07:48.016 [gsmphone] << AT+CMGF=0
Verbose 16:07:48.016 [gsmphone]
Verbose 16:07:48.033 [gsmphone] >>
Verbose 16:07:48.033 [gsmphone] OK
Verbose 16:07:48.033 [gsmphone]
Info 16:07:48.033 [gsmphone] Sending message...
Verbose 16:07:48.034 [gsmphone] << AT+CMGS=28
Verbose 16:07:48.034 [gsmphone]
Verbose 16:07:48.036 [gsmphone] >>
Verbose 16:07:48.036 [gsmphone] >
Verbose 16:07:48.036 [gsmphone] << 0011000C819051258225 30000A70F54747A0E4ACF416110BD3CA78700
Verbose 16:07:50.091 [gsmphone] >>
Verbose 16:07:50.091 [gsmphone]
Verbose 16:07:50.091 [gsmphone] +CMGS: 27
Verbose 16:07:50.091 [gsmphone]
Verbose 16:07:50.091 [gsmphone] OK
Verbose 16:07:50.091 [gsmphone]
Info 16:07:50.091 [gsmphone] 21 characters received after 2059 ms.
Info 16:07:50.091 [gsmphone] Message reference = 27