Page 1 of 1

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

Posted: Fri Jan 29, 2021 12:13 am
by cajimenez
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

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

Posted: Fri Jan 29, 2021 5:30 pm
by alt
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.

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

Posted: Mon Feb 01, 2021 2:51 pm
by cajimenez
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"?

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

Posted: Mon Feb 01, 2021 7:07 pm
by alt
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);
    }
}

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

Posted: Wed Feb 03, 2021 9:05 pm
by cajimenez
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

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

Posted: Wed Feb 03, 2021 9:17 pm
by alt
You need to ask SMPP Provider, how they handle this case. I just told you what is possible in terms of the SMPP protocol.