Giter Club home page Giter Club logo

adhamawadhi / jamaasmpp Goto Github PK

View Code? Open in Web Editor NEW
43.0 10.0 35.0 212 KB

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.

Home Page: https://github.com/AdhamAwadhi/JamaaSMPP/wiki

License: Other

C# 95.61% Batchfile 0.04% PowerShell 2.59% Smalltalk 1.76%
smpp-protocol smpp smpp-client dotnet jamaa-smpp-client

jamaasmpp's People

Contributors

adhamawadhi avatar adhamebs avatar aneequaye avatar froque avatar isatishyadav avatar maximgl avatar robhop avatar tarekka avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jamaasmpp's Issues

PDU Time Out

Hi I am using JamaaSMPP from last few week I integrated this library with DB and it working fine on local machine , first I connect to client and send sms asynchronously ,I have written asyc and wait method which run every after 10 second and send sms with success.
But while hosting this on server I am getting pdu send and receive time out error.
also getting very less TFS on server I have AWS 64 bit windows server with 8 GB ram

Kindly help

Concatenated Messages get merged when using BeginSendMessage, and UCS2 encoding.

Hi Adham,
I've been using JamaaSmpp for the past nine months and lately, we've encountered a very abnormal problem. When sending large messages(more than 2 PDUs) asynchronously using BeginSendMessage, sometimes the messages get merged and the user gets only one message which is a combination of the two sent messages. The final message has the exact number of characters of one of the messages but the content is neither one of them.
P.S: It's worth mentioning that I send nearly 500 PDUs every second in rush hours.
I appreciate it if you can help me with this issue. Many thanks.

Arabic text problem

Hello,

When I send Arabic text, I receive some sort of Chinese letters in mobile, I have tried it with all different Encoding types it has and with every Encoding I have received some strange letters and not the Arabic text I intended to send.

Sending 160+ Characters Long

Hi, would like to ask for some help. I am pretty new to SMPP is it possible to send a message that is longer that 160 Character. I've been trying to read through the Wiki but can't seem to find articles/documents regarding this. Any help is appreciated. Thanks.

Binding only as transmitter or receiver

Hello Adham,

Is it possible to bind only as Transmitter or Receiver? I know it is possible to bind using separate connections by using version 3.4 but that way it creates two separate connections at the same time. In my case I have two separate hosts for transmitter and receiver. In order to handle this I extended SmppClass like this, which forced me to change some fields to protected:

    public class PJSmppClient : SmppClient
    {
	private ClientType type;

	public PJSmppClient(ClientType type) : base()
	{
		this.type = type;
	}

	protected override void OpenSession(SessionBindInfo bindInfo, bool useSeparateConnections, int timeOut)
	{
		ChangeState(SmppConnectionState.Connecting);

		if (type == ClientType.Receiver)
		{
			//
		}
		else
		{
			//
		}
		ChangeState(SmppConnectionState.Connected);
	}
}

public enum ClientType
{
	Transmitter,
	Receiver
}

Nuget Package

It seems like the Nuget package is quite out of date?

Any chance it can be updated to the latest version?

SendPdu - Thread Aborted error - Please help.

Hi Adham,

I am sending acknowledgement of receipt of message delivery notification using following code, inside client_MessageDelivered event:

PDUHeader header = new PDUHeader(CommandType.DeliverSmResp, seqNumber, SmppErrorCode.ESME_ROK, (uint)seqNumber.ToString().Length);
DeliverSm ackPDU = new DeliverSm(header, client.SmppEncodingService);
var resp = client.SendPdu(ackPDU, 0);

But I am getting thread aborted error at client.SendPdu(ackPDU, 0);

Following is the stack trace, please let me know if i am doing it all wrong or what:

