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 » Thu Aug 13, 2009 8:23 am

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: 985
Joined: Tue Apr 25, 2006 9:45 am

Post by alt » Wed Aug 26, 2009 5:58 am

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 » Wed Sep 23, 2009 6:24 pm

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 » Fri Sep 25, 2009 7:44 am

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: 985
Joined: Tue Apr 25, 2006 9:45 am

Post by alt » Sun Sep 27, 2009 6:23 pm

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 » Wed Sep 30, 2009 10:24 am

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

Post by alt » Thu Oct 01, 2009 3:13 pm

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 » Mon Oct 05, 2009 9:57 am

Hi alt,

Firstly Thanks for SubmitMulti,

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

Post by alt » Mon Oct 05, 2009 10:54 am

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 » Mon Oct 05, 2009 12:29 pm

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: 985
Joined: Tue Apr 25, 2006 9:45 am

Post by alt » Mon Oct 05, 2009 4:46 pm

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 » Tue Oct 06, 2009 8:15 am

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 » Tue Oct 06, 2009 8:47 am

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

Post by alt » Tue Oct 06, 2009 8:57 am

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

Post by araxno » Tue Oct 06, 2009 10:46 am

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