Page 1 of 1

Explain parameters of the method SubmitTexAsync

Posted: Wed Jan 11, 2012 7:01 am
by josna
Hi,

I am evaluating Inetlab.Smpp library to implement SMS functionality in my .Net application. I understand that the SubmitTextAsync method of the library is used to send asynchronous messages. Can someone explain what these below arguments of this function indicate.

1. SrcTon
2. srcNpi,
3. SrcAdr
4.DestTon
5. dstNpi

I know that these are byte fields. I need to send SMS from my .Net application to mobile recipients. What value should be passed to these parameters. I also need a delivery report when the message is delivered. I also need a confirmation if the message was successfully delivered, if not what was the reason the message was not delivered. For purpose of testing, I am using our co-rporate gateway to send the sms using SMPP protocol.

Thanks
Josna

Re: Explain parameters of the method SubmitTexAsync

Posted: Wed Jan 11, 2012 8:20 am
by alt
1. SrcTon - Type of Number for source address.
2. srcNpi - Numbering Plan Indicator for source address.
3. SrcAdr - Sender andress.
4. DestTon - Type of Number for destination.
5. dstNpi - Numbering Plan Indicator for destination.
6. DstAdr - Destination address

npi = 1, ton=1 for phone number
npi = 5, ton=0 for alphanumeric short code

in order to request delivery receipt you need to set sm.RegisteredDelivery =1

Code: Select all

List<SubmitSm> req = client.PrepareSubmit(  
        mode,
	byte.Parse(tbSrcAdrTON.Text),
	byte.Parse(tbSrcAdrNPI.Text),
	tbSrcAdr.Text,
	byte.Parse(tbDestAdrTON.Text),
	byte.Parse(tbDestAdrNPI.Text),
	tbDestAdr.Text,
        coding,
	tbSend.Text);

        foreach (SubmitSm sm in req)
        {
               sm.RegisteredDelivery =1;                   
        }

         List<SubmitSmResp> resp = client.SubmitAsync(req);

Re: Explain parameters of the method SubmitTexAsync

Posted: Sun Jan 15, 2012 10:17 am
by josna
Thanks for the reply.

To connect to an SMPP gateway, we use the client.Connect(hostName,port,ISSSL) method. Is there a inbuilt method to connect asynchronously just like the BindAsync method?

Re: Explain parameters of the method SubmitTexAsync

Posted: Mon Jan 30, 2012 8:01 am
by alt
I'm going to add ConnectAsync method in next version.