Author |
Post |
|
#1 Fri Aug 30, 2019 09:41, 64 months ago.
|
Member
Registered: Aug 2019
Location: Таганрог, Russian Federation
|
gentoo: 3.1.21-r1: portage: sources / package repository / from elsewhere... don't have yet: USB: serial / USB / some adapter...
Hello. I'm a novice here in these fields, so excuse me if I ask any silly questions. I need to receive sms, select sms from definite phone number, parse it. And dependently of context of the sms resend it to one of phone numbers from list. Could you please tell me a direction to dig. May be there is a similar topic.
|
|
#2 Mon Sep 09, 2019 10:22, 64 months ago.
|
Member
Registered: Aug 2019
Location: Таганрог, Russian Federation
Topic owner
|
I found how to do all I asked before. Even more I created an eventhandler that is doin what I need. But aother question we already have an eventhandler which is sprocessing incoming smses and doung different job. Can I set two eventhandlers in a smsd.conf.
|
|
#3 Mon Sep 09, 2019 10:32, 64 months ago.
|
Member
Registered: Aug 2019
Location: Таганрог, Russian Federation
Topic owner
|
There is an eventhandler in smsd.conf. I want to set another one.
|
|
#4 Mon Sep 09, 2019 13:01, 64 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
You can use the single eventhandler as a "main" eventhandler, and call other eventhandlers from it.
|
|
#5 Tue Sep 10, 2019 09:53, 64 months ago.
|
Member
Registered: Aug 2019
Location: Таганрог, Russian Federation
Topic owner
|
Thank you very much for the answer. Sorry for my questions. Now I realised how silly they are. I got it. I call another script from the main eventhandler as you adviced. But now I faced one more problem. I'm receiving smses coded in UCS2 and the body of sms is unreadable. When I try to use "iconv -f UCS -t UTF-8" I get other unreadable text something looks like Chinese eroglphs. What I'm doing wrong?
|
|
#6 Wed Sep 11, 2019 17:21, 64 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
If decoding messages in the eventhandler, use the iconv with -f UNICODEBIG. Smstools3 can also do this internally. Try with these global settings: decode_unicode_text = yes incoming_utf8 = yes These settings default to no because of historical reasons and backward compatibility.
|
|
#7 Thu Sep 12, 2019 06:18, 64 months ago.
|
Member
Registered: Aug 2019
Location: Таганрог, Russian Federation
Topic owner
|
Thank You for the reply. It is very kind of you. As I already said. We have event handler in our system. So I creted my oun one to process smses. And the script in bash is getting sms status and body via arguments from main event handler. But during the pass of the arguments somethings goes wrong. I get a part of body coded in UCS2 with extracted leading null bytes. I checked it in hex editor. What I dont know why. Encoding in main event handler goes fine. So I decided to go around an obstacle and added third argument encoded text of sms. So I'm done for now. I can send you created script if nessary and it can help sombody else. Sincerely Vadim.
|