satyajit319 / websmsdroid

Automatically exported from code.google.com/p/websmsdroid
0 stars 1 forks source link

smspilot.ru connection #348

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hello, I'm from Russia!
you done good aplication, but it will be better with russian sms-gate.
it will be great to include sms-gate smspilot.ru to Websms aplication.
the API is via HTTP GET/POST with parametrs:
http://smspilot.ru/api.php?send=MASSAGETEXT&to=79087964781&from=smspilot&apikey=
XYZ

send-message texst URLENCODED in UTF-8
to-mobile phone number in format 79261112233 (without +)
from- max 11-chatacter number or your text (accept any you like)
apikey-your autorization key from smspilot.ru

you need apikey for testing, and i'll send it if you want
please, integrate it, because your apps SMSdroid+WebSMS is the best i've tryed.

Original issue reported on code.google.com by ximonline@gmail.com on 2 Oct 2010 at 7:40

GoogleCodeExporter commented 8 years ago
This is additional option for API:
1.to check ballance
https://smspilot.ru/api.php?apikey=XYZ

the result is:
SUCCESS=APIKEY INFO
apikey = key value
email = ouner's e-mail
sms_total = total number of payed sms 
sms_sent = sms sent
status = 0 – new, 1 – waiting activation, 2 – active, 3 – SMS overs, 4 
– spam
amount = last payment sum
currency = last payment currency
date = creation date/time
date_paid = payment date/time
date_access = last check date/time
last_sms = last message content
last_ip = IP-adress
history = history in strings, devided by symbol |

2.check of delivery:
https://smspilot.ru/api.php?check=recent&apikey=XYZ

check – with value "recent" getback sms for the last 24 hours in CSV format 
(id,phone,zone,status), for example:
4566,79087964782,1,-1
4567,79131231212,1,2
status:
-1 – send error (wrong number)
0 – waiting
1 – sent
2 – delivered

Please, anybody help me! I can't understanding programming 
I can help you in translating this application to russian language. It'll be 
more popular in Russia

Original comment by ximonline@gmail.com on 3 Oct 2010 at 11:53

GoogleCodeExporter commented 8 years ago
well, i stopped building new connectors, as i don't have the time to maintain 
them.
but in fact, it's a matter of 30min to build a connector for an api like this.
you just need to extend the BasicConnector provided in my websms-api.

any volunteer?

Original comment by felix.bechstein on 3 Oct 2010 at 4:03

GoogleCodeExporter commented 8 years ago

Original comment by felix.bechstein on 3 Oct 2010 at 4:03

GoogleCodeExporter commented 8 years ago
Felix, may be if I'll help you to translate your app to the Russian, you will 
try to find half of a hour for us? there are no volunteers... 

Original comment by ximonline@gmail.com on 5 Oct 2010 at 4:18

GoogleCodeExporter commented 8 years ago
sounds like a deal ;)
i'll let you know the details as soon there is some more time.
but please register at github.com and tell me your username to let you 
translate the strings.

Original comment by felix.bechstein on 5 Oct 2010 at 7:26

GoogleCodeExporter commented 8 years ago
it's done
http://github.com/xim737

Original comment by ximonline@gmail.com on 6 Oct 2010 at 2:42

GoogleCodeExporter commented 8 years ago
hi,
i added you to the projects websms and websms-api.
please translate the following files directly on the github.com webpage (just 
look for the "edit" link):

http://github.com/felixb/websms-api/blob/master/res/values-ru/strings.xml
http://github.com/felixb/websms/blob/master/res/values-ru/strings.xml

when finished translating the strings. please remove the <!-- --> comment signs.

i'll start writing your connector as soon i find some sparetime.

Original comment by felix.bechstein on 8 Oct 2010 at 7:54

GoogleCodeExporter commented 8 years ago
it's OK.
SMSdroid needs russian too

Original comment by ximonline@gmail.com on 9 Oct 2010 at 7:04

GoogleCodeExporter commented 8 years ago
here it is:
http://github.com/felixb/smsdroid/blob/master/res/values-ru/strings.xml

Original comment by felix.bechstein on 10 Oct 2010 at 9:41