at System.Threading.WaitHandle.WaitOneNative(SafeHandle waitableSafeHandle, UInt32 millisecondsTimeout, Boolean hasThreadAffinity, Boolean exitContext)
at System.Threading.WaitHandle.InternalWaitOne(SafeHandle waitableSafeHandle, Int64 millisecondsTimeout, Boolean hasThreadAffinity, Boolean exitContext)
at System.Threading.WaitHandle.WaitOne(Int32 millisecondsTimeout, Boolean exitContext)
at JamaaTech.Smpp.Net.Lib.PDUWaitContext.WaitForAlert() in D:\Work\My\JamaaSMPP\JamaaTech.SMPP.Net.Lib\PDUWaitContext.cs:line 57
at JamaaTech.Smpp.Net.Lib.ResponseHandler.WaitResponse(RequestPDU pdu, Int32 timeOut) in D:\Work\My\JamaaSMPP\JamaaTech.SMPP.Net.Lib\ResponseHandler.cs:line 97
at JamaaTech.Smpp.Net.Lib.SmppClientSession.SendPdu(RequestPDU pdu, Int32 timeout) in D:\Work\My\JamaaSMPP\JamaaTech.SMPP.Net.Lib\SmppClientSession.cs:line 172
at JamaaTech.Smpp.Net.Client.SmppClient.SendPdu(RequestPDU pdu, Int32 timeout) in D:\Work\My\JamaaSMPP\JamaaTech.Smpp.Net.Client\SmppClient.cs:line 216
at SSD.SMPPLib.SMPPClass.client_MessageDelivered(Object sender, MessageEventArgs e) in C:\Source\SSD.SMPPLib31Oct2018\SSD.SMPPLib\SSD.SMPPLib\SMPPClass.cs:line 487

.Net Core Issues

The API breaks on .NET core. I believe it has something to do with BeginInvoke

Unhandled exception. System.PlatformNotSupportedException: Operation is not supported on this platform.
   at JamaaTech.Smpp.Net.Lib.PduProcessorCallback.BeginInvoke(RequestPDU pdu, AsyncCallback callback, Object object)
   at JamaaTech.Smpp.Net.Lib.StreamParser.RunNow()

Message more than 160 issue with Async feature

Hi,
I am facing issue while i am trying to send a long message using async feature.
I am able to send same long message using sync feature.
Please find the following code for your reference.
Please help. I am stuck.

Thanks,
Poonam

///


/// Sends SMS asynchronously
///

public void SendSMSAsync()
{
TextMessage msg = new TextMessage();
msg.DestinationAddress = Settings.Default.SampleDestinationAddress;
msg.SourceAddress = Settings.Default.SampleSourceAddress;
msg.Text = Settings.Default.SampleMessageLong;
msg.RegisterDeliveryNotification = Settings.Default.RegisterDeliveryNotification;

        SmppClient client = GetSmppClient();
        if (client.ConnectionState != SmppConnectionState.Connected) client.ForceConnect(5000);
        if (client.ConnectionState == SmppConnectionState.Connected)
            client.BeginSendMessage(msg, SendMessageCompleteCallback, client);            
    }

JamaaTech.Smpp.Net.Lib.Util.SMSCDefaultEncoding Exception

Im trying to send sms with my gateway 2N VoiceBlue Next , using default SMSC encoding not working, using any other enconding the message is dispatched but rejected by the Celullar Network. Seems like something is wrong in my code. I suspect about enconding but cant use SMSCDefault.
Using 1.5.2 version of your library.

        SmppClient client = new SmppClient();
      try
        {
            SmppConnectionProperties properties = client.Properties;
            properties.SystemID = systemId;
            properties.Password = password;
            properties.Port = port;
            properties.Host = server;
           properties.AddressNpi = JamaaTech.Smpp.Net.Lib.NumberingPlanIndicator.Unknown;
            properties.AddressTon = JamaaTech.Smpp.Net.Lib.TypeOfNumber.Unknown;
           properties.DefaultEncoding = JamaaTech.Smpp.Net.Lib.DataCoding.SMSCDefault;
           client.AutoReconnectDelay = 3000;
            client.KeepAliveInterval = 15000;
            client.Start();

            if (client.ConnectionState != SmppConnectionState.Connected) client.ForceConnect(5000);

           TextMessage msg = new TextMessage();
            msg.DestinationAddress = recipient;
            msg.Text = text;
            msg.RegisterDeliveryNotification = false;                
            if (client != null)
            {
                client.SendMessage(msg);    <---------- exception here with SMSCDefault
                client.Shutdown();
            }

exception when delivery for MT service

When sending using mobile terminate number(when billing is done on reciever) unhandled exception occurs when the receiver doesn't have balance? This exception doesn't occur when delivery report is off any idea? Help please

SmppErrorCode 1024 ?

Hi,

I'm trying to send an SMS to an international (+44) number (we're in South Africa), according to the logs we're getting a SmppException with an ErrorCode property that reports a 'ToString()' value of 1024. This is obviously not in the Enum for SmppErrorCode.

