Page 1 of 1

multiple connected SmppServerClient

Posted: Mon Feb 03, 2020 3:50 pm
by htinnyo
I have the following issue.

My smpp server/gateway allows a single account with multiple connection. So far connecting is not an issue but how can I keep track of delivery report

1. client A (with same systemid/pass) submits a message with messageId 123
2. client B (with same systemId/pass) submits a message with messageId 345
3. server has a delivery report ready for messageIs 123. then how the server get the correct client for that

I use

Code: Select all

_server.ConnectedClients.FirstOrDefault
for a client single connection but when a client with multiple connections how can I distinguish the clients.? any sessionId or any kind of identity in (SmppServerClient) object? Please help.

Re: multiple connected SmppServerClient

Posted: Mon Feb 03, 2020 4:23 pm
by htinnyo
I am a current subscriber, please help, thanks

Re: multiple connected SmppServerClient

Posted: Mon Feb 03, 2020 7:04 pm
by alt
Hi htinnyo,

I believe you can send delivery report to any SMPP client that connected as receiver or transceiver. If client cannot process your PDU, it sends non-OK status back. In this case you can try to send to the next session.

To distinguish the clients you can use RemoteEndPoint or LocalEndPoint property.

Re: multiple connected SmppServerClient

Posted: Tue Feb 04, 2020 12:17 am
by htinnyo
Thank you for your reply,I thought about it but the clients may have same IP address .remote ports are changing every time client disconnect and disconnect. I save the messages in db before DLR and I am looking for a way to send DLR even the client is disconnected and connected again.
if the clients are connected from different IP address , it is easy to distinguish using the way to suggested but since the clients may have same IP address and looking for some static identification of each client (like phone number/ source ) in SmppServerClient object. Any suggestion would be appreciated. Thank you

Re: multiple connected SmppServerClient

Posted: Tue Feb 04, 2020 7:10 am
by htinnyo
ok I ended up using remote endpoint. I have another issue as the following
Like in your sample code SmppServerSample.cs
1. client connect and bind
2. in bind even handler , server tried to send delivery messages that has not been delivered
3. but the client status is still Open not bound yet.
4. how long do I need to wait for the clients connect status to be Bound and ready to send dlr ?

Re: multiple connected SmppServerClient

Posted: Wed Feb 05, 2020 8:28 am
by htinnyo
Hi I have another issue another again.

Code: Select all

smppServerClient.RemoteEndPoint 
returns firewall IP address, anyway to get the oringinal ip of smpp client? Thanks in advance.

Re: multiple connected SmppServerClient

Posted: Fri Feb 07, 2020 4:47 pm
by alt
htinnyo wrote:
Tue Feb 04, 2020 7:10 am
1. client connect and bind
2. in bind even handler , server tried to send delivery messages that has not been delivered
3. but the client status is still Open not bound yet.
4. how long do I need to wait for the clients connect status to be Bound and ready to send dlr ?
You should decide to accept or reject the SMPP session in bind event handler. When you accept it and send BindResp with ESME_ROK back to client, the client status is changed to Bound when event handler method is finished.

When you are accepting the session you can start delivery message sending, if you want with small 1 second delay, to make sure that the client receives BindResp before first DeliverSm.
htinnyo wrote:
Wed Feb 05, 2020 8:28 am

Code: Select all

smppServerClient.RemoteEndPoint 
returns firewall IP address, anyway to get the oringinal ip of smpp client? Thanks in advance.

Inetlab.SMPP library supports Proxy Protocol. Please find out if it is applicable for you.