But for a single message, which is created on server_evClientSubmitSm, the above method works well.
Why does OnFullMessageReceived own messageID not work, while in server_evClientSubmitSm it works fine?
I am using InetLab.SMPP v2.9.12
Here is my code, saveMessage function returns id from database.
Code: Select all
private void OnFullMessageReceived(object sender, MessageEventHandlerArgs args)
{
Inetlab.SMPP.PDU.SubmitSm mySMSData = new Inetlab.SMPP.PDU.SubmitSm();
mySMSData = args.GetFirst<SubmitSm>();
string MobNo = mySMSData.DestinationAddress.Address;
string SMSContent = args.Text;
string SenderID = mySMSData.SourceAddress.Address;
string userID = mySMSData.Client.SystemID;
string IPAddr = IPAddress.Parse(((IPEndPoint)mySMSData.Client.RemoteEndPoint).Address.ToString()).ToString();
string msgID;
string status;
MessageState msgStatus;
CommandStatus ErrCode= CommandStatus.ESME_ROK;
if (mySMSData.Concatenation == null)
return;
msgID = saveMessage(userID, MobNo, SenderID, SMSContent, IPAddr);
msgStatus = MessageState.Accepted;
mySMSData.Response.MessageId = msgID
mySMSData.Response.Header.Status = CommandStatus.ESME_ROK;
ErrCode = CommandStatus.ESME_ROK;