Process MO(Short messages and long messages) and DLRs in two different open sessions

Post Reply
cajimenez
Posts: 5
Joined: Thu Jan 28, 2021 11:32 pm

Process MO(Short messages and long messages) and DLRs in two different open sessions

Post by cajimenez » Fri Jan 29, 2021 12:13 am

Is it possible to have to have two different open sessions on ESME for MO(receiver), but process the DLRs in a specific session and the MO(short and long messages) in the other session? What is the best approach to do that?

details

The open session are using same credentials for Bind Receiver. The SMPP server only support 2 open connections for receiver and 2 for transmitter.

The scenario is basically, this ESME client are going to send thousand's of messages and the users are going to replay back those messages, so the ESME client are going to receive a lot of traffic for long and short messages and DLR's. The idea is try to avoid any kind of delay during this process because the traffic.


Regards,
Carlos
alt
Site Admin
Posts: 985
Joined: Tue Apr 25, 2006 9:45 am

Re: Process MO(Short messages and long messages) and DLRs in two different open sessions

Post by alt » Fri Jan 29, 2021 5:30 pm

It depends on how the SMPP provider implements message routing. Sometimes you need to bind with specific SystemType. f.i. Bind Receiver with SystemType="DLR" receives only delivery receipts.
cajimenez
Posts: 5
Joined: Thu Jan 28, 2021 11:32 pm

Re: Process MO(Short messages and long messages) and DLRs in two different open sessions

Post by cajimenez » Mon Feb 01, 2021 2:51 pm

Is there any way to receive DLRs and MO's on different events in the Client site, rather than receiving both under the same event "OnDeliverSm"?
alt
Site Admin
Posts: 985
Joined: Tue Apr 25, 2006 9:45 am

Re: Process MO(Short messages and long messages) and DLRs in two different open sessions

Post by alt » Mon Feb 01, 2021 7:07 pm

You can call different handlers from evDeliverSm event handler.

Code: Select all

private void OnDeliverSm(object sender, DeliverSm data)
{
    SmppClient client = sender as SmppClient;
    if (data.MessageType == MessageTypes.SMSCDeliveryReceipt)
    {
        OnDeliveryReceipt(client , data);
    } else {
        OnMessage(client , data);
    }
}
cajimenez
Posts: 5
Joined: Thu Jan 28, 2021 11:32 pm

Re: Process MO(Short messages and long messages) and DLRs in two different open sessions

Post by cajimenez » Wed Feb 03, 2021 9:05 pm

thanks for your response. Yo mentioned the following :
"Sometimes you need to bind with specific SystemType. f.i. Bind Receiver with SystemType="DLR" receives only delivery receipts."

I have been trying to do that but it is not working. Do you have a sample code to do that?

My code sample:

_smppClient.SystemType = "DLR";
BindResp bindResponse = await _smppClient.BindAsync(smppConfiguration.SystemID, password, ConnectionMode.Receiver);


Response:

bindResponse.Header.Status = ESME_RINVSYSTYP


Regards,
Carlos
alt
Site Admin
Posts: 985
Joined: Tue Apr 25, 2006 9:45 am

Re: Process MO(Short messages and long messages) and DLRs in two different open sessions

Post by alt » Wed Feb 03, 2021 9:17 pm

You need to ask SMPP Provider, how they handle this case. I just told you what is possible in terms of the SMPP protocol.
Post Reply