GoogleCodeExporter commented 8 years ago
SMSdroid is done too.
Please, compile both apps with new strings for testing.
Desire's root don't let me add them to device without installation.

Original comment by ximonline@gmail.com on 10 Oct 2010 at 11:23

GoogleCodeExporter commented 8 years ago
here are the builds. please keep in mind, that ' and " needs to be escaped with 
\.
means: ' -> \' and " -> \"

Original comment by felix.bechstein on 10 Oct 2010 at 12:45

Attachments:

GoogleCodeExporter commented 8 years ago
btw: i still need the api key ;)

Original comment by felix.bechstein on 10 Oct 2010 at 1:06

GoogleCodeExporter commented 8 years ago
fist basic build, balance checking does not work, as i do not know, which 
returned field should be shown as balance.

sending might work. but did not test it, as i do not have an api key (send it 
by mail please)

Original comment by felix.bechstein on 10 Oct 2010 at 1:36

Attachments:

GoogleCodeExporter commented 8 years ago
1.translations tested and fixed. you may add it to release.
2.connector doesn't works - sertificate error returns.
3.give your email for sending apikey.
there is the result of the checking balance for example:

SUCCESS=APIKEY INFO 43/60 apikey=XYZ email=xxx@yandex.ru sms_total=60 
sms_sent=43 status=2 amount=3.40 currency=RUR date=2010-10-02 19:21:59 
date_paid=2010-10-10 15:00:54 date_access=2010-10-10 15:17:47 
last_sms=15555218135:79152320000:<...> Money! Money! last_ip=77.232.15.135 
history=2010-10-02 19:21:59: ключ создан|2010-10-02 19:22:56: 
ключ оплачен|2010-10-10 14:47:11: отправлено 
предупреждение о низком балансе 40/50|2010-10-10 
14:55:27: заявка на доплату 3.4 RUR|2010-10-10 15:00:54: 
ключ продлён| allow_ip=

Original comment by ximonline@gmail.com on 10 Oct 2010 at 3:02

GoogleCodeExporter commented 8 years ago
just send the key to my username @gmail.com

@balance: but what exactly is the balance? :D
sms_total=60? amount=3.4?

Original comment by felix.bechstein on 10 Oct 2010 at 3:06

GoogleCodeExporter commented 8 years ago
give me 2 hour for akikey...

balance is "APIKEY INFO 43/60" and (additional) "status=2"

it mean's that 43 sms sent from 60 prepayed
and status of current apikey is "active"

Original comment by ximonline@gmail.com on 10 Oct 2010 at 3:14

GoogleCodeExporter commented 8 years ago
ok, basic version might work now (i added the untrusted current ssl certificate 
to the trusted ones),

update balance is not fixed yet.

don't hurry with the api key, i have to catch my flight in 2h anyway ;)

Original comment by felix.bechstein on 10 Oct 2010 at 3:37

Attachments:

GoogleCodeExporter commented 8 years ago
btw: 
http://github.com/felixb/websms-connector-smspilot-ru/blob/master/res/values-ru/
strings.xml

Original comment by felix.bechstein on 10 Oct 2010 at 4:23

GoogleCodeExporter commented 8 years ago
balance is showing up.
sending fails, as my api key is not active yet.
just test it with yours.

btw: it was hard to enter these 64chars into the emulator (there are O and 0s!)

Original comment by felix.bechstein on 10 Oct 2010 at 9:45

Attachments:

