Search code examples
c#socketssmppsourceforge

How to get SMPP Message Sent Confirmation



I have an in house SMPP server and I am using EASYSMPP from sourceforge.net to send the SMS. The problem here is that I am unable to get the exact status whether
1) Whether the request was even sent to Server,
2) If yes, what is the status of the message, means delivered or not.

I know that they have something something called as return message id but this is proving to be highly sporadic to me.
Few of the messages, I am getting (from the log) are:

1) A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied 2) An unknown, invalid, or unsupported option or level was specified in a getsockopt or setsockopt call 3) An established connection was aborted by the software in your host machine
4) Sometime I even get stuck at sentEvent.WaitOne(waitForResponse, true)

Any help is highly appreciated.


Solution

  • Spending hours of debugging and reading documentation, I found that in EASYSMPP, there is a byte type of variable "askforReciept" which helps you read the delivered message id.

    Also, related to connection issue, SMPPs are not meant to close and re-open the connection too frequently. In my scenario, I was closing the connection every time I finished sending a batch of SMS which was wrong and causing the connection issue. To check the connection status, you can use enquire link.

    Thanks for those who spent time getting me the solution of this.