User Tools

Site Tools


If I use SendAsync(), how do I know which DR should be matched with each sent SMS?

SubmitSmResp can be processed in evSubmitCompleted event handler, where you know sequence number from SubmitSm and you get MessageId for future Delivery receipt.

To send long SMS, is it handled internally (split into multiple part-SMS) in you code or must I handle UDH manually?

Text will be split automatically when you use SMS builders. Following example covers most usage scenarios

     .Text("Test Test Test Test Test Test Test Test Test Test")

FlashSMS, must I set this using DataCoding or do you have a Property I have not yet found?

In order to send Flash SMS you need to specify one of the following data coding in the SubmitSm class: DataCoding.UnicodeFlashSMS, DataCoding.DefaultFlashSMS

How do I get hold of the sequence number, when doing Client.SubmitAsync()

SMS Builder has Create method that returns SubmitSm list with already assigned sequence numbers. Then you can pass this list to SubmitAsync.

How to handle Throttling error from SMSC

SMSC can limit number of submitted PDU for SMPP account. When allowed message limit exceeded, server returns status ESME_RTHROTTLED. To avoid throttling error you can specify number of messages per second in SmppClient. For this purpose you can set property SmppClientBase.SendSpeedLimit

//Send 10 messages per second
client.SendSpeedLimit = 10;
//Send 1 message every 5 seconds
client.SendSpeedLimit = 1f/5f;

Example: Read messages from database and send them as fast as possible

var messageList = _query.GetUnsentMessages();
foreach (var message in messageList)
    var pduBuilder = SMS.ForSubmit()
    foreach (var pdu in pduBuilder.Create(_client))
        _repository.StoreSequenceNumber(message.Id, pdu.Sequence);

How to create SubmitMulti PDUs for multiply receivers

var pduBuilder = SMS.ForSubmitMulti()
foreach (string phoneNumber in message.PhoneNumbers) {
IList<SubmitMulti> pduList = pduBuilder.Create(_client);

Page Tools