Page 1 of 1

Unable to return CommandStatus.ESME_RINVSYSID with SMPP Server

Posted: Thu Feb 18, 2021 6:49 am
by AG70
Hello,

I am using version 2.9.4

on

Code: Select all

private async void _server_evClientBind(object sender, SmppServerClient client, Inetlab.SMPP.PDU.Bind data)
I am trying to return CommandStatus.ESME_RINVSYSID but still SMPP Server continue with Bind instead of stopping the bind and return ESME_RINVSYSID to client.

Code: Select all

if (objUser == null)
            {
                data.Response.Header.Status = CommandStatus.ESME_RINVSYSID; // Invalid System ID
                return;
            }
Thanks for any help,
AG

Re: Unable to return CommandStatus.ESME_RINVSYSID with SMPP Server

Posted: Thu Feb 18, 2021 3:16 pm
by alt
Hello Asaf,

When you use async method for void event handler the processing is finished on first await. I suppose you get the user with awaitable method. Library doesn't await for the completion of the async method. It will be implemented with Task events.

For now you need to set data.Response to null and send it manually when you need.
https://docs.inetlab.com/smpp/v2.9/arti ... onses.html

Re: Unable to return CommandStatus.ESME_RINVSYSID with SMPP Server

Posted: Thu Feb 18, 2021 4:48 pm
by AG70
Thanks you very much for your help.