SMS Server Tools 3
This site is hosted by Kekekasvi.com
 Menu
Basic information:
Additional information:
Support:
Get SMS Server Tools 3:
Additional Options

 Sponsored links

 Search
Custom Search

 Visitor locations
 
 SMS Server Tools 3 Community
Welcome, Guest. Please login or register. Fri Apr 19, 2024 18:19
SMSTools3 Community » Help and support Bottom

[answered] need help with USSD

  This topic is locked

Page:  1

Author Post
Member
Registered:
Mar 2010
Location: Yogyakarta, Indonesia
hi, i have a question, how is exactly to call USSD data and retrive it into a file that parsed in certain folder... i need for regular credit balance check... is it possible?

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Try this kind of modem settings:

regular_run_cmd = AT+CUSD=1,"*100#",0;
regular_run_interval = 600
regular_run_logfile = /var/log/smsd_regular_run.log


The string *100# varies by operators, you have to find out what is the correct string for you. It's the same than which is used with a handset.

If you see an error in the log, you could try without the ending ,0;.

Adjust that interval (600 seconds), if necessary.

From the log file you can see the current balance and it's history.

Member
Registered:
Mar 2010
Location: Ukraine
regular_run_cmdfile = /usr/local/bin/sms/spool/stats/gsm1.ussd
....
regular_run_cmdfile = /usr/local/bin/sms/spool/stats/gsm2.ussd
#---------------------------------------------------------------------------------
crontab
30 6 * * * /usr/local/bin/sms/scripts/account_prepare.sh
#---------------------------------------------------------------------------------
File: account_prepare.sh
#!/bin/sh

echo 'AT+CUSD=1,"*111#"'> /usr/local/bin/sms/spool/stats/eccom1.ussd
echo 'AT+CUSD=1,"*112#"'>>/usr/local/bin/sms/spool/stats/eccom1.ussd

echo 'AT+CUSD=1,"*111#"'> /usr/local/bin/sms/spool/stats/eccom2.ussd
echo 'AT+CUSD=1,"*112#"'>>/usr/local/bin/sms/spool/stats/eccom2.ussd



eventhandler_ussd = /usr/local/bin/sms/scripts/eventhandler_ussd

File: eventhandler_ussd
#################################################
file=$2
device=$3
command=$5
ussdcommand=${command:12:3}

if [ "$event" = "USSD" ] ; then
cp -f $file /var/log/sms/$device.$ussdcommand.ussd
fi


« Last edit by nm11 on Thu Apr 22, 2010 10:24, 170 months ago. »

  This topic is locked

Page:  1

SMSTools3 Community » Help and support Top

 
Time in this board is UTC.  

Privacy Policy   SMS Server Tools 3 Copyright © Keijo Kasvi.