GoogleCodeExporter commented 8 years ago
your key is active now
tips and tricks: i sent apikey to my own email to device, and used copy-past :)
testing connector: new version can send sms right (it's look like good working)!
can you add:
- checking of delivery status? (may bee it'll be popup list with numbers and 
statuses)
- show apikey status in balance.

Original comment by ximonline@gmail.com on 11 Oct 2010 at 2:35

GoogleCodeExporter commented 8 years ago
requwest: allow to set as sender number random number or Latin word (for ex. 
FROM: Maxim)  

Original comment by ximonline@gmail.com on 11 Oct 2010 at 2:49

GoogleCodeExporter commented 8 years ago
Bag:  if sms more than 70 chars (contains of 2 for ex.),  websms sends only one 
(first), (checked in balance)

Original comment by ximonline@gmail.com on 11 Oct 2010 at 4:20

GoogleCodeExporter commented 8 years ago
status is shown now. in preferences you are able to deactivate it (please 
translate the additional string)

custom sender should be settable via websms "extra" button. not yet tested.

@sms length: is there any additional argument expected to allow extralong sms?

Original comment by felix.bechstein on 11 Oct 2010 at 7:29

GoogleCodeExporter commented 8 years ago
forgot to attach the apk

Original comment by felix.bechstein on 11 Oct 2010 at 7:29

Attachments:

GoogleCodeExporter commented 8 years ago
about sms lenght: smspilot.ru promises make additional functions, lets wait 1-2 
weeks
"extra" button works well, but today program begins write: not trusted server 
certificate

Original comment by ximonline@gmail.com on 12 Oct 2010 at 6:46

GoogleCodeExporter commented 8 years ago
i added the fingerprint of their new ssl certificate and let you set your latin 
sender in preferences too.

delivery reports are referred in some other issue. please have a look your self.
and please let me know if some changes are needed to make the api handle long 
sms as soon you get the information.

as soon it is possible to send long sms, i'll publish the connector to the wild.

Original comment by felix.bechstein on 12 Oct 2010 at 9:11

Attachments:

GoogleCodeExporter commented 8 years ago
any news?

Original comment by felix.bechstein on 23 Oct 2010 at 7:11

GoogleCodeExporter commented 8 years ago
Yes, there are new features in API:

1. after sending sms now you get answer with sms ID, zone and status
for ex.:
https://smspilot.ru/api.php?send=Hello&to=79087964781&from=test&apikey=XXZZZ
answer is:
SUCCESS=SMS SENT
4566,79087964781,1,0

transcription:[SMS ID],[Recipient's number],[zone of recipient-not interesting 
value],[STATUS of delivery]

status VALUES:
-2 - server doesn't receive this message (ID not found) 
-1 - message not delivered (phone is switched off or operator is not supported)
0 - new message
1 - awaiting of delivery
2 - message is delivered successfully

2.simple delivery check of recent sms:
https://smspilot.ru/api.php?check=recent&apikey=XYZ
where XYZ is your 64 sim apikey

returns status of all sent sms for 24 hours, for ex.
4566,79087964782,1,-1
4567,79131231212,1,2
transcription is the same one

3. checking of the delivery status for the ID(s)
https://smspilot.ru/api.php?check=ID(s)&apikey=XYZ
where
ID(s) - your sms id or ids divided "," without space, for ex.:
https://smspilot.ru/api.php?check=94,95,96&apikey=XYZ
returns:
94,79087964782,1,-1
95,79131231212,1,1
96,79131231212,1,2

SMS statuses renews every 10 minutes

Original comment by ximonline@gmail.com on 24 Oct 2010 at 6:47

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
and two requests:
1. sending multiple (long) sms
smspilot in one sms can send only 160 char in latin or 70 char in URLunicode
can you make:
- autodividing long sms for the right 70 (160) pieces
- for recognizing: at the end of the first piece add "..", at the beginning of 
the last piece add "..", and in the middle-piece(s) add this symbols both at 
the beginning and at the end (warning: resulting sum of all char with ".." also 
must be 70 for the unicode pieces and 160 for the Latin pieces)
- sms counter for the current sms (number of sms, number of char remain)

2. Checking of delivery:
please make feature for the checking of delivery status from menu in WebSMS 
(simple delivery checking of recent), and if it's not very difficult, with 
changing phone number to contact's name from phonebook and number of status to 
word (not delivered, new massage, awaiting of delivery, delivered).

second way to check delivery status is checking by ID (for ex. from context 
menu of current SMS), but it looks very difficult for realization. needs 
SMSdroid mod. Is it possible?

Original comment by ximonline@gmail.com on 24 Oct 2010 at 7:42

GoogleCodeExporter commented 8 years ago
what's with the devs from smspilot.ru?
do they have any plans to make the api accept extra long sms?
cutting sms into peaces in websms isn't really what i want to do. :(

Original comment by felix.bechstein on 24 Oct 2010 at 7:56

GoogleCodeExporter commented 8 years ago
smspilot devs said that it is restriction of their provider...

Original comment by ximonline@gmail.com on 24 Oct 2010 at 8:25

GoogleCodeExporter commented 8 years ago
There are some good news about long sms sending (about 700/1600 char)!
give me 3-4 hour, and I'll post the the details...

Original comment by ximonline@gmail.com on 29 Oct 2010 at 2:39

GoogleCodeExporter commented 8 years ago
good news! but 3-4h are over :p
i'll publish the connector as soon as it's working with long sms.

Original comment by felix.bechstein on 29 Oct 2010 at 2:38

GoogleCodeExporter commented 8 years ago
sorry, i asked some questions to the smspilot devs. adds to API will be able as 
soon as they answer...

Original comment by ximonline@gmail.com on 29 Oct 2010 at 10:40

GoogleCodeExporter commented 8 years ago
NEW API-functions:
1. new simple balance checking
https://smspilot.ru/api.php?balance=sms&apikey=XYZ
it get back a number of your sms remains. for ex.:
97

2.for checking the key status
https://smspilot.ru/api.php?apikey=XYZ
it returns
SUCCESS=APIKEY INFO apikey=XYZ email=x@ya.ru sms_total=100 sms_sent=74 status=2 
amount=31.00 currency=WMR date=2010-10-10 15:48:13 date_paid=0000-00-00 
00:00:00 date_access=2010-10-30 21:51:56 last_ip=89.107.200.112 
history=2010-10-10 15:48:13: ключ создан |2010-10-11 02:55:00: 
ключ активирован allow_ip= balance=26

Please, add checking APIkey and simple checking of delivery (wrote earlier) in 
menu with whole pages (statuses of delivery with names from phone book)

3. as for long sms:
the long of 1 sms is 70 (160) char
if sms longer than 70 (160) it'll be divided into pieces for 67 (153) chars 
each.
max - 10 pieces (total 670 (153)chars). each piece costs as 1 sms.

Original comment by ximonline@gmail.com on 30 Oct 2010 at 9:51

GoogleCodeExporter commented 8 years ago
is the connector working now?
* showing balance, apikey info
* sending (long sms)

Original comment by felix.bechstein on 31 Oct 2010 at 7:50

GoogleCodeExporter commented 8 years ago
- showing balance is incorrect
- sending sms works well (long too - testing for 3-piece sms), but sms remain 
char counter is incorrect too

Original comment by ximonline@gmail.com on 31 Oct 2010 at 9:48

GoogleCodeExporter commented 8 years ago
please send me the logs after updating balance.

Original comment by felix.bechstein on 31 Oct 2010 at 10:54

GoogleCodeExporter commented 8 years ago
there are no log...
https://smspilot.ru/api.php?balance=sms&apikey=XYZ
returns quantity of sms remains, for ex.:
138

Original comment by ximonline@gmail.com on 31 Oct 2010 at 11:01

GoogleCodeExporter commented 8 years ago
please verify this apk

Original comment by felix.bechstein on 31 Oct 2010 at 11:34

Attachments:

GoogleCodeExporter commented 8 years ago
testing long sms sending
works well, as older version.

balance check works well too.

please, correct char remain counter and add simple delivery checking in 
additional menu

Original comment by ximonline@gmail.com on 31 Oct 2010 at 12:14

GoogleCodeExporter commented 8 years ago
ok. thx.

@additional features: i can't!
both needs changes in websms main app. and i do not know what do change, and 
how, as all connectors count their chars differently.
delivery report is handled in an other issue, as i mentioned above.

as for now, this connector is finished.

Original comment by felix.bechstein on 31 Oct 2010 at 12:22

GoogleCodeExporter commented 8 years ago
just released to market

Original comment by felix.bechstein on 31 Oct 2010 at 12:28

GoogleCodeExporter commented 8 years ago

Original comment by felix.bechstein on 31 Oct 2010 at 12:46

GoogleCodeExporter commented 8 years ago
ok, thanks! works stable

Original comment by ximonline@gmail.com on 31 Oct 2010 at 12:53