Project

General

Profile

How To Use SMPP

Added by intellisense almost 9 years ago

I downloaded and tried 1.3 Release for SMPP, But I did not find any change . Can You please tell me Howto get advantage of SMPP in the release?


Replies (6)

RE: How To Use SMPP - Added by admin almost 9 years ago

Hi,

You need to have a SMPP account from a telco provider in order to use SMPP.

thanks

RE: How To Use SMPP - Added by lukin over 8 years ago

Hello,

I'm trying to use the SMPP gateway and would like to know when there is a successful connection to the SMPP server.
Using the SMMP Demo it says it always connects even though i set it to connect to a server that does not exists.

Does it connect in this line?
smppGateway.Bind();

I've checked the LastError porperty but it has no error.

Thank you.

RE: How To Use SMPP - Added by admin over 8 years ago

Hi,

This is a bug that needs to be fixed.

The SMPP gateway is asynchronous, and the error is returned in another event now.

You could do this to capture the error

// Get the gateway
smppGateway = messageGateway.Find(smppGatewayConfiguration);

// Bind error event handler
smppGateway.OnError += new ErrorEventHandler(smppGateway_OnError);

RE: How To Use SMPP - Added by lukin over 8 years ago

When will there be a version it the solution of the error?

RE: How To Use SMPP - Added by lukin over 8 years ago

I have few more questions:

- How to detect when to connection to the server is lost. I've registered to the OnClose event but it was not raised.
- When the connection is lost is there a way for the gateway to try to reconnect automatically

RE: How To Use SMPP - Added by admin over 8 years ago

Hi,

Please try with this version

For binding, it returns the status now

                // Now we bind
                if (smppGateway.Bind())
                {

                    // Bind the events                
                    smppGateway.OnDeliverSm += new DeliverSmEventHandler(smppGateway_OnDeliverSm);
                    smppGateway.OnAlert += new AlertEventHandler(smppGateway_OnAlert);
                    smppGateway.OnClose += new ClosingEventHandler(smppGateway_OnClose);

                    // You can bind additional events if you want

                    MessageBox.Show("Connected to gateway successfully", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                else
                {
                    MessageBox.Show(smppGateway.LastError.Message, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
                }

For sending PDU,

   if (!smppGateway.SendPdu(submitSm))
                    {
                        MessageBox.Show(smppGateway.LastError.Message, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }

If there is a connection error, it will retry for default 3 times. You can change it using config.RetryAfterSocketFailure

    (1-6/6)