AdhamAwadhi / JamaaSMPP

Jamaa SMPP Client is a .NET implementation of the SMPP protocol that focuses on providing an easy-to-use and robust SMPP client library for .NET developers. This project is intended to be used by developers who want to integrate SMS functionalities in their applications as well as students who are learning the SMPP protocol.
https://github.com/AdhamAwadhi/JamaaSMPP/wiki
Other
43 stars 36 forks source link

ESME_RINVSRCADR When not setting Source Address #44

Open danielckelly opened 3 years ago

danielckelly commented 3 years ago

The SMPP Service we use allows not setting the Source Address on the message and they use the default attached to the account.

I have confirmed this works using another SMPP Client Demo program

When I try to do the same, I get an Invalid Source Address error

Exception of type 'JamaaTech.Smpp.Net.Lib.SmppException' was thrown.

Error Code is : ESME_RINVSRCADR

If I replace the source address with the Mobile number, it works perfectly.

Below is the code to create the message.

TextMessage msg = new TextMessage(); msg.DestinationAddress = mobileNumber; msg.SourceAddress = ""; //msg.SourceAddress = "Entering Number Here works fine"; msg.Text = call.LongMessage; msg.RegisterDeliveryNotification = false;

is there a reason why the exception is being thrown when no source?

Thanks, Daniel.