Page 1 of 1

SubmitMultiMessage exception occured

Posted: Tue Dec 01, 2020 2:08 pm
by santronix
Single message sent successfully . For multi message below exception is occured.
Unable to cast object of type 'Inetlab.SMPP.PDU.GenericNack' to type 'Inetlab.SMPP.PDU.SubmitMultiResp'. at await _client.SubmitAsync

List<IAddress> destList = new List<IAddress>();
destList.Add(new SmeAddress("1234567890", AddressTON.Unknown, AddressNPI.ISDN));
destList.Add(new SmeAddress("1234567890", AddressTON.Unknown, AddressNPI.ISDN));

IList<SubmitMultiResp> resp = await _client.SubmitAsync(SMS.ForSubmitMulti()
.ServiceType("")
.Text("Multi Message")
.From(sourceAddress)
.ToDestinations(destList)
);

Re: SubmitMultiMessage exception occured

Posted: Tue Dec 01, 2020 8:02 pm
by alt
Most likely this means that your provider doesn't support SubmitMulti PDU. Please ask the provider.

Anyway I need to check the cast issue in the library.

Re: SubmitMultiMessage exception occured

Posted: Tue Dec 01, 2020 9:01 pm
by alt
The cast issue is fixed. Please test with version 2.9.0-beta-2222.

Re: SubmitMultiMessage exception occured

Posted: Wed Dec 02, 2020 6:57 am
by santronix
Installed Version 2.9.0-beta-2222
But occured another Exception at same line
Invalid or unknown command response received. GenericNack, Status: ESME_ROK, Sequence

IList<SubmitMultiResp> resp = await _client.SubmitAsync(SMS.ForSubmitMulti()
.ServiceType("")
.Text("Multi Message")
.From(sourceAddress)
.ToDestinations(destList)
);

Re: SubmitMultiMessage exception occured

Posted: Wed Dec 02, 2020 11:17 am
by alt
When remote side sends GENERIC_NACK response it means the command/request you send is invalid or unknown. This is exceptional case.
As I said above you need to ask your SMPP provider about SubmitMulti support.