Page 1 of 1

Sample code to Send USSD

Posted: Thu Jun 09, 2011 1:11 pm
by rahzamkhan
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.

Re: Sample code to Send USSD

Posted: Thu Jun 09, 2011 2:13 pm
by alt
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.

Re: Sample code to Send USSD

Posted: Mon Sep 17, 2012 9:54 am
by osoliev
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.

Re: Sample code to Send USSD

Posted: Mon Sep 17, 2012 1:30 pm
by alt
in latest version correct code is

Code: Select all

submitSM.Optional.Add(new TLV(0x0501, new byte[] { 2 }));

Re: Sample code to Send USSD

Posted: Sun Sep 30, 2012 10:54 am
by osoliev
maybe submitSM.Optional.Add(new TLV(0x0501,1, new byte[] {2}));
is correct?

Re: Sample code to Send USSD

Posted: Sun Sep 30, 2012 11:40 am
by alt
Yes, correct for 1.0

Re: Sample code to Send USSD

Posted: Thu Sep 12, 2013 12:32 pm
by baron
into a Inetlab.MMS.MMSMessage instance of all you need to ask Mobile Network operator for access