خرید بک لینک

سلام من برای دریافت پیغام delivary report در رویداد message recevied کد زیر را نوشتم ولی با پیغام message service error 321 در دستور DecodedShortMessage msg = comm.ReadMessage(loc.Index, loc.Storage) مواجه شدم

private void comm_MessageReceived(object sender, GsmComm.GsmCommunication.MessageReceivedEventArgs e)
{

try
{

IMessageIndicationObject obj = e.IndicationObject;

//Get status report for this condition
if (obj is MemoryLocation)
{
MemoryLocation loc = (MemoryLocation)obj;
Output(string.Format("New message received in storage "{0}", index {1}.",
loc.Storage, loc.Index));
Output("");
DecodedShortMessage msg = comm.ReadMessage(loc.Index, loc.Storage);

if (((SmsPdu)msg.Data) is SmsStatusReportPdu)
{
SmsStatusReportPdu data = (SmsStatusReportPdu)msg.Data;
Output("rec msg ref #: " + data.MessageReference);
}
Output(msg.Status.ToString());

}

}

catch (Exception ex)
{
MessageBox.Show(ex.Message);
}

برچسب: نویسنده: محمد رضا جوادیان تاريخ: پنجشنبه 16 ارديبهشت 1395 ساعت: 19:57

صفحه بندی