How to use Submit Multi method?

Smpp v3.4 client

Moderator: alt

araxno
Posts: 21
Joined: Thu Jul 30, 2009 12:35 pm

How to use Submit Multi method?

Post by araxno »

Hi everyone
I submit messages with SubmitAsync(sms) method.I have thread and inside while(true) I get top 20 messages from database and submit them but thread sleeps 1 second in every submit.So Is there any way to submit all messages at once?I heard there is some method as Submit_Multi and I don't know how to use it.
Any help would be appreciated.Thanks
alt
Site Admin
Posts: 992
Joined: Tue Apr 25, 2006 9:45 am

Post by alt »

Hi araxno,

SubmitMulti is good when you need to send the same message to several destination addresses. But it is not implemented yet in ALT.SMS.SmppClient. Expected in next version.

Can you show your code how you send messages?
lenchnikin
Posts: 1
Joined: Fri Aug 21, 2009 10:13 pm
Location: Russia

How to use Submit Multi method

Post by lenchnikin »

Dear All Im a new user and still no idea how it will be work i mean i have add some pics but i dont know my pictures can see others. many thanks
Surangaj
araxno
Posts: 21
Joined: Thu Jul 30, 2009 12:35 pm

Post by araxno »

Hi alt;
I mentioned that I have used SubmitAsync(sms) method.First I'm defining SubmitSm and SubmitSm[]. I put every SubmitSm to array with null message contents.Last in foreach I set array's short message and SubmitAsync(Submit[] sm).

And here I have questions;
1.Is Submit Multi implemented last version(9/9/2009)?
2.In one go Does a Submit Multi counts as 1 tps on SMSC side?

Regards,

Gökay Kaya
alt
Site Admin
Posts: 992
Joined: Tue Apr 25, 2006 9:45 am

Post by alt »

1. This version does not have Submit Multi yet.
2. I think you have to ask SMSC whether they one SubmitMulti is multiplied by number of destinations when charge you.
araxno
Posts: 21
Joined: Thu Jul 30, 2009 12:35 pm

Post by araxno »

I'm waiting impatiently :D And you are doing great.Thanks
alt
Site Admin
Posts: 992
Joined: Tue Apr 25, 2006 9:45 am

Post by alt »

I have added SubmitMulti functionality in version 2.7.0.
Please test it.
araxno
Posts: 21
Joined: Thu Jul 30, 2009 12:35 pm

Post by araxno »

Hi alt,

Firstly Thanks for SubmitMulti,

Also Can I use PrepareSubmit function seperately?Because I usually submit long sms.
alt
Site Admin
Posts: 992
Joined: Tue Apr 25, 2006 9:45 am

Post by alt »

Yes, you can use method

public List<SubmitMulti> PrepareSubmit(SubmitMode mode,
byte srcTon, byte srcNpi, string srcAddr,
List<DestinationAddress> destList,
DataCodings dataCoding,
string Text);
araxno
Posts: 21
Joined: Thu Jul 30, 2009 12:35 pm

Post by araxno »

Is there any sample code about SubmitMulti?
Does Submit Multi means a SubmitSm in List<SubmitMulti>?

I mean Should I define SubmitMulti as List<SubmitMulti>?

Thanks
alt
Site Admin
Posts: 992
Joined: Tue Apr 25, 2006 9:45 am

Post by alt »

SubmitSm uses only one destination, but SubmitMulti can have several destinations.

You can send one SubmitMulti or a list of SubmitMulti.

For each SubmitMulti must be defined List<DestinationAddress>.
araxno
Posts: 21
Joined: Thu Jul 30, 2009 12:35 pm

Post by araxno »

Hi alt,

In foreach I add DestinationAddress to List of DestinationAddresses.

After foreach my code is like that;

List<SubmitMulti> sMulti = SmscSpeaker.PrepareSubmit(SubmitMode.ShortMessage, Convert.ToByte(5), Convert.ToByte(0), srcAddr, msisdnList, DataCodings.UCS2, message);
SmscSpeaker.SubmitAsync(sMulti);

Is here any mistake?

Thanks
araxno
Posts: 21
Joined: Thu Jul 30, 2009 12:35 pm

Post by araxno »

Also SubmitMultiResp.Status returns ESME_RINVNUMDESTS error.
alt
Site Admin
Posts: 992
Joined: Tue Apr 25, 2006 9:45 am

Post by alt »

how you create msisdnList object?
araxno
Posts: 21
Joined: Thu Jul 30, 2009 12:35 pm

Post by araxno »

List<DestinationAddress> msisdnList = new List<DestinationAddress>(dt.Rows.Count);
foreach (System.Data.DataRow dRow in dt.Rows)
{
DestinationAddress da = new DestinationAddress();
da.Address = dRow[1].ToString();
da.Npi=Convert.ToByte(1);
da.Ton = Convert.ToByte(1);
msisdnList.Add(da);
}
Locked