Any Ideas?

Regards,

TcpIpSession.RaiseSessionClosedEvent throw System.NullReferenceException

Lately I got this error too much, not sure why still investagating

Type: System.NullReferenceException
Message: Object reference not set to an instance of an object.
Source: JamaaTech.Smpp.Net.Lib
Stack Trace:

   at JamaaTech.Smpp.Net.Lib.Networking.TcpIpSession.RaiseSessionClosedEvent(SessionCloseReason reason, Exception ex)
   at JamaaTech.Smpp.Net.Lib.Networking.TcpIpSession.TerminateSession(SessionCloseReason reason, Exception exception)
   at JamaaTech.Smpp.Net.Lib.Networking.TcpIpSession.Receive(Byte[] buffer, Int32 start, Int32 length)
   at JamaaTech.Smpp.Net.Lib.StreamParser.WaitBytes(Int32 length)
   at JamaaTech.Smpp.Net.Lib.StreamParser.WaitPDU()
   at JamaaTech.Smpp.Net.Lib.StreamParser.RunNow()
   at JamaaTech.Smpp.Net.Lib.Util.RunningComponent.ThreadCallback()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

Receive all SMS in all instances of my SMPP client

Hello, receive a cordial greeting.

Implemented a smpp client as shown below:

public static SmppClient GetSmppClient()
{
    var client = new SmppClient();

    SmppConnectionProperties properties = client.Properties;
    properties.SystemID = "MyID";
    properties.Password = "MyPassword";
    properties.Port = 1234;
    properties.Host = "MyHost";
    properties.SystemType = "smpp";
    properties.DefaultServiceType = "smpp";
    properties.SourceAddress = "6015";
    properties.InterfaceVersion = InterfaceVersion.v34;
    properties.DefaultEncoding = DataCoding.SMSCDefault;
    properties.AddressNpi = NumberingPlanIndicator.ISDN;
    properties.AddressTon = TypeOfNumber.International;

    client.AutoReconnectDelay = 30000;
    client.KeepAliveInterval = 15000;

    return client;
}

private void listenMessageReceived()
{
    client = GetSmppClient();
    client.ConnectionStateChanged += connectionStateChanged;

    if (!client.Started)
    {
        client.ForceConnect();
        client.Start();
    }

    client.MessageReceived += messageReceived;
}

private void messageReceived(object sender, MessageEventArgs e)
{
    TextMessage msg = e.ShortMessage as TextMessage;
    SetSMSDataGridView(DateTime.Now, msg.SourceAddress, msg.DestinationAddress, msg.Text);
}

public void SetSMSDataGridView(DateTime date, string sourceAddress, string destinationAddress, string text)
{
    this.dgvSMS.Rows.Insert(0, date, sourceAddress, destinationAddress, text);
}

The problem is that when I run multiple instances of my program, all SMS are not received in all instances.

As you can see below:

Sin título

Both instances of the program are running at the same time, but the SMS they receive are different.

Thanks for your help.

Invalid parameter length Error Received By SMS Service Provider

I am using Jamaa Library 1.5.3 and using below code for sending SMS
TextMessage msg = new TextMessage
{
DestinationAddress = smsDetails.ToMobile,
SourceAddress = smppConfig.SourceAddress,
Text = smsDetails.Message,
RegisterDeliveryNotification = true,
//UserMessageReference = smsDetails.RequestId.ToString()
};
clientSMPP.SendMessage(msg);

