Project

General

Profile

How to check the balance etc other functions

Added by umarkashmiri over 9 years ago

Usually to check the prepaid balance we people dial some number like *111# and it returns us the balance of our account.How this thing is managed in this api...
waiting for your help


Replies (9)

RE: How to check the balance etc other functions - Added by stevensu over 9 years ago

you can use:

mobileGateway.SendUssd("*111#);

RE: How to check the balance etc other functions - Added by umarkashmiri over 9 years ago

Thanks for your reply..... It works for some of the existing networks in pakistan but most of the network show different broken messages. which are not relevant.If we people manually dial from cell phone then it works fine.Can anybody help me

RE: How to check the balance etc other functions - Added by stevensu over 9 years ago

What broken messages?Can you tell more details?

What handset do you use?If you want to send USSD, you must check: does your handset support sending USSD?if it does, then maybe the network is not supported for USSD.

From what you has been described above, I think that the network is not supported for USSD.

RE: How to check the balance etc other functions - Added by umarkashmiri over 9 years ago

It is working for only one network here and rest of the all network returns the "BALANCE" string only. if the network is not supported then why it always works when we insert the sim into phone and dial the same number....Cell phone always shows us balance.
Can you explain a little....
I am using Teltonika GSM modem [[http://www.teltonika.lt/en/pages/view/?id=908]]

Thanks for your reply

RE: How to check the balance etc other functions - Added by stevensu over 9 years ago

I cannot explain more dettails because i also get the same problem. In here there are 5 operators network. 2 of thems are working when we send USSD from the modem. But two others sometime works and sometime not. And the other not working. If it's no working the return string is "ERROR" here. If I check from the device all of them work perfectly.

In order to use AT Command, we must check whether the device and the network is supported or not. About the ussd, i have ever read that there are many types for USSD. USSD that need reply from the sender,USSD which does not need reply from the sender. You can refer to Sony Ericcson AT Command. Search it on google. or why don't you search AT Command for your device. Or please attach the log maybe i can help you...

RE: How to check the balance etc other functions - Added by umarkashmiri over 9 years ago

I searched over the internet and finally i got the commands for ussd
I execute them through windows hyper terminal and this is working fine
command for usd is

AT+CUSD=1,"*111#"

string command = "AT+CUSD=1,\"{0}\"";
command = string.Format(command, txtPhoneNumberList.Text);
string result = mobileGateway.SendCommand(command);
I used this syntax and this is working fine for all networks

RE: How to check the balance etc other functions - Added by stevensu over 9 years ago

I also use that syntax and not all networks working. So did you use messaging toolkit? Messaging toolkit also uses that syntax

RE: How to check the balance etc other functions - Added by umarkashmiri over 9 years ago

Nopes..... I guess it does not use the same syntax.Coz by simply calling sendUSSd method does not support some networks. but i when i used AT+CUSD command. its working fine for me.

RE: How to check the balance etc other functions - Added by stevensu over 9 years ago

Have you check the MessagingToolkit's log?What syntax that you use?can u write it here?

    (1-9/9)