Sample code to Send USSD

.NET library for SMPP protocol
Locked
rahzamkhan
Posts: 1
Joined: Thu Jun 09, 2011 12:25 pm

Sample code to Send USSD

Post by rahzamkhan » Thu Jun 09, 2011 1:11 pm

Hi,

Can you give me sample code to compile USSD from client end? I will appreciate, if you can give me server code to receive USSD as well.

Thanks in advance.
alt
Site Admin
Posts: 918
Joined: Tue Apr 25, 2006 9:45 am

Re: Sample code to Send USSD

Post by alt » Thu Jun 09, 2011 2:13 pm

If SMPP provider supports USSD services over SMPP protocol, then library will work.

To send USSD request you need to send “ussd_service_op” parameter.

Code: Select all

submitSM.Optional.Add(new TLV(0x0501,1,2));
Parameter value can be one of the following values:

0 = PSSD Indication
1 = PSSR Indication
2 = USSR Request
3 = USSN Request

4 to 15 = Reserved

16 = PSSD Response
17 = PSSR Response
18 = USSR Confirm
19 = USSN Confirm

20 to 31 = Reserved
32 to 255 = Vendor specific operations

Please try if it works for you.
osoliev
Posts: 2
Joined: Thu Sep 13, 2012 7:59 am

Re: Sample code to Send USSD

Post by osoliev » Mon Sep 17, 2012 9:54 am

submitSM.Optional.Add(new TLV(0x0501,1,2));
TLV not have this kind of constuctor
this is error or i made mistake?
Please show Example using ussd.
alt
Site Admin
Posts: 918
Joined: Tue Apr 25, 2006 9:45 am

Re: Sample code to Send USSD

Post by alt » Mon Sep 17, 2012 1:30 pm

in latest version correct code is

Code: Select all

submitSM.Optional.Add(new TLV(0x0501, new byte[] { 2 }));
osoliev
Posts: 2
Joined: Thu Sep 13, 2012 7:59 am

Re: Sample code to Send USSD

Post by osoliev » Sun Sep 30, 2012 10:54 am

maybe submitSM.Optional.Add(new TLV(0x0501,1, new byte[] {2}));
is correct?
alt
Site Admin
Posts: 918
Joined: Tue Apr 25, 2006 9:45 am

Re: Sample code to Send USSD

Post by alt » Sun Sep 30, 2012 11:40 am

Yes, correct for 1.0
baron
Posts: 1
Joined: Thu Sep 12, 2013 11:59 am

Re: Sample code to Send USSD

Post by baron » Thu Sep 12, 2013 12:32 pm

into a Inetlab.MMS.MMSMessage instance of all you need to ask Mobile Network operator for access
scjp mock test scjp mock test
comptia a+ study guide comptia a+ study guide
ged books ged books
get ged online get ged online
mcat test mcat test
Locked