Here I commented UserMessageReference as Service Provider doesn't support TLV ...When we send few Messages , SMS getting delivered successfully but when we send messages continuously around 10 nos./sec, Service Provider receives below error ....
Invalid parameter length:[105] max:[20] safe_value:[ABC FAILURE ALERT(Ge] '
Invalid parameter length:[102] max:[16] safe_value:[ FAILURE ALERT(G]

Kindly let me know what could be reason for this error ...................

'+' prefix when SMS is received on the mobile phone

Hi Adham,

the source address that I use which is 2345 appears in international number format with a '+' prefix when SMS is received on the mobile phone i.e as +2345. I want the source address(sender) to appear as 2345 only, without the '+' sign. What should I do?

Arabic Messages

What are the proper Encoding to get Arabic messages correctly? Because I tried ASCII, SMSCDefault, Latin_Hebrew and UCS2 are not working well, it always appears like "????????".

UserMessageReference length

Hello Adham,

I came across a strange behaviour in JamaaSMPP.
According to the SMPP 3.4 spec, the user_message_reference TLV can only be 2 bytes long:
http://docs.nimta.com/SMPP_v3_4_Issue1_2.pdf

image

However, JamaaSMPP allows a string of arbitrary length to be passed and also adds an extra zero byte at the end:
https://github.com/AdhamAwadhi/JamaaSMPP/blob/master/JamaaTech.Smpp.Net.Client/TextMessage.cs#L70

My provider does not accept such a message and throws the ESME_RINVPARLEN error.
Sending a message using only a single byte ID works as expected, but this is a hack and cannot be deployed to production.

Why does it work like that? Is there any fix or a workaround?

Sequence Number is not incremented when sending large SMS

For all the segments of an SMS longer than 140 chars, the sequence number is the same.
It should not be.
For some SMSC, the connection is rejected and re-binded and the SMS is not fully sent.
It could give an Null Exception ins some case.

image

I forked the project to make fix the bug, do you want me to create a pull request ?

Combining UDH Message

Do you have sample code that combine the UDH message/concatenated message in submit_sm.

Problem with split message : Throttiling error (ESME Exceded allowed message limits)

When the message is longer and the library split the message.
The speed at which consecutive parts are sent is so high that server limitations jump.
I have temporarily fixed it by putting a delay of 100ms between each part send.

SmppClient - SendMessage

` foreach (SendSmPDU pdu in message.GetMessagePDUs(vProperties.DefaultEncoding, vSmppEncodingService))

        {
            ResponsePDU resp = SendPdu(pdu, timeOut);
            var submitSmResp = resp as SubmitSmResp;
            if (submitSmResp != null)
            {
                messageId = ((SubmitSmResp)resp).MessageID;
            }
            message.ReceiptedMessageId = messageId;
            RaiseMessageSentEvent(message);
            Thread.Sleep(100);
        }`

Is there another solution to this problem?

SMS with 160+ characters being received in the wrong order

Hi,

I'm trying to send a SMS with more than 160 characters, but it doesn't work properly when I test the message below:

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla ut commodo lorem, eget molestie velit. Etiam mollis ex ac dignissim pharetra. Curabitur at mauris semper, dapibus erat sed, tempus sapien. Proin sem dui, elementum sed convallis non, porttitor quis nisl. Mauris id eros vestibulum, bibendum diam id, gravida ipsum. Nulla rutrum purus non nisi viverra, nec egestas massa ornare. Donec tempus blandit ultricies. Nullam feugiat luctus porta. Nam efficitur id ante nec dictum. Suspendisse potenti. Suspendisse potenti. Nam hendrerit non.

Return:

citur id ante nec dictum. Suspendisse potenti. Suspendisse potenti. Nam hendrerit non.

m id, gravida ipsum. Nulla rutrum purus non nisi viverra, nec egestas massa ornare. Donec tempus blandit ultricies. Nullam feugiat luctus porta. Nam effi

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla ut commodo lorem, eget molestie velit. Etiam mollis ex ac dignissim pharetra. Curabitur at

mauris semper, dapibus erat sed, tempus sapien. Proin sem dui, elementum sed convallis non, porttitor quis nisl. Mauris id eros vestibulum, bibendum dia

As we can see, I received it in the following order: 4 - 3 - 1 - 2.

I already read about payload parameters in another NuGet packages, but I didn't found anything about this in JamaaSMPP documentation yet.

Is there a parameter that I can use to send this SMS in the correct order? Is there a way to send it in only one SMS?

My code:

    Private Sub btnConectar_Click(sender As Object, e As EventArgs) Handles btnConectar.Click

        Dim msg As TextMessage = New TextMessage()
        msg.DestinationAddress = "5511981000000"
        msg.SourceAddress = "5511981000000"
        msg.Text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla ut commodo lorem, eget molestie velit. Etiam mollis ex ac dignissim pharetra. Curabitur at mauris semper, dapibus erat sed, tempus sapien. Proin sem dui, elementum sed convallis non, porttitor quis nisl. Mauris id eros vestibulum, bibendum diam id, gravida ipsum. Nulla rutrum purus non nisi viverra, nec egestas massa ornare. Donec tempus blandit ultricies. Nullam feugiat luctus porta. Nam efficitur id ante nec dictum. Suspendisse potenti. Suspendisse potenti. Nam hendrerit non."
        msg.RegisterDeliveryNotification = True

        Dim client As SmppClient = New SmppClient()

        Dim properties As SmppConnectionProperties = client.Properties
        properties.Host = "40.200.199.1"
        properties.Port = 9500
        properties.SystemID = "user"
        properties.Password = "pass"
        properties.SystemType = ""
        properties.DefaultServiceType = "CMT"
        client.AutoReconnectDelay = 3000
        client.KeepAliveInterval = 15000
        client.Start()

        If client.ConnectionState <> SmppConnectionState.Connected Then client.ForceConnect(5000)

        Try
            client.SendMessage(msg, 15000)
            MessageBox.Show("Return: " & msg.ReceiptedMessageId)
        Catch ex As Exception
            txtResult.Text = ex.Message
        End Try

    End Sub

Thanks,
Victor.

Acknowledgement needs to go from ESME to the SMSC

Hi Adham,

I have created following acknowledgement which needs to be sent from my ESME to the SMSC.

var encSrv = new SmppEncodingService();
PDUHeader pduheader = new PDUHeader(CommandType.DeliverSmResp, (uint)e.ShortMessage.SequenceNumber, SmppErrorCode.ESME_ROK);
var pdu = PDU.CreatePDU(pduheader, encSrv);

Can you please tell me how can I send this pdu from my ESME to the SMSC now.

Thanks,
Poonam

Sending Bulk SMS

We are using your JamaaSMPP library in one of our projects and it is really useful and helpful. Could you please clarify the below query?

  1. Does the library supports bulk SMS, meaning can we send multiple mobile numbers at the same time with some delimiter?
  2. If yes, could you please let us know how this can be achieved.

When we try to send the list of mobile numbers, we get below Error code

at JamaaTech.Smpp.Net.Client.SmppClient.SendPdu(RequestPDU pdu, Int32 timeout) in D:\Work\My\JamaaSMPP\JamaaTech.Smpp.Net.Client\SmppClient.cs:line 218
at JamaaTech.Smpp.Net.Client.SmppClient.SendMessage(ShortMessage message, Int32 timeOut) in D:\Work\My\JamaaSMPP\JamaaTech.Smpp.Net.Client\SmppClient.cs:line 19
and smppEx.ErrorCode - 1078

Regards,
Sasanka M

Long SMS > 160 not received properly

We get multiple improper message at mobile while sending long message. As if UDH is sent the ESMClass is not set properly. Its 0x40 but in SMPP v34 definition it shows 7th bit to be 1 i.e. 0x64. correct me if i am wrong. Even changing the values, i get no luck.

Change Encoding on SmppConfiguration

When the Encoding value is set to UCS2 and the message is more than 70 characters, it uses a fixed value of 67 to split the messages. How can I set my default value? Actually, my values are different from the default value.

ESME_RINVBNDSTS exception

I am using this library from last one year but in SYNC mode only. but now to increase sending speed i now using aync mode for message sending and it works normally. but when there are large push to send then suddenly start getting ESME_RINVBNDSTS exception and then it close the session. and because of this my many messages where droppped or getting multiple client_MessageSent event called. I have almost tried to solve it from last 4 days but still not resolved. For your reference i am connecting provider by Transceiver.

.NET Core

Please,

is there any plans in near future for .NET Core version of JamaaSMPP?

Thanks

Missing Source address TON setting

Some providers require the Source Address Type of Number Specified.
This is in case you are sending an SMS from an Alphanumeric source address:

I was hopping that this could be included in SmppConnectionProperties

SmppConnectionProperties

Right now we get an exception from our provider (MTN Swaziland) if we do not specify the Source Address Type of Number for Alphanumeric source addresses.

sent and delivered events fired for same sms multiple times

I am facing another issue now. I am getting sent and delivered events fired for same sms multiple times.
How can I stop that? How to tell the server that i have got it and please stop duplicating now.

Please help.

Thanks a lot,
Poonam

Improvements for the error logging

When a bind fails to connect, the isn't much information given by the library. It would be nice if more information about the failure reason could be included in connection state changed event.

ESME_RINVSRCADR When not setting Source Address

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.

DeliverSmResp example

Hi,

Please provide me an example for creating DeliverSmResp or Deliver_Sm_Resp and sending it to the server as a response.

Thanks,
Poonam

new TLV parameter in submit_sm

image

As per new govt norms we need to pass new two TLV parameter in submit_sm request, can any one help me to do it.
I have attached this parameter here.

Delivery event not fire

I have set registerdeliverynotification = true and attached messagedlvred event handler. But not event fired,

Does client.start() keeps on checking deliversm pdu or thers something i m missing.

Hosted SMppClient on static variable in .net web application and calling sendmessage asychronously, even 500 msgs get sent and those received on mobile but no delivery event is fired.

NULL Reference Exception on Continual Connection Error

Hi,
If you enter the wrong SMPP details or there are continual connection issues, eventually (usually within 10 minutes) you get an exception that crashes the entire application (no just the SMPP client) as we have everything wrapped around a Try / Catch Block and the exception does not get thrown back to the calling method.

Source is JamaaTech.Smpp.Net.Lib

The exception Stack Trace is as follows:-

at JamaaTech.Smpp.Net.Lib.StreamParser.RaiseParserExceptionEvent(Exception exception)
at JamaaTech.Smpp.Net.Lib.StreamParser.HandleException(Exception ex)
at JamaaTech.Smpp.Net.Lib.StreamParser.WaitPDU()
at JamaaTech.Smpp.Net.Lib.StreamParser.RunNow()
at JamaaTech.Smpp.Net.Lib.Util.RunningComponent.ThreadCallback()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

And Excedption Details:-

System.NullReferenceException was unhandled
HResult=-2147467261
Message=Object reference not set to an instance of an object.
Source=JamaaTech.Smpp.Net.Lib
StackTrace:
at JamaaTech.Smpp.Net.Lib.StreamParser.RaiseParserExceptionEvent(Exception exception)
at JamaaTech.Smpp.Net.Lib.StreamParser.HandleException(Exception ex)
at JamaaTech.Smpp.Net.Lib.StreamParser.WaitPDU()
at JamaaTech.Smpp.Net.Lib.StreamParser.RunNow()
at JamaaTech.Smpp.Net.Lib.Util.RunningComponent.ThreadCallback()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:

Thanks,

Daniel.

Message received and message delivered message_payload PDU/TLV access

We have an issue with a carrier who isn't using the standard sm_length and short_message parameters, instead opting to put message data in the optional TLV parameter message_payload.

Is there a standard way to access the received PDU to get the optional parameter? PduReceivedEventHander is not overridable.

Invalid parameter length when setting UserMessageReference

Whenever I set the UserMessageReference I receive an Invalid Parameter Length exception. It doesn't matter which version of the library I am using or which telecom operator I am connecting to. I have tried this with 3 telecom operators and in all of them I receive this error. I also tried to change the format of the UserMessageReference but It also doesn't make any difference.

Here is the raw capture of the TCP stream of Submit_SM command.

00000010000000150000000000000006
00000010800000150000000000000006
000000430000000400000000000000070001013531320001013933373030323235333735000000000000010008000c54657374204d6573736167650204000431303000
0000001080000004000000c200000007
00000010000000150000000000000008
00000010800000150000000000000008
TextMessage msg = new TextMessage();
msg.DestinationAddress = $"93{subscriber.Number}";
msg.SourceAddress = smppConfig.SourceAddress;
msg.Text = message;
msg.UserMessageReference = sms.ReferenceId;
msg.RegisterDeliveryNotification = true;
client.SendMessage(msg);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.