multiple connected SmppServerClient

Post Reply
htinnyo
Posts: 6
Joined: Mon Feb 03, 2020 3:41 pm

multiple connected SmppServerClient

Post by htinnyo » Mon Feb 03, 2020 3:50 pm

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.
htinnyo
Posts: 6
Joined: Mon Feb 03, 2020 3:41 pm

Re: multiple connected SmppServerClient

Post by htinnyo » Mon Feb 03, 2020 4:23 pm

I am a current subscriber, please help, thanks
alt
Site Admin
Posts: 816
Joined: Tue Apr 25, 2006 9:45 am

Re: multiple connected SmppServerClient

Post by alt » Mon Feb 03, 2020 7:04 pm

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.
htinnyo
Posts: 6
Joined: Mon Feb 03, 2020 3:41 pm

Re: multiple connected SmppServerClient

Post by htinnyo » Tue Feb 04, 2020 12:17 am

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
htinnyo
Posts: 6
Joined: Mon Feb 03, 2020 3:41 pm

Re: multiple connected SmppServerClient

Post by htinnyo » Tue Feb 04, 2020 7:10 am

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 ?
htinnyo
Posts: 6
Joined: Mon Feb 03, 2020 3:41 pm

Re: multiple connected SmppServerClient

Post by htinnyo » Wed Feb 05, 2020 8:28 am

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.
alt
Site Admin
Posts: 816
Joined: Tue Apr 25, 2006 9:45 am

Re: multiple connected SmppServerClient

Post by alt » Fri Feb 07, 2020 4:47 pm

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.
Post Reply